Copy command from S3 to Redshift

0

I'm trying to copy the CSV file from S3 bucket to Redshift and these are the conditions using, IGNOREHEADER AS 1 delimiter ',' region as 'us-east-1' csv; even the table schema nd CSV file is having the same data without nulls, still facing errors as - Invalid digit, Value 'B', Pos 0, Type: Integer ,Invalid dateformat, Char length exceeded. These are the following Cols presenet in the data - Uploaddate,Batchid,Inventoryid,Itemtype,Model,Supplierid,Quantity,Unit,Costcenter,Inventorydate,Embodiedco2,Usageco2,Riskadjustment.

demandé il y a un an306 vues
1 réponse
0

Hi, At a guess i suspect that there may be hidden control characters in the csv file - these are making the csv look like the new line starts in the wrong place so messes up the parsing of the file. Has the file been copied back and forth between windows and linux maybe?

Can you open the file in an editor and check that the file does not have hidden characters in it?

AWS
répondu il y a un an

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions