diff --git a/pyiceberg/io/__init__.py b/pyiceberg/io/__init__.py index 4b5e99d336..1a78f306c6 100644 --- a/pyiceberg/io/__init__.py +++ b/pyiceberg/io/__init__.py @@ -57,6 +57,13 @@ HDFS_PORT = "hdfs.port" HDFS_USER = "hdfs.user" HDFS_KERB_TICKET = "hdfs.kerberos_ticket" +ADLFS_CONNECTION_STRING = "adlfs.connection-string" +ADLFS_ACCOUNT_NAME = "adlfs.account-name" +ADLFS_ACCOUNT_KEY = "adlfs.account-key" +ADLFS_SAS_TOKEN = "adlfs.sas-token" +ADLFS_TENANT_ID = "adlfs.tenant-id" +ADLFS_CLIENT_ID = "adlfs.client-id" +ADLFS_ClIENT_SECRET = "adlfs.client-secret" GCS_TOKEN = "gcs.oauth2.token" GCS_TOKEN_EXPIRES_AT_MS = "gcs.oauth2.token-expires-at" GCS_PROJECT_ID = "gcs.project-id" diff --git a/pyiceberg/io/fsspec.py b/pyiceberg/io/fsspec.py index ee97829c2e..1089c9fe50 100644 --- a/pyiceberg/io/fsspec.py +++ b/pyiceberg/io/fsspec.py @@ -40,6 +40,12 @@ from pyiceberg.catalog import TOKEN from pyiceberg.exceptions import SignError from pyiceberg.io import ( + ADLFS_ACCOUNT_KEY, + ADLFS_ACCOUNT_NAME, + ADLFS_CLIENT_ID, + ADLFS_CONNECTION_STRING, + ADLFS_SAS_TOKEN, + ADLFS_TENANT_ID, GCS_ACCESS, GCS_CACHE_TIMEOUT, GCS_CONSISTENCY, @@ -57,6 +63,7 @@ S3_REGION, S3_SECRET_ACCESS_KEY, S3_SESSION_TOKEN, + ADLFS_ClIENT_SECRET, FileIO, InputFile, InputStream, @@ -163,13 +170,13 @@ def _adlfs(properties: Properties) -> AbstractFileSystem: from adlfs import AzureBlobFileSystem return AzureBlobFileSystem( - connection_string=properties.get("adlfs.connection-string"), - account_name=properties.get("adlfs.account-name"), - account_key=properties.get("adlfs.account-key"), - sas_token=properties.get("adlfs.sas-token"), - tenant_id=properties.get("adlfs.tenant-id"), - client_id=properties.get("adlfs.client-id"), - client_secret=properties.get("adlfs.client-secret"), + connection_string=properties.get(ADLFS_CONNECTION_STRING), + account_name=properties.get(ADLFS_ACCOUNT_NAME), + account_key=properties.get(ADLFS_ACCOUNT_KEY), + sas_token=properties.get(ADLFS_SAS_TOKEN), + tenant_id=properties.get(ADLFS_TENANT_ID), + client_id=properties.get(ADLFS_CLIENT_ID), + client_secret=properties.get(ADLFS_ClIENT_SECRET), )