使用s3-dist-cp合并镶木地板文件

问题描述 投票:2回答:1

只是想知道是否可以使用s3-dist-cp工具来合并镶木地板文件(snappy压缩)。我尝试使用“--groupBy”和“--targetSize”选项,它确实将小文件合并为更大的文件。但我无法在Spark或AWS Athena中阅读它们。在aws athena我得到以下错误:

HIVE_CURSOR_ERROR: Expected 246379 values in column chunk at s3://tbw-analytics/parquet/auctions/region=us/year=2017/month=1/day=1/output123 offset 4 but got 247604 values instead over 1 pages ending at file offset 39

This query ran against the "beeswaxauctionlogdatabase" database, unless qualified by the query. Please post the error message on our forum or contact customer support with Query Id: 4ff77c55-3b69-414d-8fd9-a3d135f5ff2f.

任何帮助表示赞赏。

emr parquet s3distcp
1个回答
3
投票

镶木地板文件具有重要的结构。 This page详细介绍了它,但结果是元数据像zip文件一样存储在最后,并且连接Parquet文件会破坏它们。要合并Parquet文件,您需要使用像Spark这样理解Parquet文件格式的东西。

© www.soinside.com 2019 - 2024. All rights reserved.