无需帐户密钥即可在 Databricks 中读取 Excel

问题描述 投票:0回答:1

在databricks上我安装了以下软件包

com.crealytics:spark-excel_2.12:0.13.5

我的代码如下所示

df = spark.read.format("com.crealytics.spark.excel")\
.option("header", "false") \
.option("inferSchema", "true") \
.option("dataAddress", "Version") \
.load('abfss://abc.xlsx')

在我的集群配置中,我有服务主体的配置:

fs.azure.account.oauth2.client.secret {{secrets/xx}}
fs.azure.account.auth.type OAuth
spark.databricks.delta.preview.enabled true
fs.azure.account.oauth2.client.endpoint https://login.microsoftonline.com/0x/oauth2/token
fs.azure.account.oauth.provider.type org.apache.hadoop.fs.azurebfs.oauth2.ClientCredsTokenProvider
fs.azure.account.oauth2.client

我收到以下错误:

Failure to initialize configurationInvalid configuration value detected for fs.azure.account.key

如何在没有帐户密钥的情况下访问该数据?

apache-spark databricks
1个回答
0
投票

无需帐户密钥也可使用。只需设置:

fs.azure.account.oauth2.client.secret 
fs.azure.account.auth.type OAuth
spark.databricks.delta.preview.enabled 
fs.azure.account.oauth2.client.endpoint 
fs.azure.account.oauth.provider.type org.apache.hadoop.fs.azurebfs.oauth2.ClientCredsTokenProvider
fs.azure.account.oauth2.client.id 5

重要提示:完全重新启动集群以便应用更改

© www.soinside.com 2019 - 2024. All rights reserved.