嘿
你需要認證abfss
配置身份驗證service_credential = dbutils.secrets.get(範圍= " < >範圍”,關鍵= < service-credential-key >) spark.conf.set (“fs.azure.account.auth.type。< storage-account > .dfs.core.windows.net”,“OAuth”) spark.conf.set (“fs.azure.account.oauth.provider.type。< storage-account > .dfs.core.windows.net”,“org.apache.hadoop.fs.azurebfs.oauth2.ClientCredsTokenProvider”) spark.conf.set (“fs.azure.account.oauth2.client.id。< storage-account > .dfs.core.windows.net”,“<應用程序id >”) spark.conf.set (“fs.azure.account.oauth2.client.secret。< storage-account > .dfs.core.windows.net”, service_credential) spark.conf.set (“fs.azure.account.oauth2.client.endpoint。< storage-account > .dfs.core.windows.net ", " https://login.microsoftonline.com/ < directory-id > / oauth2 /令牌”)
你可以查看以下兩個鏈接:
https://docs.www.eheci.com/external-data/azure-storage.html
https://docs.www.eheci.com/_static/notebooks/adls-gen2-service-principal.html