错误:将数据导入Redshift时 [英] Error: while Importing data into Redshift

查看:169
本文介绍了错误:将数据导入Redshift时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从Redshift中使用完全相同的架构从一个数据库(生产)中卸载,然后重新加载到另一个数据库(QA)中.

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

我发出了以下S3加载命令.

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';

出现以下错误.

  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]
  -----------------------------------------------

推荐答案

在复制期间尝试使用Gzip文件并且它无法以Gzip格式读取文件时会发生这种情况.

如果我做出了错误的假设,请发表评论,然后重新调整答案.

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.

这篇关于错误:将数据导入Redshift时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆