【发布时间】:2018-06-29 11:55:57
【问题描述】:
我正在尝试将数据从 S3 存储桶复制到 redshift,但是我收到 1204 错误代码“字符长度超过 DDL 长度”。
copy table_name from '[data source]'
access_key_id '[access key]'
secret_access_key '[secret access key]'
region 'us-east-1'
null as 'NA'
delimiter ','
removequotes;
错误发生在第一行,它试图将状态缩写“GA”放入使用数据类型 char(2) 定义的 data_state 列中。当我查询 stl_load_errors 表时,我得到以下结果:
line_number colname col_length type raw_field_value err_code err_reason
1 data_state 2 char GA 1204 Char length exceeds DDL length
据我所知,不应该超过长度,因为它是两个字符,并且设置为 char(2)。有谁知道是什么原因造成的?
【问题讨论】:
标签: amazon-web-services char amazon-redshift