Complete the code to load data from a file into a Snowflake table.
COPY INTO my_table FROM @my_stage/[1] FILE_FORMAT = (TYPE = 'CSV');
The COPY INTO command loads data from a file in the stage. The file name must be specified, here it is data.csv.
Complete the code to specify the file format for loading JSON data.
CREATE OR REPLACE FILE FORMAT my_json_format TYPE = '[1]';
The file format type must match the data format. For JSON data, use JSON.
Fix the error in the command to load data into the warehouse.
COPY INTO [1] FROM @my_stage FILE_FORMAT = (TYPE = 'CSV');
The COPY INTO command must specify the target table, not the stage or file name.
Fill both blanks to create a stage and load data from it.
CREATE OR REPLACE STAGE [1] URL='s3://mybucket/data/' FILE_FORMAT = (TYPE = '[2]');
The stage name is mystage and the file format type is CSV to match the data files.
Fill all three blanks to load data with error handling options.
COPY INTO [1] FROM @[2] FILE_FORMAT = (TYPE = 'CSV') ON_ERROR = '[3]';
The target table is my_table, the stage is mystage, and abort_statement stops loading on errors.