0
0
Snowflakecloud~10 mins

COPY INTO command 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 copy data from a stage into a table.

Snowflake
COPY INTO my_table FROM [1] FILE_FORMAT = (TYPE = 'CSV');
Drag options to blanks, or click blank then click option'
A'@my_stage/data/'
B'@my_table/data/'
C'my_database'
D'my_table'
Attempts:
3 left
💡 Hint
Common Mistakes
Using the table name as source instead of a stage path.
Forgetting the '@' symbol before the stage name.
2fill in blank
medium

Complete the code to specify the file format as JSON in the COPY INTO command.

Snowflake
COPY INTO my_table FROM '@my_stage/data/' FILE_FORMAT = (TYPE = [1]);
Drag options to blanks, or click blank then click option'
A'CSV'
B'JSON'
C'PARQUET'
D'XML'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'CSV' when the data is JSON.
Omitting quotes around the file format type.
3fill in blank
hard

Fix the error in the COPY INTO command by choosing the correct option for the file format option name.

Snowflake
COPY INTO my_table FROM '@my_stage/data/' [1] = (TYPE = 'CSV');
Drag options to blanks, or click blank then click option'
AFILE_FORMAT
BFORMAT_FILE
CFILETYPE
DDATA_FORMAT
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect option names like FORMAT_FILE or FILETYPE.
Misspelling the option name.
4fill in blank
hard

Fill both blanks to copy data from a stage and specify to skip the header row.

Snowflake
COPY INTO my_table FROM [1] FILE_FORMAT = (TYPE = 'CSV' [2] = 1);
Drag options to blanks, or click blank then click option'
A'@my_stage/data/'
BSKIP_HEADER
CHEADER_SKIP
D'my_table'
Attempts:
3 left
💡 Hint
Common Mistakes
Using the table name as source instead of the stage path.
Using incorrect option names like HEADER_SKIP.
5fill in blank
hard

Fill all three blanks to copy data from a stage, specify CSV format, and set the field delimiter to a semicolon.

Snowflake
COPY INTO my_table FROM [1] FILE_FORMAT = (TYPE = [2] FIELD_DELIMITER = [3]);
Drag options to blanks, or click blank then click option'
A'@my_stage/data/'
B'CSV'
C';'
D'JSON'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'JSON' instead of 'CSV' for the file format.
Forgetting quotes around the semicolon delimiter.