gpt4 book ai didi

azure - 连接到 Blob 存储 "no credentials found for them in the configuration"

转载 作者:行者123 更新时间:2023-12-04 17:45:24 26 4
gpt4 key购买 nike

我正在使用 Spark 集群支持的 Databricks 笔记本。尝试连接到 Azure Blob 存储时遇到问题。我用过这个link并尝试了直接访问 Azure Blob 存储 - 设置帐户访问 key 部分。我在这里没有收到错误:

spark.conf.set(
"fs.azure.account.key.<your-storage-account-name>.blob.core.windows.net",
"<your-storage-account-access-key>")

但是当我尝试在目录上执行“ls”时收到错误:

dbutils.fs.ls("wasbs://<your-container-name>@<your-storage-account-name>.blob.core.windows.net/<your-directory-name>")

shaded.databricks.org.apache.hadoop.fs.azure.AzureException: shaded.databricks.org.apache.hadoop.fs.azure.AzureException: Unable to access container <container name> in account <storage account name>core.windows.net using anonymous credentials, and no credentials found for them in the configuration.

如果有更好的方法,也请提供建议。谢谢

最佳答案

  1. 设置配置时,您需要传递存储帐户名称 key 。您可以从 Azure 门户找到此信息。
spark.conf.set(
"fs.azure.account.key.<your-storage-account-name>.blob.core.windows.net",
"<your-storage-account-access-key>")
  • 此外,在执行 ls 时,您需要添加容器名称目录名称。
  • dbutils.fs.ls("wasbs://<your-container-name>@<your-storage-account-name>.blob.core.windows.net/<your-directory-name>")

    希望这能解决您的问题!

    关于azure - 连接到 Blob 存储 "no credentials found for them in the configuration",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52318546/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com