From 2864e407e0ef58474f50c4473387976d23683a51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Szyma=C5=84ski?= Date: Wed, 26 Feb 2025 18:00:15 +0000 Subject: [PATCH 1/2] fix adlss properties processing --- pyiceberg/io/fsspec.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyiceberg/io/fsspec.py b/pyiceberg/io/fsspec.py index d8fe3dfa40..48bcc5853e 100644 --- a/pyiceberg/io/fsspec.py +++ b/pyiceberg/io/fsspec.py @@ -191,7 +191,7 @@ def _adls(properties: Properties) -> AbstractFileSystem: for key, sas_token in { key.replace(f"{ADLS_SAS_TOKEN}.", ""): value for key, value in properties.items() - if key.startswith(ADLS_SAS_TOKEN) and key.endswith(".windows.net") + if key.startswith(ADLS_SAS_TOKEN) }.items(): if ADLS_ACCOUNT_NAME not in properties: properties[ADLS_ACCOUNT_NAME] = key.split(".")[0] From 329cc9d097f42b491d42eb74cc370e780509d809 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Szyma=C5=84ski?= Date: Thu, 27 Feb 2025 16:21:43 +0000 Subject: [PATCH 2/2] lint the code --- pyiceberg/io/fsspec.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pyiceberg/io/fsspec.py b/pyiceberg/io/fsspec.py index 48bcc5853e..4cbae52304 100644 --- a/pyiceberg/io/fsspec.py +++ b/pyiceberg/io/fsspec.py @@ -189,9 +189,7 @@ def _adls(properties: Properties) -> AbstractFileSystem: from adlfs import AzureBlobFileSystem for key, sas_token in { - key.replace(f"{ADLS_SAS_TOKEN}.", ""): value - for key, value in properties.items() - if key.startswith(ADLS_SAS_TOKEN) + key.replace(f"{ADLS_SAS_TOKEN}.", ""): value for key, value in properties.items() if key.startswith(ADLS_SAS_TOKEN) }.items(): if ADLS_ACCOUNT_NAME not in properties: properties[ADLS_ACCOUNT_NAME] = key.split(".")[0]