有没有办法在读取json gzip压缩文件时忽略清单文件

我正在尝试在s3存储桶顶部创建外部表,其中存储桶具有清单文件和gzip json文件。我使用下面的命令来读取文件,其目的是忽略清单文件的读取,而只是读取压缩的内容。

CREATE EXTERNAL TABLE
    external_schema.external_test_table (
        id VARCHAR(40),name VARCHAR(512),summary VARCHAR(512),description VARCHAR(16) 
    )
ROW FORMAT SERDE
    'org.openx.data.jsonserde.JsonSerDe'
WITH SERDEPROPERTIES (
    'ignore.malformed.json' = 'true'
)
STORED AS INPUTFORMAT
    'org.apache.hadoop.mapred.TextInputFormat'
OUTPUTFORMAT
    'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
LOCATION
    's3://my-bucket-location'
TABLE PROPERTIES (
    'compression_type' = 'gzip','typeOfData' = 'file','classification' = 'json'
);

阅读时出现错误消息

error:  Spectrum Scan Error
  code:      15001
  context:   Gzip Data error,likely data corrupted in this block.
Gzip Data error,likely data corrupted in this block.file=https://s3-file-location
iCMS 回答:有没有办法在读取json gzip压缩文件时忽略清单文件

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/1590913.html

大家都在问