Class IcebergCatalogAdapter

java.lang.Object
io.deephaven.iceberg.util.IcebergCatalogAdapter

public class IcebergCatalogAdapter extends Object
  • Method Details

    • listNamespaces

      public List<org.apache.iceberg.catalog.Namespace> listNamespaces()
      List all namespaces in the catalog. This method is only supported if the catalog implements SupportsNamespaces for namespace discovery. See SupportsNamespaces.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 all namespaces in a given namespace. This method is only supported if the catalog implements SupportsNamespaces for namespace discovery. See SupportsNamespaces.listNamespaces(Namespace).
      Parameters:
      namespace - The namespace to list namespaces in.
      Returns:
      A list of all namespaces in the given namespace.
    • listNamespacesAsTable

      public Table listNamespacesAsTable()
      List all namespaces in the catalog as a Deephaven table. The resulting table will be static and contain the same information as listNamespaces().
      Returns:
      A table of all namespaces.
    • listNamespacesAsTable

      public Table listNamespacesAsTable(@NotNull @NotNull org.apache.iceberg.catalog.Namespace namespace)
      List all namespaces in a given namespace as a Deephaven table. The resulting table will be static and contain the same information as listNamespaces(Namespace).
      Returns:
      A table of all namespaces.
    • listNamespacesAsTable

      public Table listNamespacesAsTable(@NotNull @NotNull String... namespace)
      List all namespaces in a given namespace as a Deephaven table. The resulting table will be static and contain the same information as listNamespaces(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 Iceberg tables in a given namespace.
      Parameters:
      namespace - The namespace to list tables in.
      Returns:
      A list of all tables in the given namespace.
    • listTablesAsTable

      public Table listTablesAsTable(@NotNull @NotNull org.apache.iceberg.catalog.Namespace namespace)
      List all Iceberg tables in a given namespace as a Deephaven table. The resulting table will be static and contain the same information as listTables(Namespace).
      Parameters:
      namespace - The namespace from which to gather the tables
      Returns:
      A list of all tables in the given namespace.
    • listTablesAsTable

      public Table listTablesAsTable(@NotNull @NotNull String... namespace)
    • listSnapshots

      public List<org.apache.iceberg.Snapshot> listSnapshots(@NotNull @NotNull org.apache.iceberg.catalog.TableIdentifier tableIdentifier)
      List all snapshots 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 all snapshots of a given Iceberg table as a Deephaven table. The resulting table will be static and contain the same information as listSnapshots(TableIdentifier).
      Parameters:
      tableIdentifier - The identifier of the table from which to gather snapshots.
      Returns:
      A list of all tables in the given namespace.
    • listSnapshotsAsTable

      public Table listSnapshotsAsTable(@NotNull @NotNull String tableIdentifier)
      List all snapshots of a given Iceberg table as a Deephaven table. The resulting table will be static and contain the same information as listSnapshots(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)
      Return table definition for a given Iceberg table, with optional instructions for customizations while reading.
      Parameters:
      tableIdentifier - The identifier of the table to load
      instructions - 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)
      Return table definition for a given Iceberg table, with optional instructions for customizations while reading.
      Parameters:
      tableIdentifier - The identifier of the table to load
      instructions - The instructions for customizations while reading
      Returns:
      The table definition
    • getTableDefinition

      public TableDefinition getTableDefinition(@NotNull @NotNull String tableIdentifier, long snapshotId, @Nullable @Nullable IcebergInstructions instructions)
      Return table definition for a given Iceberg table and snapshot id, with optional instructions for customizations while reading.
      Parameters:
      tableIdentifier - The identifier of the table to load
      snapshotId - The identifier of the snapshot to load
      instructions - 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)
      Return table definition for a given Iceberg table and snapshot id, with optional instructions for customizations while reading.
      Parameters:
      tableIdentifier - The identifier of the table to load
      tableSnapshot - The snapshot to load
      instructions - The instructions for customizations while reading
      Returns:
      The table definition
    • getTableDefinitionTable

      public Table getTableDefinitionTable(@NotNull @NotNull String tableIdentifier, @Nullable @Nullable IcebergInstructions instructions)
      Return table containing the definition of a given Iceberg table, with optional instructions for customizations while reading.
      Parameters:
      tableIdentifier - The identifier of the table to load
      instructions - 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)
      Return table containing the definition of a given Iceberg table, with optional instructions for customizations while reading.
      Parameters:
      tableIdentifier - The identifier of the table to load
      instructions - 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)
      Return table containing the definition of a given Iceberg table and snapshot id, with optional instructions for customizations while reading.
      Parameters:
      tableIdentifier - The identifier of the table to load
      snapshotId - The identifier of the snapshot to load
      instructions - 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)
      Return table containing the definition of a given Iceberg table and snapshot id, with optional instructions for customizations while reading.
      Parameters:
      tableIdentifier - The identifier of the table to load
      tableSnapshot - The snapshot to load
      instructions - 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 load
      instructions - 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 load
      instructions - 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 load
      tableSnapshotId - The snapshot id to load
      instructions - 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 load
      tableSnapshotId - The snapshot id to load
      instructions - 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 load
      tableSnapshot - The snapshot to load
      instructions - The instructions for customizations while reading
      Returns:
      The loaded table
    • catalog

      public org.apache.iceberg.catalog.Catalog catalog()
      Returns the underlying Iceberg catalog used by this adapter.
    • fileIO

      public org.apache.iceberg.io.FileIO fileIO()
      Returns the underlying Iceberg FileIO used by this adapter.