0
0
Snowflakecloud~10 mins

Handling load errors in Snowflake - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to specify the error file location in the COPY INTO command.

Snowflake
COPY INTO my_table FROM @my_stage FILE_FORMAT = (TYPE = 'CSV') ON_ERROR = 'skip_file' ERROR_FILE = '[1]';
Drag options to blanks, or click blank then click option'
A'@my_stage/data_files/'
B'@my_stage/error_files/'
C'@my_stage/load_files/'
D'@my_stage/archive/'
Attempts:
3 left
💡 Hint
Common Mistakes
Using the data files folder instead of the error files folder.
Omitting quotes around the path.
Specifying a non-existent folder.
2fill in blank
medium

Complete the code to set the ON_ERROR behavior to continue loading despite errors.

Snowflake
COPY INTO my_table FROM @my_stage FILE_FORMAT = (TYPE = 'CSV') ON_ERROR = '[1]';
Drag options to blanks, or click blank then click option'
Acontinue
Babort_statement
Cskip_file
Dskip_file_num
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'abort_statement' which stops the load on error.
Confusing 'skip_file' with 'continue'.
Using an invalid ON_ERROR value.
3fill in blank
hard

Fix the error in the COPY INTO command to properly handle load errors by skipping bad rows.

Snowflake
COPY INTO my_table FROM @my_stage FILE_FORMAT = (TYPE = 'CSV') ON_ERROR = '[1]';
Drag options to blanks, or click blank then click option'
Askip_row
Bskip_file
Ccontinue
Dskip_file_num
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'skip_file' which skips entire files instead of rows.
Using 'continue' which ignores errors but does not limit skipped rows.
Using a non-existent option like 'skip_row'.
4fill in blank
hard

Fill both blanks to configure the COPY INTO command to log errors and skip the first 5 bad rows.

Snowflake
COPY INTO my_table FROM @my_stage FILE_FORMAT = (TYPE = 'CSV') ON_ERROR = '[1]' ERROR_LIMIT = [2];
Drag options to blanks, or click blank then click option'
Askip_file_num
B10
C5
Dcontinue
Attempts:
3 left
💡 Hint
Common Mistakes
Setting ERROR_LIMIT to a string instead of a number.
Using 'continue' instead of 'skip_file_num'.
Confusing ERROR_LIMIT with a file path.
5fill in blank
hard

Fill all three blanks to create a COPY INTO command that skips bad rows, logs errors to a specific path, and limits errors to 3.

Snowflake
COPY INTO my_table FROM @my_stage FILE_FORMAT = (TYPE = 'CSV') ON_ERROR = '[1]' ERROR_FILE = '[2]' ERROR_LIMIT = [3];
Drag options to blanks, or click blank then click option'
Askip_file_num
B'@my_stage/error_logs/'
C3
Dcontinue
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'continue' instead of 'skip_file_num'.
Not quoting the ERROR_FILE path.
Setting ERROR_LIMIT to a string instead of a number.