API reference
The parquet package, from parquet 0.11.7, as published on mojoshelf (commit c15f51aee06c), by mojo doc from Mojo 1.2.0.
Source.
parquet.mojo — Apache Parquet in pure Mojo.
Part of magmalake: data lake building blocks in Mojo.
from parquet import ParquetReader
var r = ParquetReader.open("part-0.parquet")
var t = r.read_table()
for i in range(t.num_columns()):
print(t.name(i), String(t.type(i)))
The Arrow side — ArrayData, ArrayArena, RecordBatch and the C Data
Interface — is arrow-mlake.mojo, and is re-exported here so that
from parquet.arrow import ArrayData and from parquet import RecordBatch
keep resolving. Metadata comes from thrift.mojo, page CRC32s from
hashes.mojo, Snappy from snappy.mojo and the DEFLATE half of GZIP from
deflate.mojo — all pure Mojo and all consumed by source path. ZSTD and
LZ4 need parquet_full, which pulls in the two FFI tins.
Modules
-
parquet.alpALP — Adaptive Lossless floating-Point, Parquet encoding 10. 1 function -
parquet.arrowCompatibility re-export. The Arrow layer lives inarrow-mlake.mojonow. -
parquet.assembleDremel record assembly: definition and repetition levels back into Arrow. 1 struct · 3 functions -
parquet.bitioBit-level readers: little-endian bit packing and the RLE/bit-packed hybrid. 3 structs · 10 functions -
parquet.bloomSplit-block bloom filters —might_containfor equality predicates. 1 struct · 1 function -
parquet.carrowCompatibility re-export. The C Data Interface export lives inarrow-mlake.mojonow — seeparquet.arrowfor why. -
parquet.carrow_importCompatibility re-export. The C Data Interface import lives inarrow-mlake.mojonow — seeparquet.arrowfor why. -
parquet.codecPage compression codecs. 1 struct · 1 trait · 8 functions -
parquet.convertPhysical Parquet values to Arrow buffers. 3 functions -
parquet.displayHuman- and JSON-readable rendering of decoded Arrow arrays, for the CLI. 6 functions -
parquet.encodingValue encodings: PLAIN, dictionaries, the DELTA family, BYTE_STREAM_SPLIT. 1 struct · 14 functions -
parquet.pagePage decoding: headers, compression, levels, and the values inside. 2 structs · 3 functions -
parquet.readerParquetReader— open a file, pick columns and row groups, read batches. 3 structs · 4 functions -
parquet.rle_encodeEncoders for the two bit-level formats a Parquet writer needs. 1 struct · 3 functions -
parquet.schemaThe Parquet schema tree, its leaf columns, and the Arrow schema it means. 4 structs · 2 functions -
parquet.statsColumn statistics, decoded from their raw bytes to typed values. 2 structs · 4 functions -
parquet.writerParquetWriter— write Arrow arrays back out as a Parquet file. 7 structs · 10 functions