DEA-C02 · Question #110
What is the following SQL statement used for? Select * from table(validate(t1, job_id => '_last'));
The correct answer is A. To validate errors for the last load executed in the current session. VALIDATE(t1, job_id => '_last') is a Snowflake function that returns all errors generated during the most recent COPY INTO load for table t1 in the current session - making A correct, since '_last' is a special keyword meaning "the last load job." Option B is wrong because…
Question
What is the following SQL statement used for? Select * from table(validate(t1, job_id => '_last'));
Options
- ATo validate errors for the last load executed in the current session
- BTo validate a file for errors before it gets executed using the COPY command
- CTo validate external file tables
- DTo validate a task SQL statement
How the community answered
(38 responses)- A89% (34)
- B3% (1)
- C3% (1)
- D5% (2)
Explanation
VALIDATE(t1, job_id => '_last') is a Snowflake function that returns all errors generated during the most recent COPY INTO load for table t1 in the current session - making A correct, since '_last' is a special keyword meaning "the last load job." Option B is wrong because VALIDATE doesn't preview or pre-check files before loading; it inspects errors after a load has already run. Option C is wrong because VALIDATE targets COPY INTO load jobs on regular tables, not external table definitions. Option D is wrong because task SQL validation is a completely separate concept handled via SYSTEM$VALIDATE_PIPELINE_EMAIL or task creation syntax, not VALIDATE().
Memory tip: Think of '_last' as "last crime scene" - VALIDATE is the forensic tool you call after the COPY INTO "incident" to find out what went wrong.
Topics
Community Discussion
No community discussion yet for this question.