Reputation: 43
Error when importing csv file to postgres database in AWS RDS:
Code:
COPY public."tableTest" FROM 'C:\Temp\tableTest.csv' DELIMITER ';' CSV HEADER ENCODING 'LATIN1';
Erro:
If I try to import it into my postgres on my desktop, it works. The error only happens in RDS and I am using the same database structure.
Upvotes: 0
Views: 293
Reputation: 43
I managed to import the .csv through the Windows terminal with the following command:
psql --host xxxxxxxxxxxx.us-east-1.rds.amazonaws.com --port 5432 --username postgres --dbname newDatabase -c "\copy public.tableTest FROM 'C:\Temp\tableTest.csv' DELIMITER ';' CSV HEADER ENCODING 'LATIN1';"
Upvotes: 1