You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iceberg.apache.org by fo...@apache.org on 2025/05/19 20:00:50 UTC

(iceberg-python) branch main updated: Add ADLFS property `adls.account-host` (#2016)

This is an automated email from the ASF dual-hosted git repository.

fokko pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg-python.git


The following commit(s) were added to refs/heads/main by this push:
     new c4679570 Add ADLFS property `adls.account-host` (#2016)
c4679570 is described below

commit c4679570b4b9b909c9bd602fbf919385998e1760
Author: Victor <vi...@gmail.com>
AuthorDate: Mon May 19 22:00:45 2025 +0200

    Add ADLFS property `adls.account-host` (#2016)
    
    <!--
    Thanks for opening a pull request!
    -->
    
    <!-- In the case this PR will resolve an issue, please replace
    ${GITHUB_ISSUE_ID} below with the actual Github issue id. -->
    Closes #2015
    
    # Rationale for this change
    Enable the input of the ADLFS option `account_host` via the properties
    option `adls.account-host`
    
    # Are these changes tested?
    Yes
    
    # Are there any user-facing changes?
    The option is now available :)
---
 mkdocs/docs/configuration.md | 1 +
 pyiceberg/io/__init__.py     | 3 ++-
 pyiceberg/io/fsspec.py       | 6 ++++--
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/mkdocs/docs/configuration.md b/mkdocs/docs/configuration.md
index c91ef42e..4cc38db5 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                                                                                                                   |
 
 <!-- markdown-link-check-enable-->
 
diff --git a/pyiceberg/io/__init__.py b/pyiceberg/io/__init__.py
index 5e5c7e2c..b6fa934f 100644
--- a/pyiceberg/io/__init__.py
+++ b/pyiceberg/io/__init__.py
@@ -80,7 +80,8 @@ ADLS_ACCOUNT_KEY = "adls.account-key"
 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 c0b019df..1cba30a0 100644
--- a/pyiceberg/io/fsspec.py
+++ b/pyiceberg/io/fsspec.py
@@ -39,9 +39,11 @@ from requests import HTTPError
 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,7 +75,6 @@ from pyiceberg.io import (
     S3_SIGNER_ENDPOINT,
     S3_SIGNER_ENDPOINT_DEFAULT,
     S3_SIGNER_URI,
-    ADLS_ClIENT_SECRET,
     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),
     )