jeudi 15 mai 2014

Loading CSV data with NaN into AWS Redshift


Vote count:

0




I am trying to load a CSV file from AWS S3 into AWS Redshift. The CSV file contains a line like:


15,NaN,0


The table was created via:


CREATE TABLE foo (a INT, b DOUBLE PRECISION, c INT);


And I am trying to load the table using:


COPY foo (a, b, c) FROM "s3://" CREDENTIALS ... CSV;


And I get an error complaining that 'N' is not a number. Trying to load that same line via an INSERT statement manually works just fine:


INSERT INTO foo (a, b, c) VALUES (15, 'NaN', 0);


Any help would be much appreciated!



asked 31 secs ago






Aucun commentaire:

Enregistrer un commentaire