AUTO_REFRESH_REGISTRATION_HISTORY

functionsupportedIceberg & external tables

docs.snowflake.com ↗

Information SchemaTable functions

This table function can be used to query the history of data files registered in the metadata for a specified external table or directory table and the credits billed for these operations. The table function returns the billing history for a specified range within the last 14 days for your entire Snowflake account. Note To retrieve refresh history information for an Apache Iceberg™ table, see ICEBERG_TABLE_SNAPSHOT_REFRESH_HISTORY instead. Note This function is generally deprecated in favor of the ACCOUNT_USAGE.CATALOG_LINKED_DATABASE_USAGE_HISTORY view, which provides a more complete data set and supports longer date ranges.

Syntax

supportedpartialnot supportednot scored

AUTO_REFRESH_REGISTRATION_HISTORY(
      [ DATE_RANGE_START => <constant_expr> ]
      [, DATE_RANGE_END => <constant_expr> ]
      [, OBJECT_TYPE => '<string>' [, OBJECT_NAME => '<string>'] ])

Parameters

NameRequiredDescription
DATE_RANGE_START => constant_expr , DATE_RANGE_END => constant_exprrequiredThe date/time range of the billing window: If an end date is not specified, then CURRENT_DATE is used as the end of the range. If a start date is not specified, then the range starts 10 minutes prior to the start of DATE_RANGE_END (i.e. the default is to show the previous 10 minutes of the billing history). For example, if DATE_RANGE_END is CURRENT_DATE, then the default DATE_RANGE_START is 11:50 PM on the previous day. History is displayed in increments of 5 minutes, 1 hour, or 24 hours (depending on the length of the specified range).
OBJECT_TYPE => stringrequiredType of object for which credits are billed. The following value is supported:
  • DIRECTORY_TABLE — Directory tables that are configured for automatic metadata refreshes.
  • EXTERNAL_TABLE — External tables that are configured for automatic metadata refreshes.
OBJECT_NAME => stringrequiredA string specifying the name of the external table or directory table for which credits are billed.

Usage notes

Output

The function returns the following columns: Column Name | Data Type | Description START_TIME | TIMESTAMP_LTZ | Start of the specified billing window. END_TIME | TIMESTAMP_LTZ | End of the specified billing window. OBJECT_NAME | TEXT | Name of the object for which credits are billed. OBJECT_TYPE | TEXT | Type of object for which credits are billed. CREDITS_USED | TEXT | Number of credits billed for data files registered in the metadata of the specified object or object type during the START_TIME and END_TIME window. FILES_REGISTERED | NUMBER | Number of files registered during the START_TIME and END_TIME window.