SYSTEM$GET_TABLE_ARCHIVE_METADATA

functionnot supportedTables, views, streams, sequences

docs.snowflake.com ↗

System functions

Returns metadata about the archived data for a table, without requiring data retrieval from the archive tier.

Syntax

SYSTEM$GET_TABLE_ARCHIVE_METADATA( '<table_name>' )

Parameters

NameRequiredDescription
'table_name'requiredThe name of the table with archived data. The table must have had data archived to the COOL or COLD tier, usually by a storage lifecycle policy.

Returns

Returns a TEXT value containing JSON with metadata about the archived data. The JSON structure includes: - rowCount: The number of rows in the archive. - columns: An object containing metadata for each column: column_id: The column ID (as shown in the COLUMNS view). - data_type: Column data type - min: The minimum value for the column, or null if not applicable. - max: The maximum value for the column, or null if not applicable. Note The min and max values are null for TEXT, OBJECT, ARRAY, and VARIANT data types. The output also includes the archived timestamp column (METADATA$STORAGE_LIFECYCLE_POLICY_ARCHIVED_TIMESTAMP), which indicates when each row was archived. Example output:

Usage notes

See also