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.

posta un anno fa306 visualizzazioni
1 Risposta
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
con risposta un anno fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande