0

i am trying to load some csv data into monet db using csv bulk load command. Monet team providing below command to load the data by replacing null values with "" but its not working.

Copy into sys.test from path NULL as '';

table structure:

crate table sys.test(
id int,
name varchar(200))

Test data:

1|a
""|b
James Z
  • 12,209
  • 10
  • 24
  • 44

1 Answers1

0

Since you're using quotes in your input, you have to specify them on the COPY INTO query:

copy into sys.test from path using delimiters '|',E'\n','"' NULL as '';

The E'\n' is a string with C-style backslash escapes. The arguments of the using delimiters blurb are column separator, row separator, quote character.