A loaded Iceberg table: its metadata, scans and appends.
Table data crosses into and out of Elixir as an
Arrow IPC stream
binary. With the optional :explorer dependency, appends also take an
Explorer.DataFrame and to_dataframe/2 loads a scan.
A table value is a snapshot of the table's metadata at load or commit time;
refresh/2 reloads it. Every function but metadata/1 takes timeout:
(milliseconds, default :infinity).
Summary
Functions
Writes and commits data in one go: write_data_files/3, then
fast_append/3, taking both functions' options.
Commits data files to the table as a new append snapshot. If the table has
moved on since table was loaded, the commit is retried on the latest
metadata, as iceberg-rust's commit.retry.* table properties allow; when
many writers commit to one table at once, the retries can run out, and the
error is :catalog_commit_conflicts with retryable: true. With no rows
and no snapshot properties to add, the table is returned as it is.
The table's metadata in the Iceberg spec's JSON shape (string keys:
"format-version", "current-schema-id", "schemas", "partition-specs",
"current-snapshot-id", "snapshots" with their "summary", "properties", ...).
Reloads the table from its catalog.
Reads the table as an Arrow IPC stream.
Scans the table (see scan/2) into an Explorer.DataFrame.
Writes data as Parquet data files in the table's location, without
committing them. Columns are matched to the table's by name and cast to
their types; a missing optional column is written as nulls. Partitioned
tables get a file per partition.
Types
Functions
Writes and commits data in one go: write_data_files/3, then
fast_append/3, taking both functions' options.
@spec fast_append(t(), Iceberg.DataFiles.t() | [Iceberg.DataFiles.t()], keyword()) :: result(t())
Commits data files to the table as a new append snapshot. If the table has
moved on since table was loaded, the commit is retried on the latest
metadata, as iceberg-rust's commit.retry.* table properties allow; when
many writers commit to one table at once, the retries can run out, and the
error is :catalog_commit_conflicts with retryable: true. With no rows
and no snapshot properties to add, the table is returned as it is.
Options:
:snapshot_properties- extra entries for the snapshot's summary (not"operation", which the commit sets):check_duplicate- refuse files already in the table (defaulttrue):timeout
The table's metadata in the Iceberg spec's JSON shape (string keys:
"format-version", "current-schema-id", "schemas", "partition-specs",
"current-snapshot-id", "snapshots" with their "summary", "properties", ...).
Reloads the table from its catalog.
Reads the table as an Arrow IPC stream.
Options:
:select- column names (default: all):filter- a row filter, seeIceberg.Filter:snapshot_id- read this snapshot instead of the current one:batch_size- rows per Arrow record batch:case_sensitive- match column names case-sensitively (defaulttrue):timeout
@spec to_dataframe(t(), keyword()) :: result(Explorer.DataFrame.t())
Scans the table (see scan/2) into an Explorer.DataFrame.
@spec write_data_files(t(), data(), keyword()) :: result(Iceberg.DataFiles.t())
Writes data as Parquet data files in the table's location, without
committing them. Columns are matched to the table's by name and cast to
their types; a missing optional column is written as nulls. Partitioned
tables get a file per partition.
Options:
:file_prefix- the data files' name prefix (default: a random UUID). Files are named<prefix>-<n>.parquet, so a retry with the same prefix overwrites the files of an attempt that never committed.:properties-write.*table properties to override for this write, such as"write.parquet.compression-codec"or"write.target-file-size-bytes":timeout