Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要使用 Parquet-mr 库在 Java 中以编程方式读取 Parquet 文件。我需要选择性地阅读几列并跳过其他列(例如,从 500 列中读取 3 列)。我似乎找不到任何关于如何做到这一点的文档。如果有的话,有人可以指点我吗?
不幸的是,这并没有很好地记录下来。您可以在此处查看一些示例。然而,这些使用 Parquet 中的 ExampleParquetWriter 类,该类仅用作示例。尽管如此,它仍然有效。
使用 Parquet 的正确方法是通过一种受支持的对象模型(如 Avro、Thrift 或 Protobuf)或实现您自己的对象模型(这会带来最佳性能)。您可以在此处阅读有关对象模型的更多信息。