ExIceberg.Catalog behaviour (ExIceberg v0.2.0)
This module provides functions to interact with the catalog.
Usage Example
catalog = ExIceberg.Catalog.new("my_catalog", :rest, %{})
{:ok, catalog, _} = ExIceberg.Catalog.create_namespace(catalog, "my_namespace", %{})
{:ok, catalog, _} = ExIceberg.Catalog.list_namespaces(catalog)
As you see in the example above, you need to pass the reasign and pass the catalog to the next function.
Summary
Functions
Creates a new namespace in the catalog.
Drops a namespace from the catalog.
Lists the namespaces in the catalog.
Loads the metadata for a namespace in the catalog.
Checks if a namespace exists in the catalog.
Defines a catalog to be accessed by the client.
Updates the properties of a namespace in the catalog.
Types
Callbacks
create_namespace(t, t, map)
drop_namespace(t, t)
list_namespaces(t)
load_namespace_metadata(t, t)
namespace_exists?(t, t)
update_namespace_properties(t, t, list, map)
Functions
create_namespace(catalog, namespace, properties)
Creates a new namespace in the catalog.
Examples
iex> ExIceberg.Catalog.create_namespace(catalog, "my_namespace", %{})
{:ok, catalog, %{}}
drop_namespace(catalog, namespace)
Drops a namespace from the catalog.
Examples
iex> ExIceberg.Catalog.drop_namespace(catalog, "my_namespace")
{:ok, catalog, %{}}
list_namespaces(catalog)
Lists the namespaces in the catalog.
Examples
iex> ExIceberg.Catalog.list_namespaces(catalog)
{:ok, catalog, ["namespace1", "namespace2"]}
load_namespace_metadata(catalog, namespace)
Loads the metadata for a namespace in the catalog.
Examples
iex> ExIceberg.Catalog.load_namespace_metadata(catalog, "my_namespace")
{:ok, catalog, %{}}
namespace_exists?(catalog, namespace)
Checks if a namespace exists in the catalog.
Examples
iex> ExIceberg.Catalog.namespace_exists?(catalog, "my_namespace")
{:ok, catalog, true}
new(name, type, config)
Defines a catalog to be accessed by the client.
Examples
iex> ExIceberg.Catalog.new("my_catalog", :rest, %{})
%ExIceberg.Rest.Catalog{name: "my_catalog", config: %{}}
Catalog Types
:rest
- REST API catalog.
Configuration
The configuration for the catalog is specific to the catalog type.
update_namespace_properties(catalog, namespace, removals, updates)
Updates the properties of a namespace in the catalog.
Examples
iex> ExIceberg.Catalog.update_namespace_properties(catalog, "my_namespace", [], %{})
{:ok, catalog, %{}}