Skip to content

Commit 8968996

Browse files
authored
Add azure configuration variables (#745)
1 parent a132be1 commit 8968996

File tree

2 files changed

+21
-7
lines changed

2 files changed

+21
-7
lines changed

pyiceberg/io/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@
5757
HDFS_PORT = "hdfs.port"
5858
HDFS_USER = "hdfs.user"
5959
HDFS_KERB_TICKET = "hdfs.kerberos_ticket"
60+
ADLFS_CONNECTION_STRING = "adlfs.connection-string"
61+
ADLFS_ACCOUNT_NAME = "adlfs.account-name"
62+
ADLFS_ACCOUNT_KEY = "adlfs.account-key"
63+
ADLFS_SAS_TOKEN = "adlfs.sas-token"
64+
ADLFS_TENANT_ID = "adlfs.tenant-id"
65+
ADLFS_CLIENT_ID = "adlfs.client-id"
66+
ADLFS_ClIENT_SECRET = "adlfs.client-secret"
6067
GCS_TOKEN = "gcs.oauth2.token"
6168
GCS_TOKEN_EXPIRES_AT_MS = "gcs.oauth2.token-expires-at"
6269
GCS_PROJECT_ID = "gcs.project-id"

pyiceberg/io/fsspec.py

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@
4040
from pyiceberg.catalog import TOKEN
4141
from pyiceberg.exceptions import SignError
4242
from pyiceberg.io import (
43+
ADLFS_ACCOUNT_KEY,
44+
ADLFS_ACCOUNT_NAME,
45+
ADLFS_CLIENT_ID,
46+
ADLFS_CONNECTION_STRING,
47+
ADLFS_SAS_TOKEN,
48+
ADLFS_TENANT_ID,
4349
GCS_ACCESS,
4450
GCS_CACHE_TIMEOUT,
4551
GCS_CONSISTENCY,
@@ -57,6 +63,7 @@
5763
S3_REGION,
5864
S3_SECRET_ACCESS_KEY,
5965
S3_SESSION_TOKEN,
66+
ADLFS_ClIENT_SECRET,
6067
FileIO,
6168
InputFile,
6269
InputStream,
@@ -163,13 +170,13 @@ def _adlfs(properties: Properties) -> AbstractFileSystem:
163170
from adlfs import AzureBlobFileSystem
164171

165172
return AzureBlobFileSystem(
166-
connection_string=properties.get("adlfs.connection-string"),
167-
account_name=properties.get("adlfs.account-name"),
168-
account_key=properties.get("adlfs.account-key"),
169-
sas_token=properties.get("adlfs.sas-token"),
170-
tenant_id=properties.get("adlfs.tenant-id"),
171-
client_id=properties.get("adlfs.client-id"),
172-
client_secret=properties.get("adlfs.client-secret"),
173+
connection_string=properties.get(ADLFS_CONNECTION_STRING),
174+
account_name=properties.get(ADLFS_ACCOUNT_NAME),
175+
account_key=properties.get(ADLFS_ACCOUNT_KEY),
176+
sas_token=properties.get(ADLFS_SAS_TOKEN),
177+
tenant_id=properties.get(ADLFS_TENANT_ID),
178+
client_id=properties.get(ADLFS_CLIENT_ID),
179+
client_secret=properties.get(ADLFS_ClIENT_SECRET),
173180
)
174181

175182

0 commit comments

Comments
 (0)