Can we chain multiple foreachBatch
in Spark Structured streaming?
Eg:
df.writeStream.format("parquet")
.foreachBatch(pre_process)
.foreachBatch(mask)
.trigger(once=True)
.outputMode("append")
.option("checkpointLocation", "location")
.start()
If not possible, can the function in foreachBatch
call multiple other batch functions?
Wording of question a little awkward compared to example, but...
foreachBatch
es run independently.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.