Copy CSV file into Snowflake, The data itself has commas

404

Keshava

posted on 16 Aug 19

Enjoy great content like this and a lot more !

Signup for a free account to write a post / comment / upvote posts. Its simple and takes less than 5 seconds




nVector18-Aug-19

Can you try enclosing the data in double quotes in the file? For example:

id,text1,text2
1,"1,2,3","cat"

and while running the copy command, use a file format like below,

// Create file format
create or replace file format CSV_SKIP_HEADER
type = 'CSV'
field_delimiter = ','
FIELD_OPTIONALLY_ENCLOSED_BY = '"'
skip_header = 1;