【发布时间】:2020-08-29 08:52:48
【问题描述】:
我正在 Azure Databricks 中尝试此代码:
jsonSchema = StructType([ StructField("time", TimestampType(), True), StructField("action", StringType(), True) ])
// readstream from azure event hub
df = spark.readStream.format("eventhubs").options(**ehConf).schema(jsonSchema).load()
streamingCountsDF = (df.withWatermark("Time", "500 milliseconds").groupBy(
df.body,
window(df.enqueuedTime, "1 hour"))
.count()
)
//writing stream to azure blob
streamingCountsDF.writeStream.format("parquet").option("path", file_location).option("checkpointLocation", "/tmp/checkpoint").start()
file_location is the azure blob url.
我在最后一步遇到了错误:
org.apache.spark.sql.AnalysisException:当流式DataFrames/DataSets上没有水印的流式聚合时,不支持追加输出模式;;
我们如何解决这个问题?
【问题讨论】:
-
谁能回答这个问题。我正在尝试做的是将事件中心数据流式传输到 azure blob。
标签: pyspark spark-streaming azure-blob-storage databricks azure-databricks