Error: while Importing data into Redshift

只谈情不闲聊 提交于 2019-12-08 05:20:42

问题


I wanted to unload from one database(production) and reload into another database(QA) in Redshift having exact same schema.

I issued S3 load command as following.

copy table(col1,col2,col3,col4) from 's3://<bucket_path>/<file_name>.gzip' CREDENTIALS 'aws_access_key_id=<your_key>;aws_secret_access_key=<your_secret>'  delimiter '|' gzip NULL AS 'null_string';

Got following error.

ERROR: Failed writing body (0 != XXX) Cause: Failed to inflateinvalid or incomplete deflate data. zlib error code: -3

  error:  Failed writing body (0 != XXX) Cause: Failed to inflateinvalid or incomplete deflate data. zlib error code: -3
  code:      9001
  context:   S3 key being read : s3://<some_s3_bucket>/<some_s3_bucket_file>
  query:     XXXXX
  location:  table_s3_scanner.cpp:355
  process:   query1_23 [pid=2008]
  -----------------------------------------------

回答1:


This happens when you are trying to use Gzip file during copy and it cannot read the file as a Gzip.

If I’ve made a bad assumption please comment and I’ll refocus my answer.



来源:https://stackoverflow.com/questions/45906216/error-while-importing-data-into-redshift

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!