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

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -