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 voiddeployEndpoint(IcebergEndpoint.Named endpoint, boolean overwriteExisting) Deploy the discovered endpoint to Deephaven's configuration service.static voiddeploySchemaWithEmbeddedEndpoint(@NotNull DiscoveryResult discovery) Deploy the discovered schema to deephaven, embedding the endpoint directly in the schemastatic voiddeploySchemaWithEndpointReference(@NotNull DiscoveryResult discovery) Deploy the discovered schema to deephaven, referencing the endpoint by name.static @NotNull DiscoveryResultdiscover(@NotNull DiscoveryConfig config) Discover a table from iceberg.static IcebergEndpoint.NamedgetEndpointByName(@NotNull String endpointName) Get theIcebergEndpointfrom Deephaven configuration by name.static IcebergEndpoint.Builder
-
Method Details
-
discover
Discover a table from iceberg.- Parameters:
config- theconfigurationto use for discovery.- Returns:
- a
DiscoveryResultcontaining the resolvedTableinformation.
-
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 endpointto 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 theIcebergEndpointconfigured wthDiscoveryConfig.endpoint()was named, eitherduring construction, orexplicitly.- Parameters:
discovery- the result of adiscover(DiscoveryConfig).- Throws:
IOException- if theIcebergEndpointcould 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 theIcebergEndpointcould not be deserialized.
-
getEndpointByName
@NotNull public static IcebergEndpoint.Named getEndpointByName(@NotNull @NotNull String endpointName) throws IOException 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
- Returns:
- a new
IcebergEndpoint.Builder
-