An Iceberg catalog: an Iceberg REST catalog, Amazon S3 Tables, or an in-memory catalog (for tests and local work).
{:ok, catalog} =
Iceberg.Catalog.new(:rest, %{
"uri" => "https://catalog.example.com",
"warehouse" => "analytics",
"token" => token,
"s3.region" => "eu-west-1"
})Properties are iceberg-rust's, as string keys and values: the catalog's own
(uri, warehouse, token, credential, table_bucket_arn, ...) and the
storage's (s3.endpoint, s3.access-key-id, s3.path-style-access, ...).
The memory catalog takes warehouse, such as "file:///tmp/warehouse".
A namespace is a string (one level) or a list of levels. Every function
takes timeout: (milliseconds, default :infinity).
Summary
Functions
Creates a table. schema is in the spec's JSON shape, as built by
Iceberg.Schema.new/1.
Drops a table from the catalog, leaving its files.
The namespace's properties.
The namespaces under parent (top-level ones by default), as lists of levels.
The names of the tables in a namespace.
Connects to a catalog of kind (:rest, :s3tables or :memory).
Types
Functions
@spec create_namespace(t(), namespace(), map(), keyword()) :: :ok | {:error, Iceberg.Error.t()}
Creates a table. schema is in the spec's JSON shape, as built by
Iceberg.Schema.new/1.
Options:
:partition_by- partition fields, each a source column name (identity) or{column, transform}/{column, transform, name}, where transform is:identity,:year,:month,:day,:hour,:void,{:bucket, n}or{:truncate, width}:properties- table properties:location- the table's location (default: chosen by the catalog):format_version- 1, 2 (default) or 3:timeout
@spec drop_namespace(t(), namespace(), keyword()) :: :ok | {:error, Iceberg.Error.t()}
@spec drop_table(t(), namespace(), String.t(), keyword()) :: :ok | {:error, Iceberg.Error.t()}
Drops a table from the catalog, leaving its files.
The namespace's properties.
The namespaces under parent (top-level ones by default), as lists of levels.
The names of the tables in a namespace.
Connects to a catalog of kind (:rest, :s3tables or :memory).
Options: :name (the catalog's name, default "iceberg") and :timeout.