How to import PostgreSQL data file into Amazon redshift
I am trying to import a PostgreSQL data file in Amazon redshift using my command line. I have imported the schema file, but I cannot import the data file. It looks like the data insertion at Amazon's redshift is slightly different.
I want to know all kinds of data file import in redshift using command line.
UPDATE
My data file looks like this:
COPY actor (actor_id, first_name, last_name, last_update) FROM stdin;
0 Chad Murazik 2014-12-03 10:54:44
1 Nelle Sauer 2014-12-03 10:54:44
2 Damien Ritchie 2014-12-03 10:54:44
3 Casimer Wiza 2014-12-03 10:54:44
4 Dana Crist 2014-12-03 10:54:44
....
I typed the following command from the CLI:
PGPASSWORD=**** psql -h testredshift.cudmvpnjzyyy.us-west-2.redshift.amazonaws.com -p 5439 -U abcd -d pagila -f /home/jamy/Desktop/pag_data.sql`
And then there was an error like:
ERROR: LOAD source is not supported. (Hint: Only S3 or DynamoDB or EMR based downloads allowed
+3
source to share
2 answers