- Categories:
ICEBERG_ TABLE_ FILE_ REGISTRATION_ HISTORY¶
Returns information about the Apache Parquet™ files that Snowflake registered or unregistered for a Parquet Direct table, including the status of each operation and any error message. Use this function to verify that files were registered, and to diagnose files that failed to register.
Syntax¶
Arguments¶
Required:
TABLE_NAME => 'string'The name of the Parquet Direct table.
If the name is case-sensitive or includes special characters or spaces, enclose it in double quotes within the single quotes; for example,
'"My_Table"'.
Optional:
START_TIME => constant_exprTimestamp (in TIMESTAMP_LTZ format) that marks the beginning of the time range for retrieving registration events. Snowflake retains registration history for 65 days, so the function doesn’t return events older than 65 days, even if you specify an earlier start time.
Default: All available history (the last 65 days).
Output¶
The function returns the following columns:
| Column name | Data type | Description |
|---|---|---|
| OPERATION_TIME | TIMESTAMP_LTZ | Time when the registration operation occurred. |
| FILE_NAME | TEXT | Path of the Parquet file. |
| OPERATION_STATUS | TEXT | Status of the operation. Valid values: - REGISTERED_NEW: The file was registered.- REGISTERED_UPDATE: The file was registered again because it changed.- REGISTER_SKIPPED: The file was already registered.- REGISTER_SKIPPED_PATTERN_MISMATCH: The file path didn’t match the table’s PATTERN.- REGISTER_FAILED: The file couldn’t be registered. MESSAGE contains the reason.- UNREGISTERED: The file was removed from the table.- UNREGISTER_FAILED: The file couldn’t be removed from the table. MESSAGE contains the reason. |
| MESSAGE | TEXT | Message that accompanies the operation status; for example, the reason a file failed to register. |
| FILE_SIZE | NUMBER | Size of the file, in bytes. |
| ROW_COUNT | NUMBER | Number of rows in the file. |
| LAST_MODIFIED | TIMESTAMP_LTZ | Time when the file was last modified in cloud storage. |
Usage notes¶
-
This function only works with Parquet Direct tables (tables that use a catalog integration with
TABLE_FORMAT = NONEorTABLE_FORMAT = HIVE). -
Snowflake retains file registration history for Parquet Direct tables for 65 days.
-
When you call an Information Schema table function, the session must have an Information Schema in use, or the function name must be fully qualified. For more information, see Snowflake Information Schema.
-
To call this function, use a role that has any privilege on the table.
Examples¶
Retrieve the file registration history for the table my_parquet_table for the last day:
Find files that have an error message, which can indicate a failed registration: