- I have a .csv table (t1) with columns: c1, c2, c3 in amazon S3 storage
- I want to copy that into amazon redshift
- I create the table with columns: c1, c2, c3 where all columns are nullable
I copy with command:
copy t1a (c1,c3) from t1
I expected it would copy c1 and c3 over from t1 and place the default null value in c2 so a row in t1a might look like (c1_rowX, null, c3_rowX).
Instead I get a type error because it's coping c2 (string type) data from t1 into c3 (int type) of t1a.
the copy command works fine when I don't specify the columns:
copy t1a from t1
I've included a link to the redshift copy command documentation:
http://docs.aws.amazon.com/redshift/latest/dg/r_COPY.html
- main question is there an issue with my use of specifying columns. thanks