Schema:

ACCOUNT_USAGE

APPLICATION_CALLBACK_HISTORY view

The APPLICATION_CALLBACK_HISTORY view provides a history of callback invocations for Snowflake Native Apps in your Snowflake account. Each row in the view represents a callback invocation, including the callback type, state, and any error information.

For more information about callbacks, see Callbacks.

The retention time for this view is 365 days (1 year).

Columns

The following table provides definitions for the APPLICATION_CALLBACK_HISTORY view columns.

ColumnData typeDescription
TYPEVARCHARThe callback type as defined in the manifest file.
APPLICATION_NAMEVARCHARThe name of the app that defines the callback.
STATEVARCHARThe state of the callback execution. Possible values are: QUEUED, SCHEDULED, EXECUTING, COMPLETED, FAILED, ABORTED. For descriptions of each state, see Callback states.
STARTED_ONTIMESTAMP_LTZThe timestamp when the callback was invoked.
COMPLETED_ONTIMESTAMP_LTZThe completion timestamp. NULL if the callback has not yet completed.
TRIGGERING_QUERY_IDVARCHARThe query ID of the SQL statement that triggered the callback. NULL if not applicable.
QUERY_IDVARCHARThe query ID of the callback procedure execution.
ERROR_CODEVARCHARThe error code. NULL unless STATE is FAILED or ABORTED.
ERROR_MESSAGEVARCHARThe error message. NULL unless STATE is FAILED or ABORTED. This column is redacted unless the app is installed on the same account as the app package.

Examples

Retrieve the callback history for all applications in the current account:

SELECT * FROM SNOWFLAKE.ACCOUNT_USAGE.APPLICATION_CALLBACK_HISTORY;

Retrieve the callback history for a specific app:

SELECT *
FROM SNOWFLAKE.ACCOUNT_USAGE.APPLICATION_CALLBACK_HISTORY
WHERE APPLICATION_NAME = 'my_app'
ORDER BY STARTED_ON DESC;

Retrieve only failed or aborted callback invocations:

SELECT *
FROM SNOWFLAKE.ACCOUNT_USAGE.APPLICATION_CALLBACK_HISTORY
WHERE STATE IN ('FAILED', 'ABORTED')
ORDER BY STARTED_ON DESC;