简体   繁体   English

Databricks:Azure Queue Storage structured streaming key not found 错误

[英]Databricks: Azure Queue Storage structured streaming key not found error

I am trying to write ETL pipeline for AQS streaming data.我正在尝试为 AQS 流数据编写 ETL 管道。 Here is my code这是我的代码

CONN_STR = dbutils.secrets.get(scope="kvscope", key = "AZURE-STORAGE-CONN-STR")

schema = StructType([
    StructField("id", IntegerType()),
    StructField("parkingId", IntegerType()),
    StructField("capacity", IntegerType()),
    StructField("freePlaces", IntegerType()),
    StructField("insertTime", TimestampType())
  ])

stream = spark.readStream \
.format("abs-aqs") \
.option("fileFormat", "json") \
.option("queueName", "freeparkingplaces") \
.option("connectionString", CONN_STR) \
.schema(schema) \
.load()

display(stream)

When I run this I am getting java.util.NoSuchElementException: key not found: eventType当我运行它时,我得到java.util.NoSuchElementException: key not found: eventType

Here is how my queue looks like这是我的队列的样子显示_1

Can you spot and explain me what is the problem?你能发现并解释一下问题是什么吗?

The abs-aqs connector isn't for consumption of data from AQS, but it's for getting data about new files in the blob storage using events reported to AQS. abs-aqs连接器不是用于使用 AQS 中的数据,而是用于使用报告给 AQS 的事件获取有关 blob 存储中新文件的数据。 That's why you're specifying the the file format option, and schema - but these parameters will be applied to the files, not messages in AQS.这就是您指定文件格式选项和架构的原因 - 但这些参数将应用于文件,而不是 AQS 中的消息。

As far as I know (I could be wrong), there is no Spark connector for AQS, and it's usually recommended to use EventHubs or Kafka as messaging solution.据我所知(我可能是错的),AQS 没有 Spark 连接器,通常建议使用 EventHubs 或 Kafka 作为消息传递解决方案。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为 Microsoft Azure Blob 存储自动化 Snowpipe - 错误:找不到通道的队列 - Automating Snowpipe for Microsoft Azure Blob Storage - error: Queue not found for channel 带有 Azure 表存储的错误 Databricks Scala 应用程序 - Error Databricks Scala Application with Azure Table Storage Apache Spark Streaming 连接字符串错误,Databricks 连接到 Azure 事件中心 - Apache Spark Streaming Connection String error with Databricks connection to Azure Event Hub Azure 服务总线错误:使用 Databricks 创建队列时确保 RequiresSession 设置为 true - Azure Service Bus Error: Ensure RequiresSession is set to true when creating a Queue, with Databricks Azure 队列触发错误使用.Net.Sdk.Functions 3.0.13:错误索引方法'Function1',存储:未找到帐户信息的有效组合 - Azure queue trigger error using .Net.Sdk.Functions 3.0.13: Error indexing method 'Function1',Storage: No valid combination of account info found 使用数据块集群执行 azure 存储上存在的 python 代码 - Executing python code present on azure storage using databricks cluster Azure blob 存储流性能问题 - Azure blob storage streaming performance issue 在 spark 集群配置数据块中参数化 azure 存储帐户名称 - parameterize azure storage account name in spark cluster config databricks Python:检查Azure队列存储是否存在 - Python: Check if Azure queue storage exists 如何模拟 Azure 单元测试的队列存储? - How to mock Azure Queue storage for unit test?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM