Replication system table reference
This feature is in Private Preview. To try it, reach out to your Databricks contact.
This page provides a reference for the states table in the replication system schema, which tracks the replication status of Databricks managed disaster recovery (DR). Each row is a status event for a failover group, emitted periodically and whenever the failover group changes. Use this table to monitor the current and historical replication status of your failover groups, including replication lag and any errors that are blocking replication of at least one asset.
Table path: system.replication.states
States table schema reference
The states table uses the following schema:
Column name | Data type | Description | Example |
|---|---|---|---|
| string | Unique identifier for the status event. |
|
| timestamp | Timestamp of when the event was emitted. |
|
| string | ID of the account that the failover group belongs to. |
|
| string | Fully qualified name of the failover group. |
|
| string | State of the replication when the event was emitted. Possible values are |
|
| array | When | See Errors reference |
| long | Milliseconds since the last successful replication when the event was emitted. A |
|
| string | The primary region of the failover group at the time the event was emitted. |
|
| struct | The assets managed by the failover group when the event was emitted. See Managed assets reference. |
Errors reference
The errors column contains an array of the errors that are blocking replication. Each element of the array is a struct with the following fields:
Field name | Data type | Description |
|---|---|---|
| struct | Details about the error. Contains |
| array | One entry per affected asset type. Each entry contains |
Managed assets reference
The managed_assets column is a struct that describes the assets managed by the failover group when the event was emitted. It contains the following fields:
Field name | Data type | Description |
|---|---|---|
| array | The metastores managed by the failover group. |
| array | The workspace sets managed by the failover group. Each entry contains |
| array | The catalogs managed by the failover group. Each entry contains |
Considerations when reading the table
Take note of the following when you analyze the states table:
- Data can take up to 3 hours to populate after an event occurs.
- The table contains events for all failover groups in the Databricks account.
Example queries
The following query returns the most recent replication status for a given failover group, including its current replication_state, replication lag, and any blocking errors:
SELECT
event_time,
replication_state,
replication_lag_ms,
errors
FROM system.replication.states
WHERE failover_group_name = :failover_group_name
ORDER BY event_time DESC
LIMIT 1
The following query returns the distribution of replication lag for a given failover group:
SELECT histogram_numeric(replication_lag_ms, 20) AS replication_lag_distribution
FROM system.replication.states
WHERE failover_group_name = :failover_group_name