I'm trying to load a CSV in S3 onto Redshift. The data looks like this:
tweet_id,tweet_text,created_at,geo_lat,geo_long,user_id,screen_name,name,profile_image_url,is_rt
477097990809612288,RT @Sourpatchcam: Matthew espinosa is the reason I breath,2014-06-12 10:39:59,.00000,.00000,969145484,PerfectJvcob,PerfectJvcob || Bio,http://pbs.twimg.com/profile_images/477092469893382146/k1YAOGRf_normal.jpeg,True
477097991049064448,@ajama3 @SultansThrone @itsfuad Dont hold your breath.,2014-06-12 10:39:59,.00000,.00000,719529744,MareejoXaamud,¯\_(ツ)_/¯,http://pbs.twimg.com/profile_images/471392213906104321/VbyMbZ7e_normal.jpeg,False
I get this error:
Missing newline: Unexpected character 0x74 found at location 2
(Character 0x74 is t).
I tried removing the header row and I just got the unexpected character for "4." Do I need a /n in my source or something?
This can also be caused by NULL characters apparently
https://www.flydata.com/blog/handling-utf-8-characters-in-redshift/
You should remove the headers as headers are string and your actual columns might be integer, date decimal etc.
Try copy with below options to avoid special chars or escape etcs
ESCAPE ACCEPTINVCHARS
Check the extension for the CSV file in the path mentioned in FROM. It should ideally be file_name**.CSV**
It helped me to resolve the problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With