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.

已提問 1 年前檢視次數 306 次
1 個回答
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
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南