我将表格从一种格式转换为另一种格式,从未压缩格式转换为压缩格式(Snappy、Gzip 等)。
我想我可以依赖 describe [formatted|extended] tblname
直到我读到这篇文章。 DESCRIBE Statement
它说
The Compressed field is not a reliable indicator of whether the table contains compressed data. It typically always shows No, because the compression settings only apply during the session that loads data and are not stored persistently with the table metadata.
我如何知道一个表是否被压缩以及使用了什么编解码器?我不介意使用 Spark 获取该信息。
最佳答案
回答我的问题:
对于 Avro 数据文件:avro-tools getmeta filename
对于 Parquet 数据文件:parquet-tools 元文件名
关于apache-spark - 查找 Hive/Impala 表的压缩详细信息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48381794/