gpt4 book ai didi

azure - 非法参数异常 : File must be dbfs or s3n:/

转载 作者:行者123 更新时间:2023-12-03 02:14:04 24 4
gpt4 key购买 nike

dbutils.fs.mount(
source = f"wasbs://{blob.storage_account_container}@{blob.storage_account_name}.blob.core.windows.net/",

mount_point = "/mnt/MLRExtract/",

extra_configs = {f"fs.azure.account.key.{blob.storage_account_name}.blob.core.windows.net":blob.storage_account_access_key})

在创建挂载点时,我遇到以下错误--

IllegalArgumentException:文件必须是 dbfs 或 s3n:/

最佳答案

这个错误IllegalArgumentException主要发生在语法上。您可以遵循以下语法,我在我的环境中重现了同样的事情,并且工作正常。

语法:

spark.conf.set("fs.azure.account.key.<storage-account-name>.dfs.core.windows.net", dbutils.secrets.get(scope="<Scope-Name>",key="Key_Value"))

dbutils.fs.mount(
source = "wasbs://<container-name>@<storage-account-name>.blob.core.windows.net/",
mount_point = "/mnt/io24",
extra_configs = {"fs.azure.account.key.<storage-account-name>.blob.core.windows.net":"<storage-account-Access key>"}).

Ref1

引用:

https://learn.microsoft.com/en-us/azure/databricks/data/data-sources/azure/adls-gen2/azure-datalake-gen2-sp-access

关于azure - 非法参数异常 : File must be dbfs or s3n:/,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72109539/

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