- Categories:
System functions (System Information)
SYSTEM$PARQUET_ DIRECT_ AUTO_ REFRESH_ STATUS¶
Returns the current auto-refresh status for a Parquet Direct Iceberg table. Use this function to check whether event-driven auto-refresh is running as expected and to diagnose issues.
Note
This function is specific to Parquet Direct tables (tables that use a catalog integration with TABLE_FORMAT = NONE or
TABLE_FORMAT = HIVE). For other externally managed Iceberg tables, such as Delta Direct or REST catalog tables, use
SYSTEM$AUTO_REFRESH_STATUS instead.
Syntax¶
Arguments¶
'table_name'The name of the Parquet Direct table for which you want to retrieve the current auto-refresh status.
If you use the fully qualified name, enclose the entire name in single quotes, including the database and schema. If the table name is case-sensitive or includes any special characters or spaces, you must use double quotes. Enclose the double quotes within the single quotes; for example,
'"Table_Name"'.
Returns¶
The function returns a JSON object that contains the following name/value pairs:
Where:
executionStateCurrent execution state of auto-refresh for the table.
Values:
RUNNING: Auto-refresh is running as expected. This status doesn’t indicate whether Snowflake is actively processing event notifications at this moment.STALLED: Auto-refresh encountered an error and is attempting to recover.STOPPED: Auto-refresh encountered an unrecoverable error and has stopped. You must take action to resume auto-refresh. For more information, see Refresh fails.
invalidExecutionStateReasonError message associated with a
STALLEDorSTOPPEDexecution state.pendingFileCountNumber of Apache Parquet™ files queued for processing.
oldestFileTimestampTimestamp of the oldest file in the pending queue. Snowflake sets this timestamp when the file is added to the queue.
notificationChannelNameName of the notification channel (for example, the Amazon SQS queue, Azure Storage queue, or Google Cloud Pub/Sub subscription) that delivers event notifications for the table.
numOutstandingMessagesOnChannelApproximate number of pending messages in the notification channel.
lastReceivedMessageTimestampTimestamp of the most recent notification message received from the channel.
lastForwardedMessageTimestampTimestamp of the most recent notification message that Snowflake forwarded for processing for this table.
lastForwardedFilePathPath of the file in the most recent notification message that Snowflake forwarded for processing for this table.
channelErrorMessageError message from the notification channel, if any.
lastErrorRecordTimestampTimestamp of the most recent error message from the notification channel.
Snowflake always returns executionState and pendingFileCount. The other fields appear only when they apply; for example,
the notification channel fields appear only when the table has a notification channel.
Usage notes¶
- Calling this function requires a role that has the OWNERSHIP privilege on the Parquet Direct table.
- This function only works with Parquet Direct tables. Calling it on any other table returns an error.
- The function returns status only when
AUTO_REFRESH = TRUEis set on the table. If auto-refresh isn’t enabled, the function returns a message that indicates auto-refresh isn’t enabled for the table.
Examples¶
Retrieve the auto-refresh status for the Parquet Direct table my_parquet_table in the schema db1.schema1:
Extract individual fields from the result: