我正在尝试将 lzop 压缩文件从 S3 复制到 Redshift。该文件最初是通过使用带有--outputCodec lzo
选项的 S3DistCp 生成的。
S3 文件似乎被正确压缩,因为我可以在命令行成功下载并膨胀它:
lzop -d downloaded_file.lzo
但是当我尝试将其加载到 Redshift 中时,出现错误:
COPY atomic.events FROM 's3://path-to/bucket/' CREDENTIALS 'aws_access_key_id=xxx;aws_secret_access_key=xxx' REGION AS 'eu-west-1' DELIMITER '\t' MAXERROR 1 EMPTYASNULL FILLRECORD TRUNCATECOLUMNS TIMEFORMAT 'auto' ACCEPTINVCHARS LZOP;
ERROR: failed to inflate with lzop: unexpected end of file.
DETAIL:
-----------------------------------------------
error: failed to inflate with lzop: unexpected end of file.
code: 9001
context: S3 key being read : s3://path-to/bucket/
query: 244
location: table_s3_scanner.cpp:348
process: query0_60 [pid=5615]
-----------------------------------------------
关于可能导致负载失败的任何想法?