繁体   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