Package io.deephaven.enterprise.iceberg
Class IcebergTools
java.lang.Object
io.deephaven.enterprise.iceberg.IcebergTools
Common utilities for loading Iceberg tables as Deephaven
Table
s-
Method Summary
Modifier and TypeMethodDescriptionstatic void
deployEndpoint
(IcebergEndpoint.Named endpoint, boolean overwriteExisting) Deploy the discovered endpoint to Deephaven's configuration service.static void
deploySchemaWithEmbeddedEndpoint
(@NotNull DiscoveryResult discovery) Deploy the discovered schema to deephaven, embedding the endpoint directly in the schemastatic void
deploySchemaWithEndpointReference
(@NotNull DiscoveryResult discovery) Deploy the discovered schema to deephaven, referencing the endpoint by name.static @NotNull DiscoveryResult
discover
(@NotNull DiscoveryConfig config) Discover a table from iceberg.static IcebergEndpoint.Named
getEndpointByName
(@NotNull String endpointName) Get theIcebergEndpoint
from Deephaven configuration by name.static IcebergEndpoint.Builder
-
Method Details
-
discover
Discover a table from iceberg.- Parameters:
config
- theconfiguration
to use for discovery.- Returns:
- a
DiscoveryResult
containing the resolvedTable
information.
-
deployEndpoint
public static void deployEndpoint(@NotNull IcebergEndpoint.Named endpoint, boolean overwriteExisting) 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 endpoint
to deploy.overwriteExisting
- if true, any existing endpoint will be overwritten.
-
deploySchemaWithEndpointReference
public static void deploySchemaWithEndpointReference(@NotNull @NotNull DiscoveryResult discovery) throws IOException Deploy the discovered schema to deephaven, referencing the endpoint by name. This method requires that theIcebergEndpoint
configured wthDiscoveryConfig.endpoint()
was named, eitherduring construction
, orexplicitly
.- Parameters:
discovery
- the result of adiscover(DiscoveryConfig)
.- Throws:
IOException
- if theIcebergEndpoint
could not be serialized.
-
deploySchemaWithEmbeddedEndpoint
public static void deploySchemaWithEmbeddedEndpoint(@NotNull @NotNull DiscoveryResult discovery) throws IOException Deploy the discovered schema to deephaven, embedding the endpoint directly in the schema- Parameters:
discovery
- the result of adiscover(DiscoveryConfig)
.- Throws:
IOException
- if theIcebergEndpoint
could not be deserialized.
-
getEndpointByName
@NotNull public static IcebergEndpoint.Named getEndpointByName(@NotNull @NotNull String endpointName) throws IOException Get theIcebergEndpoint
from 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
- Returns:
- a new
IcebergEndpoint.Builder
-