- Schema:
For guidance on query performance when using organization-wide usage views, see Performance (Organization Usage).
REPLICATION_ GROUP_ REFRESH_ HISTORY view¶
Important
This view is only available in the organization account. For more information, see Premium views in the organization account.
Organization Usage performance
When you query a specific view in the SNOWFLAKE.ORGANIZATION_USAGE schema, follow the organization-wide guidance in
Performance (Organization Usage): bound every scan on history views, list
columns explicitly, and use the time filter column table plus worked SQL and anti-patterns there.
This Organization Usage view can be used to query the refresh history for a specified replication or failover group.
- See also:
REPLICATION_GROUP_REFRESH_HISTORY, REPLICATION_GROUP_REFRESH_HISTORY_ALL (Information Schema table function)
Columns¶
Organization-level columns
| Column Name | Data Type | Description |
|---|---|---|
| ORGANIZATION_NAME | VARCHAR | Name of the organization. |
| ACCOUNT_LOCATOR | VARCHAR | System-generated identifier for the account. |
| ACCOUNT_NAME | VARCHAR | User-defined identifier for the account. |
Additional columns
| Column Name | Data Type | Description |
|---|---|---|
| REPLICATION_GROUP_NAME | VARCHAR | Name of the secondary replication or failover group. |
| REPLICATION_GROUP_ID | NUMBER | Internal/system-generated identifier for the replication or failover group. |
| PHASE_NAME | VARCHAR | Current phase in the replication operation. For the list of phases, see the Usage notes. |
| START_TIME | TIMESTAMP_LTZ | Time when the replication operation began. |
| END_TIME | TIMESTAMP_LTZ | Time when the replication operation finished, if applicable. NULL if it is in progress. |
| JOB_UUID | VARCHAR | Query ID for the refresh job. |
| TOTAL_BYTES | VARIANT | A JSON object that provides detailed information about refreshed databases:
|
| OBJECT_COUNT | VARIANT | A JSON object that provides detailed information about refreshed objects:
|
| PRIMARY_SNAPSHOT_TIMESTAMP | TIMESTAMP_LTZ | Timestamp when the primary snapshot was created. |
| ERROR | VARIANT | NULL if the refresh operation is successful. If the refresh operation fails, returns a JSON object that provides detailed information about the error:
|
Usage notes¶
-
Latency for the view may be up to 24 hours.
To view real-time refresh progress, use the REPLICATION_GROUP_REFRESH_HISTORY, REPLICATION_GROUP_REFRESH_HISTORY_ALL table function.
-
Results are only returned for secondary failover or replication groups in the current account (the target account).
-
The following is the list of phases in the order processed:
# Phase name Description 1 SECONDARY_SYNCHRONIZING_MEMBERSHIPThe secondary replication or failover group receives information from the primary group about the objects included in the group, and updates its membership metadata. 2 SECONDARY_UPLOADING_INVENTORYThe secondary replication or failover group sends an inventory of its objects in the target account to the primary group. 3 PRIMARY_UPLOADING_METADATAThe primary replication or failover group creates a snapshot of metadata in the source account and sends it to the secondary group. 4 PRIMARY_UPLOADING_DATAThe primary replication or failover group copies the files the secondary group needs to reconcile any deltas between the objects in the source and target accounts. 5 SECONDARY_DOWNLOADING_METADATAThe secondary replication or failover group applies the snapshot of the metadata that was sent by the primary. The metadata updates are not applied atomically and instead applied over time. 6 SECONDARY_DOWNLOADING_DATAThe secondary replication or failover group copies the files sent by the primary group to the target account. 7 COMPLETED/FAILED/CANCELEDRefresh operation status.
Examples¶
To retrieve the refresh history for the secondary failover group myfg, execute the following statement:
To retrieve the last refresh record for each replication or failover group, execute the following statement: