From 2ad49de232d20e8daf388c7a5f4622b4664043dd Mon Sep 17 00:00:00 2001 From: Victor Date: Mon, 19 May 2025 14:39:49 +0000 Subject: [PATCH 1/3] Add adls.account-host property --- pyiceberg/io/__init__.py | 3 ++- pyiceberg/io/fsspec.py | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pyiceberg/io/__init__.py b/pyiceberg/io/__init__.py index 5e5c7e2c7c..b6fa934fdd 100644 --- a/pyiceberg/io/__init__.py +++ b/pyiceberg/io/__init__.py @@ -80,7 +80,8 @@ ADLS_SAS_TOKEN = "adls.sas-token" ADLS_TENANT_ID = "adls.tenant-id" ADLS_CLIENT_ID = "adls.client-id" -ADLS_ClIENT_SECRET = "adls.client-secret" +ADLS_CLIENT_SECRET = "adls.client-secret" +ADLS_ACCOUNT_HOST = "adls.account-host" 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 c0b019dfc5..1f0c2847a1 100644 --- a/pyiceberg/io/fsspec.py +++ b/pyiceberg/io/fsspec.py @@ -73,7 +73,8 @@ S3_SIGNER_ENDPOINT, S3_SIGNER_ENDPOINT_DEFAULT, S3_SIGNER_URI, - ADLS_ClIENT_SECRET, + ADLS_CLIENT_SECRET, + ADLS_ACCOUNT_HOST, FileIO, InputFile, InputStream, @@ -207,7 +208,8 @@ def _adls(properties: Properties) -> AbstractFileSystem: sas_token=properties.get(ADLS_SAS_TOKEN), tenant_id=properties.get(ADLS_TENANT_ID), client_id=properties.get(ADLS_CLIENT_ID), - client_secret=properties.get(ADLS_ClIENT_SECRET), + client_secret=properties.get(ADLS_CLIENT_SECRET), + account_host=properties.get(ADLS_ACCOUNT_HOST), ) From 47593af7ca1a1a9f0f686b2737112657821fb988 Mon Sep 17 00:00:00 2001 From: Victor Date: Mon, 19 May 2025 21:09:17 +0200 Subject: [PATCH 2/3] Update docs for ADLS properties --- mkdocs/docs/configuration.md | 1 + 1 file changed, 1 insertion(+) diff --git a/mkdocs/docs/configuration.md b/mkdocs/docs/configuration.md index c91ef42e60..4cc38db5dc 100644 --- a/mkdocs/docs/configuration.md +++ b/mkdocs/docs/configuration.md @@ -155,6 +155,7 @@ For the FileIO there are several configuration options available: | adls.tenant-id | ad667be4-b811-11ed-afa1-0242ac120002 | The tenant-id | | adls.client-id | ad667be4-b811-11ed-afa1-0242ac120002 | The client-id | | adls.client-secret | oCA3R6P\*ka#oa1Sms2J74z... | The client-secret | +| adls.account-host | accountname1.blob.core.windows.net | The storage account host. See [AzureBlobFileSystem](https://github.com/fsspec/adlfs/blob/adb9c53b74a0d420625b86dd00fbe615b43201d2/adlfs/spec.py#L125) for reference | From 3b9848c6652ffc897a962ec1a425b22209b8744e Mon Sep 17 00:00:00 2001 From: Victor Date: Mon, 19 May 2025 21:36:10 +0200 Subject: [PATCH 3/3] Fix ruff lint --- pyiceberg/io/fsspec.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyiceberg/io/fsspec.py b/pyiceberg/io/fsspec.py index 1f0c2847a1..1cba30a038 100644 --- a/pyiceberg/io/fsspec.py +++ b/pyiceberg/io/fsspec.py @@ -39,9 +39,11 @@ from pyiceberg.catalog import TOKEN from pyiceberg.exceptions import SignError from pyiceberg.io import ( + ADLS_ACCOUNT_HOST, ADLS_ACCOUNT_KEY, ADLS_ACCOUNT_NAME, ADLS_CLIENT_ID, + ADLS_CLIENT_SECRET, ADLS_CONNECTION_STRING, ADLS_SAS_TOKEN, ADLS_TENANT_ID, @@ -73,8 +75,6 @@ S3_SIGNER_ENDPOINT, S3_SIGNER_ENDPOINT_DEFAULT, S3_SIGNER_URI, - ADLS_CLIENT_SECRET, - ADLS_ACCOUNT_HOST, FileIO, InputFile, InputStream,