I am trying to upload a large amount of dummy data into my pgadmin tables. I was able to use a csv for the smaller tables however I have a larger spreadsheet of data that includes descriptions (with punctuation marks like {'`, which could be causing the upload problem).
I am getting the below error message but I am unable to figure out what it means. I have went through the large bodies of text to remove any marks I think may have been causing it but I am still getting the same error.
Is there a better way to do this as the import tool seems to have a lot of bugs?
"C:\\Program Files (x86)\\pgAdmin 4\\v4\\runtime\\psql.exe" --command " "\\copy public.\"marineLifes\" (\"marineLifeID\", \"marineTypeID\", \"marineName\", \"marineDescription\") FROM 'C:/Users/JAMESG~1/Desktop/MARINE~1.CSV' CSV QUOTE '\"' ESCAPE '''';"" 1 Answer
If you have a proper CSV file, with header row matching fields in existing table, you can import it this way:
Open your CSV file in text editor
Add this line as first line in file, just above header:
COPY public."marineLifes" FROM STDIN WITH (FORMAT CSV, HEADER ON) - Add this line (consisting only of COPY terminator) as the last line, just after last row:
\. Save the file as
tmp.sql.Run the file with
psql:
C:\...\psql.exe -f C:\...\tmp.sql