Package io.deephaven.iceberg.util
Class IcebergCatalogAdapter
java.lang.Object
io.deephaven.iceberg.util.IcebergCatalogAdapter
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.iceberg.catalog.Catalogcatalog()Returns the underlying Icebergcatalogused by this adapter.createTable(@NotNull String tableIdentifier, @NotNull TableDefinition definition) Create a new Iceberg table in the catalog with the given table identifier and definition.createTable(@NotNull org.apache.iceberg.catalog.TableIdentifier tableIdentifier, @NotNull TableDefinition definition) Create a new Iceberg table in the catalog with the given table identifier and definition.List<org.apache.iceberg.catalog.Namespace>List allnamespacesin the catalog.List<org.apache.iceberg.catalog.Namespace>listNamespaces(@NotNull org.apache.iceberg.catalog.Namespace namespace) List allnamespacesin a given namespace.List<org.apache.iceberg.catalog.TableIdentifier>listTables(@NotNull org.apache.iceberg.catalog.Namespace namespace) List all Icebergtablesin a given namespace.loadTable(@NotNull org.apache.iceberg.catalog.TableIdentifier tableIdentifier) Load an Iceberg table from the catalog.Load an Iceberg table from the catalog.List allnamespacesin the catalog as a Deephaventable.namespaces(@NotNull String... namespace) List allnamespacesin a given namespace as a Deephaventable.namespaces(@NotNull org.apache.iceberg.catalog.Namespace namespace) List allnamespacesin a given namespace as a Deephaventable.tables(@NotNull org.apache.iceberg.catalog.Namespace namespace) List all Icebergtablesin a given namespace as a Deephaventable.
-
Method Details
-
listNamespaces
List allnamespacesin the catalog. This method is only supported if the catalog implementsSupportsNamespacesfor namespace discovery. SeeSupportsNamespaces.listNamespaces(Namespace).- Returns:
- A list of all namespaces.
-
listNamespaces
public List<org.apache.iceberg.catalog.Namespace> listNamespaces(@NotNull @NotNull org.apache.iceberg.catalog.Namespace namespace) List allnamespacesin a given namespace. This method is only supported if the catalog implementsSupportsNamespacesfor namespace discovery. SeeSupportsNamespaces.listNamespaces(Namespace).- Parameters:
namespace- The namespace to list namespaces in.- Returns:
- A list of all namespaces in the given namespace.
-
namespaces
List allnamespacesin the catalog as a Deephaventable. The resulting table will be static and contain the same information aslistNamespaces().- Returns:
- A
tableof all namespaces.
-
namespaces
List allnamespacesin a given namespace as a Deephaventable. The resulting table will be static and contain the same information aslistNamespaces(Namespace).- Returns:
- A
tableof all namespaces.
-
namespaces
List allnamespacesin a given namespace as a Deephaventable. The resulting table will be static and contain the same information aslistNamespaces(Namespace).- Returns:
- A
tableof all namespaces.
-
listTables
public List<org.apache.iceberg.catalog.TableIdentifier> listTables(@NotNull @NotNull org.apache.iceberg.catalog.Namespace namespace) List all Icebergtablesin a given namespace.- Parameters:
namespace- The namespace to list tables in.- Returns:
- A list of all tables in the given namespace.
-
tables
List all Icebergtablesin a given namespace as a Deephaventable. The resulting table will be static and contain the same information aslistTables(Namespace).- Parameters:
namespace- The namespace from which to gather the tables- Returns:
- A list of all tables in the given namespace.
-
tables
-
loadTable
Load an Iceberg table from the catalog.- Parameters:
tableIdentifier- The identifier of the table to load.- Returns:
- The
table adapterfor the Iceberg table.
-
loadTable
public IcebergTableAdapter loadTable(@NotNull @NotNull org.apache.iceberg.catalog.TableIdentifier tableIdentifier) Load an Iceberg table from the catalog.- Parameters:
tableIdentifier- The identifier of the table to load.- Returns:
- The
table adapterfor the Iceberg table.
-
catalog
public org.apache.iceberg.catalog.Catalog catalog()Returns the underlying Icebergcatalogused by this adapter. -
createTable
public IcebergTableAdapter createTable(@NotNull @NotNull String tableIdentifier, @NotNull @NotNull TableDefinition definition) Create a new Iceberg table in the catalog with the given table identifier and definition.All columns of type
partitioningwill be used to create the partition spec for the table.- Parameters:
tableIdentifier- The identifier string of the new table.definition- TheTableDefinitionof the new table.- Returns:
- The
table adapterfor the new Iceberg table. - Throws:
org.apache.iceberg.exceptions.AlreadyExistsException- if the table already exists
-
createTable
public IcebergTableAdapter createTable(@NotNull @NotNull org.apache.iceberg.catalog.TableIdentifier tableIdentifier, @NotNull @NotNull TableDefinition definition) Create a new Iceberg table in the catalog with the given table identifier and definition.All columns of type
partitioningwill be used to create the partition spec for the table.- Parameters:
tableIdentifier- The identifier of the new table.definition- TheTableDefinitionof the new table.- Returns:
- The
table adapterfor the new Iceberg table. - Throws:
org.apache.iceberg.exceptions.AlreadyExistsException- if the table already exists
-