Spark Structured Streaming Multiple WriteStreams to Same Sink
问题 Two Writestream to the same database sink is not happening in sequence in Spark Structured Streaming 2.2.1. Please suggest how to make them execute in sequence. val deleteSink = ds1.writestream .outputMode("update") .foreach(mydbsink) .start() val UpsertSink = ds2.writestream .outputMode("update") .foreach(mydbsink) .start() deleteSink.awaitTermination() UpsertSink.awaitTermination() Using the above code, deleteSink is executed after UpsertSink . 回答1: If you want to have two streams running