Skip to main content
Version: Python

adapter_s3_rest

The adapter_s3_rest method creates a catalog adapter using an S3-compatible provider and a REST catalog.

Syntax

adapter_s3_rest(
catalog_uri: str,
warehouse_location: str,
name: str = None,
region_name: str = None,
access_key_id: str = None,
secret_access_key: str = None,
end_point_override: str = None
) -> IcebergCatalogAdapter

Parameters

ParameterTypeDescription
catalog_uristr

The URI of the REST catalog.

warehouse_locationstr

The location of the warehouse.

namestr

A descriptive name of the catalog. If not given, the catalog name is inferred from the catalog URI.

region_namestr

The S3 region name to use. If not given, the default region will be picked from the AWS SDK in the following order:

  • The aws.region system property.
  • The AWS_REGION environment variable.
  • {user.homde}/.aws/credentials.
  • {user.home}/.aws/config.
  • The EC2 metadata service, if using AWS EC2.
access_key_idstr

The access key for reading files. Both this parameter and secret_access_key must be given to use static credentials. If not given, default credentials will be used.

secret_access_keystr

The secret access key for reading files. Both this parameter and access_key_id must be given to use static credentials. If not given, default credentials will be used.

end_point_overridestr

The S3 endpoint to connect to. Callers connecting to AWS do not typically need to set this parameter. It is typically used to connect to non-AWS, S3-compatible APIs.

Returns

An IcebergCatalogAdapter.

Examples

The following example creates a catalog adapter using a local MinIO instance and REST catalog:

from deephaven.experimental import iceberg

local_adapter = iceberg.adapter_s3_rest(
name="minio-iceberg",
catalog_uri="http://rest:8181",
warehouse_location="s3a://warehouse/wh",
region_name="us-east-1",
access_key_id="admin",
secret_access_key="password",
end_point_override="http://minio:9000",
)