pyspark 从Azure数据块连接到Azure表存储

wsewodh2  于 4个月前  发布在  Spark
关注(0)|答案(1)|浏览(49)

我正在尝试从Databricks连接到Azure表存储。我似乎找不到任何不转到Blob容器的资源,但我已经尝试为表修改它。

spark.conf.set(
  "fs.azure.account.key.accountname.table.core.windows.net",
  "accountkey")

blobDirectPath = "wasbs://accountname.table.core.windows.net/TableName"

df = spark.read.parquet(blobDirectPath)

字符串
我现在假设表是 parquet 文件。我现在得到这个代码的认证错误。

tf7tbtn2

tf7tbtn21#

根据我的研究,Azure Databricks不支持Azure表存储的数据源。有关详细信息,请参阅https://learn.microsoft.com/en-gb/azure/databricks/external-data/ .

此外,如果您仍然想使用表存储,您可以使用Azure Cosmos DB Table API。但它们有一些差异。有关详细信息,请参阅https://learn.microsoft.com/en-us/azure/cosmos-db/faq#where-is-table-api-not-identical-with-azure-table-storage-behavior。

相关问题