deephaven_enterprise.iceberg¶
This module is used to define Iceberg endpoints and to discover and deploy Deephaven schemas for Iceberg tables.
- class DiscoveryResult(j_result)[source]¶
Bases:
object
Contains the result of an Iceberg discovery (
discover()
)
- class IcebergEndpoint(j_endpoint)[source]¶
Bases:
object
An Iceberg Endpoint defines both the location of the Iceberg Catalog and data warehouse. It also provides information required to create the catalog and retrieve data from the store as a Deephaven table. Optionally users may provide a set of properties, secrets, and hadoop settings to be passed down to the Iceberg APIs.
Secrets passed to IcebergEndpoint instances are simply named references, never actual secret values. For example, you may provide S3 credentials as a secret defined as
IcebergEndpoint(“rest”, “http://catalog/”, “s3://warehouse”, data_instructions, secrets = [“s3.access.key” : “s3.dev_access_key” ])
Deephaven will locate the secret within the set of SecretsProviders to discover the actual value.
Create a new IcebergEndpoint.
- discover(table_id, endpoint, snapshot_id=None, namespace=None, table_name=None, reference_definition=None)[source]¶
Discover an Iceberg table.
- Parameters:
table_id (
str
) – the Iceberg table identifierendpoint (
IcebergEndpoint
) – the endpoint to use for discoverysnapshot_id (
Optional
[str
]) – (optional) the Iceberg snapshot ID to use for discoverynamespace (
Optional
[str
]) – (optional) A user specified namespace. If not set, the namespace is derived from the table_idtable_name (
Optional
[str
]) – (optional) A user specified table name. If not set, the table name is derived from the table_idreference_definition (
Optional
[TableDefinition
]) – (optional) A user specified reference TableDefinition. The discovery process guarantees that the result is compatible with this definition.
- Return type:
- Returns:
a DiscoveryResult that can be used to deploy Deephaven schemas.
- get_named_endpoint(endpoint_name)[source]¶
Get an IcebergEndpoint from Deephaven by name.
- Parameters:
endpoint_name (
str
) – the name of the endpoint- Return type:
- Returns:
the IcebergEndpoint
- make_endpoint(catalog_type, catalog_uri, warehouse_uri, data_instructions, endpoint_name=None, properties=None, secrets=None, hadoop_opt=None)[source]¶
Create a new IcebergEndpoint. If the endpoint_name is set, the resulting endpoint can be deployed to Deephaven for reuse with the deploy() method.
Any provided properties and secrets will be merged into a single collection of properties to be passed on to the Iceberg APIs
- Parameters:
catalog_type (
str
) – the type of catalog. Possible values include “rest”, “glue”, “hive”, “nessie”, “hadoop”, and “jdbc”catalog_uri (
str
) – the URI of the catalogwarehouse_uri (
str
) – the URI of the datadata_instructions (
Any
) – the Data Instructions for Deephaven to use when fetching table data.endpoint_name (
Optional
[str
]) – (optional) a name for this endpoint. This must be set in order to deploy this endpointproperties (
Optional
[Dict
[str
,str
]]) – (optional) a map of properties to be passed to the Iceberg APIsecrets (
Optional
[Dict
[str
,str
]]) – a map of secrets to be resolved and passed to the Iceberg APIhadoop_opt (
Optional
[Dict
[str
,str
]]) – a map of hadoop specific options to be passed to the Iceberg API
- Return type: