I have csv file that has the following data:
"1","\\N","b"
"2","a","\\N"
I’m using the following copy command to load this CSV file into Vertica. How can I make the \\N value be NULL when the data is inserted into Vertica. When I try, the data is created as \N:
Code: Select all
dbadmin=> \! cat /home/dbadmin/test1.csv
"1","\\N","b"
"2","a","\\N"
dbadmin=> copy test1 from '/home/dbadmin/test1.csv' delimiter ',' null '\\N' enclosed '"';
Rows Loaded
-------------
2
(1 row)
dbadmin=> select * from test1;
c1 | c2 | c3
----+----+----
1 | \N | b
2 | a | \N
(2 rows)