SOL-C01 · Question #171
You are using Snowsight to load data into a Snowflake table 'PRODUCT DATA' from a CSV file stored in an internal stage. The CSV file contains a column named 'PRICE' which represents product prices. Ho
Sign in or unlock SOL-C01 to reveal the answer and full explanation for question #171. The question stem and answer options stay visible for context.
Question
You are using Snowsight to load data into a Snowflake table 'PRODUCT DATA' from a CSV file stored in an internal stage. The CSV file contains a column named 'PRICE' which represents product prices. However, some rows in the CSV file contain invalid price values (e.g., non- numeric characters, empty strings). You want to ensure that only valid numeric price values are loaded into the 'PRODUCT DATA' table, and invalid values should be replaced with a default value of 0. Which of the following combinations of options within the 'COPY INTO' statement, including functions and file format parameters, would BEST achieve this data cleansing and loading requirement?
Options
- AUse the 'VALIDATE function to identify invalid rows before loading and then manually correct the
- BDefine a file format with 'ON_ERROR = SKIP_FILE' to skip files containing invalid price values.
- CUse the 'TO NUMBER function with the DEFAULT option in the `COPY INTO' statement's
- DUse the 'TRY TO NUMBER function in the COPY INTO' statement's 'SELECT' clause to convert
- EDefine a file format with 'ON_ERROR = ABORT_STATEMENT to abort the COPY INTO statement
Unlock SOL-C01 to see the answer
You've previewed enough free SOL-C01 questions. Unlock SOL-C01 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.