我用下麵的代碼在python中使用賬戶關鍵山ADLS但遇到錯誤:shaded.databricks.org.apache.hadoop.fs.azure.AzureException: . lang。IllegalArgumentException:字符串不是一個有效的base64編碼的字符串。你能請幫助嗎?
AccountKey = dbutils.secrets。得到(=“ADB_KV_Secret_Scope”範圍,鍵=“dev-storage-account-clientid”)
url = " wasbs: / /(電子郵件保護)”
mnt =“/ mnt / findatamart”
款= " fs.azure.account.key.storage.blob.core.windows.net "
dbutils.fs.mount (
源url =,
mount_point = mnt,
extra_configs ={配置:AccountKey}
)
款= {" fs.azure.account.auth。類型”:“OAuth”,
“fs.azure.account.oauth.provider。類型”:“org.apache.hadoop.fs.azurebfs.oauth2.ClientCredsTokenProvider”,
”fs.azure.account.oauth2.client.id”:“<應用程序id >”,
“fs.azure.account.oauth2.client。秘密”:dbutils.secrets.get(範圍= < scope-name >”,鍵= < service-credential-key-name >),
“fs.azure.account.oauth2.client。端點”:“https://login.microsoftonline.com/ < directory-id > / oauth2 /令牌"}
#可選地,您可以添加<目錄名稱>源URI的掛載點。
dbutils.fs.mount (
源= " abfss: / / <容器名稱> @ < storage-account-name >。dfs.core.windows.net/”,
mount_point =“/ mnt / < mount-name >”,
extra_configs =配置)
取代