LOAD_HISTORY Function
Description: The LOAD_HISTORY function is used to view the COPY job file import history of a table, with a retention period of 7 days. When executing, the Pipe uses load_history to avoid re-importing existing files, ensuring data uniqueness.
Syntax:
Parameters:
schema_name.table_name: Specifies the table for which to view the import history, in the formatschema_name.table_name.
Return Fields:
| Field | Type | Description |
|---|---|---|
file_path | STRING | Path of the imported file |
last_copy_time | TIMESTAMP | Time of the most recent import operation |
file_size | BIGINT | File size (bytes) |
status | STRING | Import status, LOADED indicates success, LOAD_FAILED indicates failure |
first_error_message | STRING | First error message encountered, NULL on success |
Examples:
Example 1: View all import history for a table
Example 2: View only successfully imported records
Example 3: View failed import records and error messages
Example 4: Filter by time range
