Bulk Insert
Translation reference for the Bulk Insert statement.
Last updated
Translation reference for the Bulk Insert statement.
Last updated
The direct translation for is the Snowflake statement. The COPY INTO
does not use directly the file path to retrieve the values. The file should exist before in a . Also the options used in the BULK INSERT
should be specified in a Snowflake that will be consumed by the STAGE
or directly by the COPY INTO
.
To add a file to some STAGE
you should use the command. Notice that the command can be executed only from the . Here is an example of the steps we should do before executing a COPY INTO
:
As you see in the code above, SnowConvert identifies all the BULK INSERTS
in the code, and for each instance, a new STAGE
and FILE FORMAT
will be created before the copy into execution. In addition, after the creation of the STAGE
, a PUT
command will be created as well in order to add the file to the stage.
The names of the generated statements are auto-generated using the current timestamp in seconds, in order to avoid collisions between their usages.
SQL Server
Snowflake
FORMAT
TYPE
FIELDTERMINATOR
FIELD_DELIMITER
FIRSTROW
SKIP_HEADER
ROWTERMINATOR
RECORD_DELIMITER
FIELDQUOTE
FIELD_OPTIONALLY_ENCLOSED_BY
Finally, all the options for the bulk insert are being mapped to file format options if apply. If the option is not supported in Snowflake, it will be commented and a warning will be added. See also .
: PUT STATEMENT IS NOT SUPPORTED ON WEB UI.