Package io.deephaven.enterprise.iceberg
Class IcebergTools
java.lang.Object
io.deephaven.enterprise.iceberg.IcebergTools
Common utilities for loading Iceberg tables as Deephaven
Tables-
Method Summary
Modifier and TypeMethodDescriptionstatic IcebergTableOptionscreateForMerge(@NotNull String namespace, @NotNull String tableName, @NotNull BuildCatalogOptions catalogOptions, @NotNull org.apache.iceberg.catalog.TableIdentifier tableIdentifier, @NotNull TableDefinition tableDefinition) Helper method to create a new Iceberg table in this catalog with the giventableIdentifierandtableDefinitionintended for subsequent writes using a Deephaven merge job.static voiddeployEndpoint(IcebergEndpoint.Named endpoint, boolean overwriteExisting) Deprecated.static voiddeploySchemaWithEmbeddedEndpoint(@NotNull DiscoveryResult discovery) Deprecated.static voiddeploySchemaWithEndpointReference(@NotNull DiscoveryResult discovery) Deprecated.static @NotNull DiscoveryResultdiscover(@NotNull DiscoveryConfig config) Deprecated.static IcebergEndpoint.NamedgetEndpointByName(@NotNull String endpointName) Deprecated.static IcebergEndpoint.BuilderDeprecated.
-
Method Details
-
discover
@Deprecated @NotNull public static @NotNull DiscoveryResult discover(@NotNull @NotNull DiscoveryConfig config) Deprecated.Discover a table from iceberg.- Parameters:
config- theconfigurationto use for discovery.- Returns:
- a
DiscoveryResultcontaining the resolvedTableinformation.
-
deployEndpoint
@Deprecated public static void deployEndpoint(@NotNull IcebergEndpoint.Named endpoint, boolean overwriteExisting) Deprecated.Deploy the discovered endpoint to Deephaven's configuration service. The endpoint will be stored in the Configuration service as a JSON file named `endpoint_name.json`. Once deployed, the endpoint can be referenced by the Schema's Iceberg extended storage element. SeedeploySchemaWithEndpointReference(DiscoveryResult).- Parameters:
endpoint- Thenamed endpointto deploy.overwriteExisting- if true, any existing endpoint will be overwritten.
-
deploySchemaWithEndpointReference
@Deprecated public static void deploySchemaWithEndpointReference(@NotNull @NotNull DiscoveryResult discovery) throws IOException Deprecated.Deploy the discovered schema to deephaven, referencing the endpoint by name. This method requires that theIcebergEndpointconfigured wthDiscoveryConfig.endpoint()was named, eitherduring construction, orexplicitly.- Parameters:
discovery- the result of adiscover(DiscoveryConfig).- Throws:
IOException- if theIcebergEndpointcould not be serialized.
-
deploySchemaWithEmbeddedEndpoint
@Deprecated public static void deploySchemaWithEmbeddedEndpoint(@NotNull @NotNull DiscoveryResult discovery) throws IOException Deprecated.Deploy the discovered schema to deephaven, embedding the endpoint directly in the schema- Parameters:
discovery- the result of adiscover(DiscoveryConfig).- Throws:
IOException- if theIcebergEndpointcould not be deserialized.
-
getEndpointByName
@Deprecated @NotNull public static IcebergEndpoint.Named getEndpointByName(@NotNull @NotNull String endpointName) throws IOException Deprecated.Get theIcebergEndpointfrom Deephaven configuration by name.- Parameters:
endpointName- the name of the endpoint- Returns:
- the endpoint.
- Throws:
IOException- if the endpoint could not be deserialized, or the configuration service could not be reached.
-
newEndpoint
Deprecated.- Returns:
- a new
IcebergEndpoint.Builder
-
createForMerge
public static IcebergTableOptions createForMerge(@NotNull @NotNull String namespace, @NotNull @NotNull String tableName, @NotNull @NotNull BuildCatalogOptions catalogOptions, @NotNull @NotNull org.apache.iceberg.catalog.TableIdentifier tableIdentifier, @NotNull @NotNull TableDefinition tableDefinition) Helper method to create a new Iceberg table in this catalog with the giventableIdentifierandtableDefinitionintended for subsequent writes using a Deephaven merge job. It returns anIcebergTableOptionsinstance that can be used toIcebergTableOptions.deploy()the schema.Note that this method will create a new Iceberg namespace if the namespace from the
tableIdentifierdoes not already exist.- Parameters:
namespace- The namespace to use for the new Deephaven table.tableName- The name of the new Deephaven table.catalogOptions- The options to use for connecting to the Iceberg catalog.tableIdentifier- The identifier of the new Iceberg table.tableDefinition- The definition of the new Deephaven table, which will be converted to an Iceberg schema and spec.- Returns:
- an
IcebergTableOptionsinstance representing the created table. - Throws:
org.apache.iceberg.exceptions.AlreadyExistsException- if the Iceberg table already exists- See Also:
-