有没有办法在读取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

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)