ARA-C01 · Question #22
Consider the following COPY command which is loading data with CSV format into a Snowflake table from an internal stage through a data transformation query. This command results in the following error
The correct answer is C. The VALIDATION_MODE parameter does not support COPY statements that transform data. The VALIDATION_MODE parameter in Snowflake's COPY INTO command is used to validate data files before actually loading them - it returns errors without persisting data. However, VALIDATION_MODE has a key limitation: it does NOT support COPY statements that include a transformation
Question
Consider the following COPY command which is loading data with CSV format into a Snowflake table from an internal stage through a data transformation query. This command results in the following error:
SQL compilation error: invalid parameter 'validation_mode' Assuming the syntax is correct, what is the cause of this error?
Options
- AThe VALIDATION_MODE parameter supports COPY statements that load data from external
- BThe VALIDATION_MODE parameter does not support COPY statements with CSV file formats.
- CThe VALIDATION_MODE parameter does not support COPY statements that transform data
- DThe value return_all_errors of the option VALIDATION_MODE is causing a compilation error.
How the community answered
(59 responses)- A2% (1)
- B3% (2)
- C90% (53)
- D5% (3)
Explanation
The VALIDATION_MODE parameter in Snowflake's COPY INTO command is used to validate data files before actually loading them - it returns errors without persisting data. However, VALIDATION_MODE has a key limitation: it does NOT support COPY statements that include a transformation query (i.e., a SELECT statement in the COPY INTO syntax). When a transformation is present, Snowflake cannot validate the data in a dry-run fashion, so it raises 'invalid parameter validation_mode'. The error is not about CSV format or external vs. internal stages - it is specifically caused by the combination of VALIDATION_MODE and a data transformation query.
Topics
Community Discussion
No community discussion yet for this question.