API reference
The iceberg package, from iceberg 0.8.6, as published on mojoshelf (commit ec4f4e07605b), by mojo doc from Mojo 1.2.0.
Source.
Native Apache Iceberg: metadata, planning, and rows — the iceberg package of iceberg.mojo.
Part of magmalake: data lake building blocks in Mojo.
from iceberg.catalog.filesystem import Table
def main() raises:
var t = Table.load_local("/warehouse/db/orders")
var rows = t.scan().filter('[">","id",2]').to_table()
print(rows.to_csv())
Reads format versions 1, 2 and 3, and tolerates the parts of v4 the spec already tells readers to tolerate: metadata, snapshots, partition transforms, expressions, manifests, scan planning, Puffin deletion vectors, and the data files themselves — over local files, S3, GCS, Azure or HTTP, from a filesystem layout or a live REST catalog.
Writes v2 and v3: create_table, append, delete_where (copy-on-write, or
merge-on-read with deletion vectors on v3 and position delete files on v2),
delete_by_equality, overwrite, dynamic_partition_overwrite and
expire_snapshots, each committed optimistically against a filesystem layout
or a REST catalog — and schema changes (UpdateSchema: add, rename, make
optional, widen) through the same commit paths.
Modules
-
iceberg.appendFast append: new data files, a new manifest, a new snapshot. 1 struct · 4 functions -
iceberg.batchBuilding an ArrowRecordBatchfrom Mojo values. 2 structs · 8 functions -
iceberg.catalogCatalogs: how a table name becomes aTableMetadata. -
iceberg.catalog.filesystemFilesystem tables: a table is a directory, no catalog service involved. 3 structs · 5 functions -
iceberg.catalog.restIceberg REST catalog — URLs, headers, responses, and the socket. 4 structs · 4 functions -
iceberg.catalog.sqlA JDBC-style SQL catalog, over sqlite.mojo or postgres.mojo — the schema and semantics PyIceberg'sSqlCataloguses. 2 structs -
iceberg.commitA snapshot that adds and removes files, with the manifest maintenance that implies. 1 struct · 1 function -
iceberg.deleteRow-level delete and overwrite: which rows go, and how they are recorded. 1 struct · 14 functions -
iceberg.expressionsRow filters: unbound and bound predicates, binding, projection, evaluators. 7 structs · 9 functions -
iceberg.ioFile access: locations in, bytes out — over local files, S3, GCS, Azure or plain HTTP. 1 struct · 5 functions -
iceberg.jsonA small, dependency-free JSON reader/writer for Iceberg metadata. 2 structs · 7 functions -
iceberg.kernelsColumnar kernels: the Arrow arrays a scan produces, without aDatumin sight. 33 functions -
iceberg.maintainExpiring snapshots, and deleting the files that nothing points at any more. 1 struct · 3 functions -
iceberg.manifestManifest lists and manifests, read through avro.mojo. 5 structs · 12 functions -
iceberg.manifest_writeWriting manifests and manifest lists. 2 structs · 13 functions -
iceberg.metadataTableMetadata— the whole of an Iceberg*.metadata.json, v1 through v3. 9 structs -
iceberg.nestedNested columns — struct, list and map — as Arrow trees. 2 structs · 17 functions -
iceberg.puffinPuffin files: the sidecar format Iceberg keeps deletion vectors and sketches in. 3 structs · 4 functions -
iceberg.readReading rows:TableScan.to_table()andto_batches(). 5 structs · 9 functions -
iceberg.scanScan planning: which data files a query must read, and which deletes apply. 3 structs -
iceberg.schemaSchema— an Iceberg struct type with a schema id and identifier fields. 2 structs -
iceberg.transformsPartition transforms and partition specs. 5 structs · 6 functions -
iceberg.typesIceberg data types — primitives, nested types, and their JSON forms. 3 structs · 3 functions -
iceberg.update_schemaSchema evolution: add columns, rename them, make them optional, widen them. 2 structs · 2 functions -
iceberg.utilThe three things a writer needs from outside itself: the wall clock, a random 64-bit number, and a UUID. 5 functions -
iceberg.valuesTyped single values (Datum) and Iceberg's two single-value encodings. 1 struct · 22 functions -
iceberg.writeWriting data files: Arrow in, Parquet out, aDataFilerecord back. 1 struct · 11 functions