从数据块连接到数据湖(ADLS Gen2)存储时出错
Error connecting to DataLake(ADLS Gen2) store from databricks
我正在尝试从数据块 python 连接到 dataLake Gen2 存储,不幸的是我 运行 出错了。
代码:
dbutils.fs.ls("abfss://<fsystem name>@<storage name>.dfs.core.windows.net/<folder name>")
错误信息:
Configuration property .dfs.core.windows.net not found.
我怀疑是不是和我的挂载码有关?此外,我使用存储资源管理器将租户 ID 添加到容器 "manage access"。
这是我的挂载代码:
configs = {"fs.azure.account.auth.type": "OAuth",
"fs.azure.account.oauth.provider.type": "org.apache.hadoop.fs.azurebfs.oauth2.ClientCredsTokenProvider",
"fs.azure.account.oauth2.client.id": "<client ID>",
"fs.azure.account.oauth2.client.secret": "secret",
"fs.azure.account.oauth2.client.endpoint": "https://login.microsoftonline.com/directory id/oauth2/token"}
dbutils.fs.mount( source = "abfss://filesystem name@<storage name>.dfs.core.windows.net/", mount_point = /mnt/soldel", extra_configs = configs)
装载代码运行 很好,没有错误。请推荐
注意:如果不使用 Databricks 配置存储帐户,则无法访问 Azure Data Lake Gen2 帐户。
这是预期的错误消息,因为您尚未配置带有数据块的存储帐户以列出文件系统。
请查看报错信息,看看Databricks中list filesystem的正确过程。
详情请参考“Databricks - Azure Data Lake Storage Gen2”。
希望对您有所帮助。
我正在尝试从数据块 python 连接到 dataLake Gen2 存储,不幸的是我 运行 出错了。
代码:
dbutils.fs.ls("abfss://<fsystem name>@<storage name>.dfs.core.windows.net/<folder name>")
错误信息:
Configuration property .dfs.core.windows.net not found.
我怀疑是不是和我的挂载码有关?此外,我使用存储资源管理器将租户 ID 添加到容器 "manage access"。
这是我的挂载代码:
configs = {"fs.azure.account.auth.type": "OAuth",
"fs.azure.account.oauth.provider.type": "org.apache.hadoop.fs.azurebfs.oauth2.ClientCredsTokenProvider",
"fs.azure.account.oauth2.client.id": "<client ID>",
"fs.azure.account.oauth2.client.secret": "secret",
"fs.azure.account.oauth2.client.endpoint": "https://login.microsoftonline.com/directory id/oauth2/token"}
dbutils.fs.mount( source = "abfss://filesystem name@<storage name>.dfs.core.windows.net/", mount_point = /mnt/soldel", extra_configs = configs)
装载代码运行 很好,没有错误。请推荐
注意:如果不使用 Databricks 配置存储帐户,则无法访问 Azure Data Lake Gen2 帐户。
这是预期的错误消息,因为您尚未配置带有数据块的存储帐户以列出文件系统。
请查看报错信息,看看Databricks中list filesystem的正确过程。
详情请参考“Databricks - Azure Data Lake Storage Gen2”。
希望对您有所帮助。