Reputation: 1
Attempting to use pgloader and the file has some rows with \N which need to rendered as NULL.
This is what i have but it fails?
LOAD COPY
FROM '/mnt/adhoc/data.cpy'
INTO postgresql://postgres:postgres@localhost:5432/postgres?data_tab
WITH
NULL AS '\N'
Fails with:
At
WITH
NULL AS '\N'
^ (Line 5, Column 5, Position 160)
In context OPTION-NULL:
While parsing DOUBLE-QUOTED-STRING. Expected:
the character " (QUOTATION_MARK)
While parsing SINGLE-QUOTED-STRING. Expected:
the character ' (APOSTROPHE)
While parsing IGNORE-WHITESPACE. Expected:
the character Tab
or the character Newline
or the character Return
or the character Space
or the string "--"
or the string "/*"
Expecting all references of \N in the file to be treated as NULL
Upvotes: 0
Views: 28