adapter
The adapter
method creates an Iceberg catalog adapter from configuration properties. It is a general-purpose constructor method that can be used to create an adapter for a wide variety of Iceberg catalog types.
Syntax
adapter(
name: str = None,
properties: Dict[str, str] = None,
hadoop_config: Dict[str, str] = None
)
Parameters
Parameter | Type | Description |
---|---|---|
name | str | A descriptive name of the catalog. If not given, the name is inferred from the catalog URI property. |
properties optional | Dict[str, str] | The properties of the catalog to load. |
hadoop_config optional | Dict[str, str] | The Hadoop configuration properties for the catalog to load. |
Returns
Examples
The following example creates an Iceberg catalog adapter that connects to a REST catalog with an S3 backend via MinIO:
from deephaven.experimental import iceberg
local_adapter = iceberg.adapter(
name="generic-adapter",
properties={
"type": "rest",
"uri": "http://rest:8181",
"client.region": "us-east-1",
"s3.access-key-id": "admin",
"s3.secret-access-key": "password",
"s3.endpoint": "http://minio:9000",
},
)
The following example creates an Iceberg catalog adapter that connects to an AWS Glue catalog:
from deephaven.experimental import s3, iceberg
cloud_adapter = iceberg.adapter(
name="generic-adapter",
properties={
"type": "glue",
"uri": "s3://lab-warehouse/sales",
},
)