I am trying to import this CSV file:
HEADER
"{
""field1"": ""123"",
""field2"": ""456""
}"
"{
""field1"": ""789"",
""field2"": ""101""
}"
into my Postgres table.
However, it seems that the \copy my_table(my_text) from 'my_file.csv' command is creating a row for each line of the file.
This is what I get :
my_text
-----------------------------------------------------
HEADER
"{
""field1"": ""123"",
""field2"": ""456""
}"
"{
""field1"": ""789"",
""field2"": ""101""
}"
(9 rows)
and what I expect:
{""field1"": ""123"", ""field2"": ""456""}
{""field1"": ""789"", ""field2"": ""101""}
(2 rows)