SYSTEM$CATALOG_LINK_STATUS¶
Returns the link status for a specified catalog-linked database.
Syntax¶
SYSTEM$CATALOG_LINK_STATUS( '<catalog_linked_db_name>' )
Required arguments¶
'catalog_linked_db_name'
Specifies the name of the catalog-linked database that you want to check the status of.
Returns¶
The function returns a JSON object containing the following name/value pairs:
{
"executionState":"<value>",
"failedExecutionStateReason":"<value>",
"failedExecutionStateErrorCode":"<value>",
"lastLinkAttemptStartTime":"<value>",
"failureDetails":[
{
"qualifiedEntityName":"<value>",
"entityDomain":"<value>",
"operation":"<value>",
"errorCode":"<value>",
"errorMessage":"<value>"
},
{ ... },
...
]
}
Where:
executionState
Current execution state of the linking operation that Snowflake uses to connect to your Iceberg catalog.
Values:
RUNNING
: The next table discovery sync is scheduled or executing; does not guarantee that all tables have successfully synced.
FAILED
: Linking operation encountered an error and was unsuccessful.
Usage notes¶
Returns results as long as you use a role with a privilege on the specified catalog-linked database. For more information, see Database privileges.
Examples¶
Retrieve the link status for a catalog-linked database named my_cld
:
SELECT SYSTEM$CATALOG_LINK_STATUS('my_cld');
Output:
{
"executionState": "RUNNING",
"lastLinkAttemptStartTime": "2025-02-14T01:35:01.71Z",
"failureDetails": [
{
"qualifiedEntityName": "my_namespace.table_1",
"entityDomain": "TABLE",
"operation": "CREATE",
"errorCode": "0040000",
"errorMessage": "An internal error occurred. Please contact Snowflake support."
},
{
"qualifiedEntityName": "my_namespace.table_2",
"entityDomain": "TABLE",
"operation": "CREATE",
"errorCode": "0040000",
"errorMessage": "An internal error occurred. Please contact Snowflake support."
}
]
}