Importing Alexa data into Amazon RedShift -
i have taken daily dump file , unzipped , placed onto s3.
when try , copy statement in postgresql receiving following error
missing newline: unexpected character 0x14 found @ location 4
query:
copy temp 's3://bucket/top-1m.csv' credentials 'blah blah blah';
do have add kinda character each line?
raw data:
1,facebook.com 2,google.com 3,youtube.com 4,yahoo.com 5,amazon.com 6,baidu.com 7,wikipedia.org 8,live.com
the redshift copy command uses pipe '|' default delimiter character. if files delimited character (comma in case), need add delimiter keyword copy command.
copy temp 's3://bucket/top-1m.csv' credentials 'blah blah blah' delimiter ',';
or comma separated files:
copy temp 's3://bucket/top-1m.csv' credentials 'blah blah blah' csv;
Comments
Post a Comment