简体   繁体   English

AWS:从s3使用复制命令到redshift时未插入任何内容

[英]AWS : nothing inserted when use copy command from s3 to redshift

I have big data in s3 and have to move into redshift, and have one table in redshift. 我在s3中有大数据,必须进入redshift,并在redshift中有一张表。 Since I use python, I wrote python script and use psycopg2 to connect redshift. 由于我使用python,因此我编写了python脚本并使用psycopg2连接redshift。 I succeeded to connect to redshift, but I failed to insert data from s3 to redshift. 我已成功连接到redshift,但未能将数据从s3插入到redshift。 I checked dashboard in aws website and found that redshift received a query and it loads something, but it does not insert anything and the time consumed for this process is too long like over 3 minutes. 我在aws网站上检查了仪表板,发现redshift收到了一个查询并加载了一些内容,但未插入任何内容,此过程所花费的时间过长,超过3分钟。 There is no error log so I can't find what is the reason. 没有错误日志,所以我找不到原因。

Is there any possible cause for this? 有什么可能的原因吗?

EDIT added copy command I used. 编辑添加了我使用的复制命令。

copy table FROM 's3://example/2017/02/03/' access_key_id '' secret_access_key '' ignoreblanklines timeformat 'epochsecs' delimiter '\t';

尝试查询stl_load_errors表,该表具有有关数据加载错误的信息http://docs.aws.amazon.com/redshift/latest/dg/r_STL_LOAD_ERRORS.html

select * from stl_load_errors order by starttime desc limit 1

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM