USER MANUALS

GET_ICEBERG_VIEW_SNAPSHOTS

Description

The stored procedure GET_ICEBERG_VIEW_SNAPSHOTS obtains metadata information about the available snapshots of a view pointing to an Apache Iceberg table on the Embedded MPP.

Syntax

GET_ICEBERG_VIEW_SNAPSHOTS (
    database_name : text,
    view_name : text,
)
  • database_name: name of the database containing the view. If the database does not exist the procedure returns an error.

  • view_name: name of the view. If the view does not exist the procedure returns an error.

This stored procedure returns one row per snapshot on the view, with the following schema:

  • committed_at: timestamp storing the time when modification was made to the table data.

  • snapshot_id: numerical identifier of the snapshot.

  • parent_id: numerical identifier of the previous snapshot, null if the snapshot_id corresponds to the initial state of the table (first committed data).

  • operation: type of operation executed over the data. There are four operation types: append, replace, overwrite and delete.

Privileges Required

Only users that have the Metadata privilege on the base view and Execute privilege on the data source, can execute this procedure. This means, the following users can execute this procedure:

  • Administrators or administrators of this database.

  • Users that have the Connect privilege on this database, Metadata privilege on the base view and Execute privilege on the data source.

Examples

  • Get the snapshots information of the view test_database.test_view: call get_iceberg_view_snapshots('test_database', 'test_view')

  • Get the snapshots information of the view test_database.test_view (alternative syntax): SELECT * FROM get_iceberg_view_snapshots() WHERE database_name = 'test_database' AND view_name = 'test_view'

Add feedback