nerdexam
Snowflake

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…

Data Movement

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)
  • A
    89% (34)
  • B
    3% (1)
  • C
    3% (1)
  • D
    5% (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

#VALIDATE function#Data Loading Errors#COPY INTO Command

Community Discussion

No community discussion yet for this question.

Full DEA-C02 Practice