0
0
Snowflakecloud~20 mins

COPY INTO command in Snowflake - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Snowflake COPY INTO Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
service_behavior
intermediate
2:00remaining
What happens when you run this COPY INTO command in Snowflake?
Consider the following command that loads data from an external stage into a Snowflake table:

COPY INTO my_table FROM @my_stage FILE_FORMAT = (TYPE = 'CSV' FIELD_DELIMITER = ',' SKIP_HEADER = 1);

What is the expected behavior of this command?
Snowflake
COPY INTO my_table FROM @my_stage FILE_FORMAT = (TYPE = 'CSV' FIELD_DELIMITER = ',' SKIP_HEADER = 1);
AIt loads only the first CSV file from the stage into my_table, including the header line.
BIt loads all CSV files from the stage into my_table, skipping the first line of each file as header.
CIt loads all CSV files from the stage into my_table, including the header line of each file.
DIt deletes all data from my_table before loading the CSV files.
Attempts:
2 left
💡 Hint
Think about what SKIP_HEADER = 1 does in the file format options.
Configuration
intermediate
1:30remaining
Which COPY INTO command option controls how errors are handled during loading?
You want to load data into a Snowflake table but want to limit the number of errors allowed before the load fails. Which option in the COPY INTO command controls this behavior?
ASKIP_ERRORS
BMAX_ERRORS
CON_ERROR
DERROR_LIMIT
Attempts:
2 left
💡 Hint
Look for the option that specifies what to do when errors occur.
Architecture
advanced
2:00remaining
How does Snowflake handle parallel loading with COPY INTO from multiple files?
You have many files staged in an external location. When you run COPY INTO to load them into a table, how does Snowflake process these files?
ASnowflake loads multiple files in parallel to maximize throughput.
BSnowflake loads only the largest file and ignores the rest.
CSnowflake loads files sequentially, one after another, to maintain order.
DSnowflake merges all files into one before loading.
Attempts:
2 left
💡 Hint
Think about how cloud services optimize performance with many files.
security
advanced
1:30remaining
Which permission is required to run COPY INTO to load data into a table?
To successfully execute a COPY INTO command that loads data into a Snowflake table, which privilege must the user have?
AUSAGE on the stage and INSERT on the target table
BSELECT on the target table and USAGE on the database
COWNERSHIP on the stage only
DCREATE TABLE privilege
Attempts:
2 left
💡 Hint
Consider what is needed to read from the stage and write to the table.
Best Practice
expert
2:30remaining
What is the best practice to ensure idempotent data loading with COPY INTO?
You want to run COPY INTO multiple times without duplicating data in your Snowflake table. Which approach best ensures idempotent loading?
ALoad data directly into the target table multiple times.
BRun COPY INTO with TRUNCATE before loading to clear the table.
CUse ON_ERROR = CONTINUE to skip duplicates during load.
DUse a staging table and merge new data into the target table after loading.
Attempts:
2 left
💡 Hint
Think about how to avoid duplicates when loading data repeatedly.