簡體   English   中英

無法從 Azure/databricks 訪問 azure 個容器

[英]Trouble to access azure containers from Azure/databricks

我無法從 Azure/Databricks 訪問 Azure 容器。 我按照此教程中的說明進行操作,因此我開始創建我的容器並生成dbutils.fs.mount( source = endpoint_source, mount_point = mountPoint_folder, extra_configs = {config: sas})然后在數據塊筆記本上,我提供了以下命令

我將endppoint_sourcemountPoint_foldersas替換為以下內容

container_name = "containertobesharedwithdatabricks" storage_account_name = "atabricksstorageaccount" storage_account_url = storage_account_name + ".blob.core.windows.net" sas = "?sv=2021-06-08&ss=bfqt&srt=o&sp=rwdlacupiytfx&se=..."

endpoint_source = "wasbs://"+ storage_account_url + "/" + container_name mountPoint_folder = "/mnt/projet8" config = "fs.azure.sas."+ container_name + "."+ storage_account_url

but I ended with the following exception: shaded.databricks.org.apache.hadoop.fs.azure.AzureException: shaded.databricks.org.apache.hadoop.fs.azure.AzureException: Container $root in account atabricksstorageaccount.blob.core.windows.net not found, and we can't create it using anoynomous credentials, and no credentials found for them in the configuration.

我不明白為什么數據塊找不到根容器。 任何幫助將不勝感激。 提前致謝。

storage account和文件夾是存在的,從這張截圖中可以看出,所以我很疑惑。

在此處輸入圖像描述

  • 使用與您相同的方法,我得到了相同的錯誤:

在此處輸入圖像描述

  • 使用以下代碼,我能夠成功安裝。 將 endpoint_source 值更改為格式wasbs://<container-name>@<storage-account-name>.blob.core.windows.net
endpoint_source = 'wasbs://data@blb2301.blob.core.windows.net'
mp = '/mnt/repro'
config = "fs.azure.sas.data.blb2301.blob.core.windows.net"
sas = "<sas>"

dbutils.fs.mount( source = endpoint_source, mount_point = mp, extra_configs = {config : sas})

在此處輸入圖像描述

我的壞...,我只是錯過了容器和帳戶名之間的“@”。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM