ONLINE_FEATURE_TABLE_REFRESH_HISTORY
functionsupportedAI & MLThis table function returns information about each refresh (completed and running) of online feature tables. This table function returns all refreshes that are in progress as well as all refreshes that have a REFRESH_START_TIME within 7 days of the current time.
Syntax
supportedpartialnot supportednot scored
ONLINE_FEATURE_TABLE_REFRESH_HISTORY(
[ REFRESH_START_TIMESTAMP => <constant_expr> ]
[ , REFRESH_END_TIMESTAMP => <constant_expr> ]
[ , RESULT_LIMIT => <integer> ]
[ , NAME => '<string>' ]
[ , NAME_PREFIX => '<string>' ]
[ , ERROR_ONLY => { TRUE | FALSE } ]
)
Parameters
| Name | Required | Description |
|---|---|---|
REFRESH_START_TIMESTAMP => constant_expr , REFRESH_END_TIMESTAMP => constant_expr | required | Time range (in TIMESTAMP_LTZ format) during which the refreshes started. If an end version is not specified, CURRENT_TIMESTAMP is used as the end of the range. |
RESULT_LIMIT => integer | required | A number specifying the maximum number of rows returned by the function. If the number of matching rows is greater than this limit, the refreshes that finished most recently (and those that are still running) are returned, up to the specified limit. Range: 1 to 10000 Default: 100. |
NAME => 'string' | required | The name of an online feature table. You can specify the unqualified name (online_feature_table_name), the partially qualified name (schema_name.online_feature_table_name), or the fully qualified name (database_name.schema_name.online_feature_table_name). For more information on object name resolution, see Object name resolution. The function returns the refreshes for this table. |
NAME_PREFIX => 'string' | required | A prefix for online feature tables. The function returns refreshes for tables with names that start with this prefix. You can use this argument to return the refreshes for online feature tables in a specific database or schema. |
ERROR_ONLY => { TRUE | FALSE } | required | When set to TRUE, this function returns only refreshes that failed or were cancelled. Default: FALSE |
Usage notes
- This function is available in the INFORMATION_SCHEMA.
- The information returned by this function is up to date. Online Feature Table refresh history in the ACCOUNT_USAGE.ONLINE_FEATURE_TABLE_REFRESH_HISTORY view may lag by up to 3 hours.
Output
The output of the command includes the following columns, which describe the properties and metadata of the object: Column | Data type | Description NAME | TEXT | Name of the online feature table. SCHEMA_NAME | TEXT | Name of the schema that contains the online feature table. DATABASE_NAME | TEXT | Name of the database that contains the online feature table. QUALIFIED_NAME | TEXT | Fully qualified name of the online feature table. STATE | TEXT | Status of the refresh for the online feature table. The status can be one of the following: EXECUTING: refresh in progress. SUCCEEDED: refresh completed successfully. FAILED: refresh failed during execution. CANCELLED: refresh was canceled before completion. REFRESH_START_TIME | TIMESTAMP_LTZ | Time when the refresh job started. REFRESH_END_TIME | TIMESTAMP_LTZ | Time when the refresh completed. REFRESH_TRIGGER | TEXT | One of: SCHEDULED: normal background refresh to meet target lag. MANUAL: user/task ran ALTER ONLINE FEATURE TABLE <name> REFRESH command. CREATION: refresh performed during the creation DDL statement, triggered by the creation of the online feature table. REFRESH_ACTION | TEXT | One of: NO_DATA: no new data in base tables. Doesn’t apply to the initial refresh of newly created online feature tables regardless of whether or not the base tables have data. REINITIALIZE: base table changed. FULL: Full refresh, because refresh mode of the online feature table is set to FULL. INCREMENTAL: normal incremental refresh. QUERY_ID | TEXT | ID of the SQL statement that produced the results for the online feature table. STATE_CODE | TEXT | Code representing the current state of the refresh. STATE_MESSAGE | TEXT | Description of the current state of the refresh.
Access control requirements
Privilege | Object | Notes MONITOR | Online feature table | Role that has the MONITOR privilege on the online feature table. For instructions on creating a custom role with a specified set of privileges, see Creating custom roles. For general information about roles and privilege grants for performing SQL actions on securable objects, see Overview of Access Control.