We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b806cfa commit 816c29fCopy full SHA for 816c29f
pyiceberg/io/fsspec.py
@@ -179,6 +179,17 @@ def _gs(properties: Properties) -> AbstractFileSystem:
179
def _adls(properties: Properties) -> AbstractFileSystem:
180
from adlfs import AzureBlobFileSystem
181
182
+ adls_sas_tokens = {
183
+ key.replace(f"{ADLS_SAS_TOKEN}.", ""): value for key, value in properties.items() if key.startswith(ADLS_SAS_TOKEN)
184
+ }
185
+
186
+ for key, sas_token in adls_sas_tokens.items():
187
+ if key.endswith(".windows.net"):
188
+ if ADLS_ACCOUNT_NAME not in properties:
189
+ properties[ADLS_ACCOUNT_NAME] = key.split(".")[0]
190
+ if ADLS_SAS_TOKEN not in properties:
191
+ properties[ADLS_SAS_TOKEN] = sas_token
192
193
return AzureBlobFileSystem(
194
connection_string=properties.get(ADLS_CONNECTION_STRING),
195
account_name=properties.get(ADLS_ACCOUNT_NAME),
0 commit comments