Package io.deephaven.iceberg.util
Class IcebergCatalogAdapter
java.lang.Object
io.deephaven.iceberg.util.IcebergCatalogAdapter
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.iceberg.catalog.Catalog
catalog()
Returns the underlying Icebergcatalog
used by this adapter.org.apache.iceberg.io.FileIO
fileIO()
Returns the underlying IcebergFileIO
used by this adapter.getTableDefinition
(@NotNull String tableIdentifier, long snapshotId, @Nullable IcebergInstructions instructions) Returntable definition
for a given Iceberg table and snapshot id, with optional instructions for customizations while reading.getTableDefinition
(@NotNull String tableIdentifier, @Nullable IcebergInstructions instructions) Returntable definition
for a given Iceberg table, with optional instructions for customizations while reading.getTableDefinition
(@NotNull org.apache.iceberg.catalog.TableIdentifier tableIdentifier, @Nullable IcebergInstructions instructions) Returntable definition
for a given Iceberg table, with optional instructions for customizations while reading.getTableDefinition
(@NotNull org.apache.iceberg.catalog.TableIdentifier tableIdentifier, @Nullable org.apache.iceberg.Snapshot tableSnapshot, @Nullable IcebergInstructions instructions) Returntable definition
for a given Iceberg table and snapshot id, with optional instructions for customizations while reading.getTableDefinitionTable
(@NotNull String tableIdentifier, long snapshotId, @Nullable IcebergInstructions instructions) Returntable
containing thedefinition
of a given Iceberg table and snapshot id, with optional instructions for customizations while reading.getTableDefinitionTable
(@NotNull String tableIdentifier, @Nullable IcebergInstructions instructions) Returntable
containing thedefinition
of a given Iceberg table, with optional instructions for customizations while reading.getTableDefinitionTable
(@NotNull org.apache.iceberg.catalog.TableIdentifier tableIdentifier, @Nullable IcebergInstructions instructions) Returntable
containing thedefinition
of a given Iceberg table, with optional instructions for customizations while reading.getTableDefinitionTable
(@NotNull org.apache.iceberg.catalog.TableIdentifier tableIdentifier, @Nullable org.apache.iceberg.Snapshot tableSnapshot, @Nullable IcebergInstructions instructions) Returntable
containing thedefinition
of a given Iceberg table and snapshot id, with optional instructions for customizations while reading.List<org.apache.iceberg.catalog.Namespace>
List allnamespaces
in the catalog.List<org.apache.iceberg.catalog.Namespace>
listNamespaces
(@NotNull org.apache.iceberg.catalog.Namespace namespace) List allnamespaces
in a given namespace.List allnamespaces
in the catalog as a Deephaventable
.listNamespacesAsTable
(@NotNull String... namespace) List allnamespaces
in a given namespace as a Deephaventable
.listNamespacesAsTable
(@NotNull org.apache.iceberg.catalog.Namespace namespace) List allnamespaces
in a given namespace as a Deephaventable
.List<org.apache.iceberg.Snapshot>
listSnapshots
(@NotNull org.apache.iceberg.catalog.TableIdentifier tableIdentifier) List allsnapshots
of a given Iceberg table.listSnapshotsAsTable
(@NotNull String tableIdentifier) List allsnapshots
of a given Iceberg table as a Deephaventable
.listSnapshotsAsTable
(@NotNull org.apache.iceberg.catalog.TableIdentifier tableIdentifier) List allsnapshots
of a given Iceberg table as a Deephaventable
.List<org.apache.iceberg.catalog.TableIdentifier>
listTables
(@NotNull org.apache.iceberg.catalog.Namespace namespace) List all Icebergtables
in a given namespace.listTablesAsTable
(@NotNull String... namespace) listTablesAsTable
(@NotNull org.apache.iceberg.catalog.Namespace namespace) List all Icebergtables
in a given namespace as a Deephaventable
.readTable
(@NotNull String tableIdentifier, long tableSnapshotId, @Nullable IcebergInstructions instructions) Read a static snapshot of an Iceberg table from the Iceberg catalog.readTable
(@NotNull String tableIdentifier, @Nullable IcebergInstructions instructions) Read the latest static snapshot of an Iceberg table from the Iceberg catalog.readTable
(@NotNull org.apache.iceberg.catalog.TableIdentifier tableIdentifier, long tableSnapshotId, @Nullable IcebergInstructions instructions) Read a static snapshot of an Iceberg table from the Iceberg catalog.readTable
(@NotNull org.apache.iceberg.catalog.TableIdentifier tableIdentifier, @NotNull org.apache.iceberg.Snapshot tableSnapshot, @Nullable IcebergInstructions instructions) Read a static snapshot of an Iceberg table from the Iceberg catalog.readTable
(@NotNull org.apache.iceberg.catalog.TableIdentifier tableIdentifier, @Nullable IcebergInstructions instructions) Read the latest static snapshot of an Iceberg table from the Iceberg catalog.
-
Method Details
-
listNamespaces
List allnamespaces
in the catalog. This method is only supported if the catalog implementsSupportsNamespaces
for 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 allnamespaces
in a given namespace. This method is only supported if the catalog implementsSupportsNamespaces
for namespace discovery. SeeSupportsNamespaces.listNamespaces(Namespace)
.- Parameters:
namespace
- The namespace to list namespaces in.- Returns:
- A list of all namespaces in the given namespace.
-
listNamespacesAsTable
List allnamespaces
in the catalog as a Deephaventable
. The resulting table will be static and contain the same information aslistNamespaces()
.- Returns:
- A
table
of all namespaces.
-
listNamespacesAsTable
public Table listNamespacesAsTable(@NotNull @NotNull org.apache.iceberg.catalog.Namespace namespace) List allnamespaces
in a given namespace as a Deephaventable
. The resulting table will be static and contain the same information aslistNamespaces(Namespace)
.- Returns:
- A
table
of all namespaces.
-
listNamespacesAsTable
List allnamespaces
in a given namespace as a Deephaventable
. The resulting table will be static and contain the same information aslistNamespaces(Namespace)
.- Returns:
- A
table
of all namespaces.
-
listTables
public List<org.apache.iceberg.catalog.TableIdentifier> listTables(@NotNull @NotNull org.apache.iceberg.catalog.Namespace namespace) List all Icebergtables
in a given namespace.- Parameters:
namespace
- The namespace to list tables in.- Returns:
- A list of all tables in the given namespace.
-
listTablesAsTable
List all Icebergtables
in 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.
-
listTablesAsTable
-
listSnapshots
public List<org.apache.iceberg.Snapshot> listSnapshots(@NotNull @NotNull org.apache.iceberg.catalog.TableIdentifier tableIdentifier) List allsnapshots
of a given Iceberg table.- Parameters:
tableIdentifier
- The identifier of the table from which to gather snapshots.- Returns:
- A list of all snapshots of the given table.
-
listSnapshotsAsTable
public Table listSnapshotsAsTable(@NotNull @NotNull org.apache.iceberg.catalog.TableIdentifier tableIdentifier) List allsnapshots
of a given Iceberg table as a Deephaventable
. The resulting table will be static and contain the same information aslistSnapshots(TableIdentifier)
.- Parameters:
tableIdentifier
- The identifier of the table from which to gather snapshots.- Returns:
- A list of all tables in the given namespace.
-
listSnapshotsAsTable
List allsnapshots
of a given Iceberg table as a Deephaventable
. The resulting table will be static and contain the same information aslistSnapshots(TableIdentifier)
.- Parameters:
tableIdentifier
- The identifier of the table from which to gather snapshots.- Returns:
- A list of all tables in the given namespace.
-
getTableDefinition
public TableDefinition getTableDefinition(@NotNull @NotNull String tableIdentifier, @Nullable @Nullable IcebergInstructions instructions) Returntable definition
for a given Iceberg table, with optional instructions for customizations while reading.- Parameters:
tableIdentifier
- The identifier of the table to loadinstructions
- The instructions for customizations while reading- Returns:
- The table definition
-
getTableDefinition
public TableDefinition getTableDefinition(@NotNull @NotNull org.apache.iceberg.catalog.TableIdentifier tableIdentifier, @Nullable @Nullable IcebergInstructions instructions) Returntable definition
for a given Iceberg table, with optional instructions for customizations while reading.- Parameters:
tableIdentifier
- The identifier of the table to loadinstructions
- The instructions for customizations while reading- Returns:
- The table definition
-
getTableDefinition
public TableDefinition getTableDefinition(@NotNull @NotNull String tableIdentifier, long snapshotId, @Nullable @Nullable IcebergInstructions instructions) Returntable definition
for a given Iceberg table and snapshot id, with optional instructions for customizations while reading.- Parameters:
tableIdentifier
- The identifier of the table to loadsnapshotId
- The identifier of the snapshot to loadinstructions
- The instructions for customizations while reading- Returns:
- The table definition
-
getTableDefinition
public TableDefinition getTableDefinition(@NotNull @NotNull org.apache.iceberg.catalog.TableIdentifier tableIdentifier, @Nullable @Nullable org.apache.iceberg.Snapshot tableSnapshot, @Nullable @Nullable IcebergInstructions instructions) Returntable definition
for a given Iceberg table and snapshot id, with optional instructions for customizations while reading.- Parameters:
tableIdentifier
- The identifier of the table to loadtableSnapshot
- The snapshot to loadinstructions
- The instructions for customizations while reading- Returns:
- The table definition
-
getTableDefinitionTable
public Table getTableDefinitionTable(@NotNull @NotNull String tableIdentifier, @Nullable @Nullable IcebergInstructions instructions) Returntable
containing thedefinition
of a given Iceberg table, with optional instructions for customizations while reading.- Parameters:
tableIdentifier
- The identifier of the table to loadinstructions
- The instructions for customizations while reading- Returns:
- The table definition as a Deephaven table
-
getTableDefinitionTable
public Table getTableDefinitionTable(@NotNull @NotNull org.apache.iceberg.catalog.TableIdentifier tableIdentifier, @Nullable @Nullable IcebergInstructions instructions) Returntable
containing thedefinition
of a given Iceberg table, with optional instructions for customizations while reading.- Parameters:
tableIdentifier
- The identifier of the table to loadinstructions
- The instructions for customizations while reading- Returns:
- The table definition as a Deephaven table
-
getTableDefinitionTable
public Table getTableDefinitionTable(@NotNull @NotNull String tableIdentifier, long snapshotId, @Nullable @Nullable IcebergInstructions instructions) Returntable
containing thedefinition
of a given Iceberg table and snapshot id, with optional instructions for customizations while reading.- Parameters:
tableIdentifier
- The identifier of the table to loadsnapshotId
- The identifier of the snapshot to loadinstructions
- The instructions for customizations while reading- Returns:
- The table definition as a Deephaven table
-
getTableDefinitionTable
public Table getTableDefinitionTable(@NotNull @NotNull org.apache.iceberg.catalog.TableIdentifier tableIdentifier, @Nullable @Nullable org.apache.iceberg.Snapshot tableSnapshot, @Nullable @Nullable IcebergInstructions instructions) Returntable
containing thedefinition
of a given Iceberg table and snapshot id, with optional instructions for customizations while reading.- Parameters:
tableIdentifier
- The identifier of the table to loadtableSnapshot
- The snapshot to loadinstructions
- The instructions for customizations while reading- Returns:
- The table definition as a Deephaven table
-
readTable
public Table readTable(@NotNull @NotNull org.apache.iceberg.catalog.TableIdentifier tableIdentifier, @Nullable @Nullable IcebergInstructions instructions) Read the latest static snapshot of an Iceberg table from the Iceberg catalog.- Parameters:
tableIdentifier
- The table identifier to loadinstructions
- The instructions for customizations while reading- Returns:
- The loaded table
-
readTable
public Table readTable(@NotNull @NotNull String tableIdentifier, @Nullable @Nullable IcebergInstructions instructions) Read the latest static snapshot of an Iceberg table from the Iceberg catalog.- Parameters:
tableIdentifier
- The table identifier to loadinstructions
- The instructions for customizations while reading- Returns:
- The loaded table
-
readTable
public Table readTable(@NotNull @NotNull org.apache.iceberg.catalog.TableIdentifier tableIdentifier, long tableSnapshotId, @Nullable @Nullable IcebergInstructions instructions) Read a static snapshot of an Iceberg table from the Iceberg catalog.- Parameters:
tableIdentifier
- The table identifier to loadtableSnapshotId
- The snapshot id to loadinstructions
- The instructions for customizations while reading- Returns:
- The loaded table
-
readTable
public Table readTable(@NotNull @NotNull String tableIdentifier, long tableSnapshotId, @Nullable @Nullable IcebergInstructions instructions) Read a static snapshot of an Iceberg table from the Iceberg catalog.- Parameters:
tableIdentifier
- The table identifier to loadtableSnapshotId
- The snapshot id to loadinstructions
- The instructions for customizations while reading- Returns:
- The loaded table
-
readTable
public Table readTable(@NotNull @NotNull org.apache.iceberg.catalog.TableIdentifier tableIdentifier, @NotNull @NotNull org.apache.iceberg.Snapshot tableSnapshot, @Nullable @Nullable IcebergInstructions instructions) Read a static snapshot of an Iceberg table from the Iceberg catalog.- Parameters:
tableIdentifier
- The table identifier to loadtableSnapshot
- Thesnapshot
to loadinstructions
- The instructions for customizations while reading- Returns:
- The loaded table
-
catalog
public org.apache.iceberg.catalog.Catalog catalog()Returns the underlying Icebergcatalog
used by this adapter. -
fileIO
public org.apache.iceberg.io.FileIO fileIO()Returns the underlying IcebergFileIO
used by this adapter.
-