Skip to content

Commit c467957

Browse files
authored
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 :)
1 parent da88b8d commit c467957

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

mkdocs/docs/configuration.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ For the FileIO there are several configuration options available:
155155
| adls.tenant-id | ad667be4-b811-11ed-afa1-0242ac120002 | The tenant-id |
156156
| adls.client-id | ad667be4-b811-11ed-afa1-0242ac120002 | The client-id |
157157
| adls.client-secret | oCA3R6P\*ka#oa1Sms2J74z... | The client-secret |
158+
| 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 |
158159

159160
<!-- markdown-link-check-enable-->
160161

pyiceberg/io/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@
8080
ADLS_SAS_TOKEN = "adls.sas-token"
8181
ADLS_TENANT_ID = "adls.tenant-id"
8282
ADLS_CLIENT_ID = "adls.client-id"
83-
ADLS_ClIENT_SECRET = "adls.client-secret"
83+
ADLS_CLIENT_SECRET = "adls.client-secret"
84+
ADLS_ACCOUNT_HOST = "adls.account-host"
8485
GCS_TOKEN = "gcs.oauth2.token"
8586
GCS_TOKEN_EXPIRES_AT_MS = "gcs.oauth2.token-expires-at"
8687
GCS_PROJECT_ID = "gcs.project-id"

pyiceberg/io/fsspec.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,11 @@
3939
from pyiceberg.catalog import TOKEN
4040
from pyiceberg.exceptions import SignError
4141
from pyiceberg.io import (
42+
ADLS_ACCOUNT_HOST,
4243
ADLS_ACCOUNT_KEY,
4344
ADLS_ACCOUNT_NAME,
4445
ADLS_CLIENT_ID,
46+
ADLS_CLIENT_SECRET,
4547
ADLS_CONNECTION_STRING,
4648
ADLS_SAS_TOKEN,
4749
ADLS_TENANT_ID,
@@ -73,7 +75,6 @@
7375
S3_SIGNER_ENDPOINT,
7476
S3_SIGNER_ENDPOINT_DEFAULT,
7577
S3_SIGNER_URI,
76-
ADLS_ClIENT_SECRET,
7778
FileIO,
7879
InputFile,
7980
InputStream,
@@ -207,7 +208,8 @@ def _adls(properties: Properties) -> AbstractFileSystem:
207208
sas_token=properties.get(ADLS_SAS_TOKEN),
208209
tenant_id=properties.get(ADLS_TENANT_ID),
209210
client_id=properties.get(ADLS_CLIENT_ID),
210-
client_secret=properties.get(ADLS_ClIENT_SECRET),
211+
client_secret=properties.get(ADLS_CLIENT_SECRET),
212+
account_host=properties.get(ADLS_ACCOUNT_HOST),
211213
)
212214

213215

0 commit comments

Comments
 (0)