I am trying to copy the contents of a dat file to a table in PostgreSQL but getting errors. The dat file has the following:
1,'"{{text}}","{{NoName}}":"{test},{OneName}:{test}"'
Table Schema:
Create Table TestInfo (ID int, TestValues text);
I run the following query:
COPY Test from '/opt/Data/TestInfo.dat' WITH DELIMITER AS ',' NULL AS '';
but get the following error
ERROR: extra data after last expected column
Even tried
COPY Test from '/opt/Data/TestInfo.dat' WITH DELIMITER AS ',' csv;
still the same error.... Can some one please help me getting the contents of the dat file copied to the DB?
Thanks