【发布时间】:2021-10-11 06:48:02
【问题描述】:
我正在尝试为 AQS 流数据编写 ETL 管道。这是我的代码
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)
当我运行它时,我得到java.util.NoSuchElementException: key not found: eventType
这是我的队列的样子
你能发现并解释一下是什么问题吗?
【问题讨论】:
标签: pyspark databricks azure-databricks spark-structured-streaming azure-storage-queues