arrow-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Nugent <nug...@gmail.com>
Subject Re: Access to parquet elements in Row via Rust API
Date Wed, 18 Mar 2020 22:40:01 GMT
I believe the Rust API is still nascent. But you can get that by looking through the Metadata.
It’s a bit nastily nested though. The type descent path is File > ParquetMetaData >
RowGroupMetaData > ColumnChunkMetaData > ColumnDescriptor > &str

You are currently required to track the mappings between index and column name yourself.

-Dan Nugent
On Mar 18, 2020, 17:49 -0400, Sebastian Fischmeister <sfischme@uwaterloo.ca>, wrote:
> Hi,
>
> I'm trying to write a simple Rust program that accesses a parquet file, looks for some
values, and prints them.
>
> I took the example from [1] and can pick up individual column values in each row by directly
addressing them (e.g., record.get_long(147)) ). However, there are two problems with that:
>
> 1) It's unclear whether 147 is really the column I want to read.
> 2) If there's a change in the provided parquet file, all the absolute numbers may change.
>
> I was hoping that there's a way to address an element through a hashmap as in record.get("foo").
Does the Rust API currently support this?
>
> Thanks,
> Sebastian
>
> [1] https://docs.rs/parquet/0.16.0/parquet/file/index.html

Mime
View raw message