Snowflake - Bulk load to table from stage action

Load a file from a Snowflake stage into a target table. This action uses the COPY command to load data directly from a stage to a target table. When working with internal stages, you should use this action together with "Bulk load to an internal stage".

This action will execute the load and wait for completion before moving onto the next step. Load time depends on the size of source file, number of columns, additional validation in the target table and network speed (faster if loading data from S3 to an AWS-deployed Snowflake instance). 1 GB CSV file with 30 columns and 3 million rows will take 60 seconds.

The source file can contain data in CSV format, JSON, PARQUET, and other semi-structured file types.

Input

Input fieldDescription
Table Select a target table to load data into. Typically, this is a staging table for loading data. Subsequently, rows in this table is merged into your production table.
Stage name

Select an existing stage in Snowflake. If a file is not specified in this stage, all new files will be loaded. If using an external stage, this external stage should contain information about file location, AWS credentials, encryption, and file format details.

Learn how to create an S3 external stage.

File name Specify a list of one or more file names (separated by commas) to be loaded. If left unspecified, all files from the stage will be loaded. Ensure that these files have already been staged in either the Snowflake internal or external. Learn more.
File Format Specify the file format you would like to apply to the data. By default, the Snowflake default format will be applied to the COPY command.

Output

Output fieldDescription
Source file nameRelative path and name of the source file. Sample Values:External Stage: s3://bucket-name/parent_folder/file_name.csv Internal Stage: @stage_name/folder/file_name.csv
Status
ValuesDescription
LOADEDAll rows successfully loaded.
LOAD FAILEDUnsuccessful load. Entire data file was not loaded.
PARTIALLY LOADEDUnsuccessful load. Data file was partially loaded. Use First error line to find out exactly where the load failed.
Rows parsedNumber of rows read from the source file.
Rows loadedNumber of rows successfully loaded from the source file into target table.
Error limitIf the number of errors reaches this limit, then abort the load. This is typically 0, meaning that the load will abort on the first error.
Errors seenNumber of rows with error in the source file.
First errorError details of the first error in the source file.
First error lineLine number of the first row that caused an error.
First error characterPosition of the first character that caused an error.
First error column nameColumn name where the first error occurred.

Last updated: