- Categories:
LISTING_REFRESH_PROGRESS, LISTING_REFRESH_PROGRESS_BY_JOB¶
The LISTING_REFRESH_PROGRESS family of functions can be used to understand the replication progress of listings. They allows users to query the status of a refresh for cross-cloud auto-fulfillment listings.
LISTING_REFRESH_PROGRESS returns data about the status of the current in-progress or most recently completed refresh for a listing by name.
LISTING_REFRESH_PROGRESS_BY_JOB returns phase-by-phase data about listing refresh events specified by refresh UUID. Refresh UUIDs can be obtained as one of the columns returned by LISTING_REFRESH_HISTORY.
This function is available to providers of listings who have any privilege on the listing. The information returned contains replication details for the synchronization of data added to the listing to the specified target region. These functions return detailed information about a single refresh event. For a summary of all refresh events in the past 14 days, refer to LISTING_REFRESH_HISTORY.
Syntax¶
LISTING_REFRESH_PROGRESS('<listing_name>', '<target_region>'[, '<target_region_group>')
LISTING_REFRESH_PROGRESS_BY_JOB('<listing_name>', '<query_id>', '<target_region>'[, '<target_region_group>')
Arguments¶
listing_name
SQL identifier of a cross-cloud auto-fulfillment listing in this account. The SQL identifier for listings can be found in the name column returned by show listings in data exchange <exchange_name>. Similarly, the SQL identifier for data exchanges can be found in the name column returned by SHOW DATA EXCHANGES.
exchange_name
.SQL identified for the data exchange. SQL identifiers for data exchanges can be found in the name column returned by SHOW DATA EXCHANGES. This function argument must be enclosed in single quotes.
query_id
UUID of the refresh job for the listing. This can be obtained as one of the columns returned by LISTING_REFRESH_HISTORY.
target_region
The Snowflake region the listing is replicated to for which to view refresh history. This follows the same formatting as the column
snowflake_region
returned by SHOW REGIONS.target_region_group
The Snowflake region group the listing is replicated to for which to view refresh history.
PUBLIC
by default. This argument only needs to be specified if the target region being monitored is in a US government or Virtual Private Snowflake region.
Output¶
The function returns the following columns:
Column Name |
Data Type |
Description |
---|---|---|
PHASE_NAME |
TEXT |
Name of the replication phases completed (or in progress) so far. For the list of phases, see usage notes. |
START_TIME |
TIMESTAMP_LTZ |
Time when the replication phase began. |
END_TIME |
TIMESTAMP_LTZ |
Time when the phase finished, if applicable. NULL if the phase is in progress or is the terminating phase ( |
PROGRESS |
TEXT |
Empty for remaining phases. |
DETAILS |
VARIANT |
|
Usage notes¶
LISTING_REFRESH_PROGRESS only returns the most recent refresh activity if it occurred within the last 14 days.
LISTING_REFRESH_PROGRESS_BY_JOB returns refresh activity within the last 14 days.
Only returns rows for a role with any privilege on the listing.
Only returns rows for a listing in the current account.
When calling an Information Schema table function, the session must have an INFORMATION_SCHEMA schema in use or the function name must be fully-qualified.
For more information, see Information Schema.
Phase list in the order processed:
SECONDARY_SYNCHRONIZING_MEMBERSHIP
SECONDARY_UPLOADING_INVENTORY
PRIMARY_UPLOADING_METADATA
PRIMARY_UPLOADING_DATA
SECONDARY_DOWNLOADING_METADATA
SECONDARY_DOWNLOADING_DATA
COMPLETED / FAILED / CANCELED
In the PRIMARY_UPLOADING_DATA and SECONDARY_DOWNLOADING_DATA phases, the
totalBytesToReplicate
value is estimated prior to the replication operation. This value may differ from thetotalBytesToUpload
ortotalBytesToDownload
value in the respective phase.For example, if during the PRIMARY_UPLOADING_DATA phase, a previous replication operation uploaded some bytes but was canceled before the operation completed, those bytes would not be uploaded again. In that case,
totalBytesToUpload
would be lower thantotalBytesToReplicate
.
Examples¶
Retrieve the current progress of the listing my_listing
replicating to AWS US East-1:
select * from table(information_schema.listing_refresh_progress('my_listing','AWS_US_EAST_1'));
Retrieve the phase-by-phase progress of a specific data refresh event into AWS US East-1 for the listing my_listin
by query ID:
select * from table(information_schema.listing_refresh_progress_by_job('my_listing','012a3b45-1234-a12b-0000-1aa200012345','AWS_US_EAST_1'));