
Answer-first summary for fast verification
Answer: Spark.readStream.format("delta").table("sales").createOrReplaceTempView("streaming_vw")
The correct answer is `Spark.readStream.format("delta").table("sales").createOrReplaceTempView("streaming_vw")`. When you load a Delta table as a stream source and use it in a streaming query, the query processes all of the data present in the table as well as any new data that arrives after the stream is started. You can load both paths and tables as a stream, and you also have the ability to ignore deletes and changes (updates, Merge, overwrites) on the Delta table. For more information, visit [Delta Streaming](https://docs.databricks.com/delta/delta-streaming.html#delta-table-as-a-source).
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
Which command successfully creates a view on top of a Delta stream (stream on Delta table)?
A
Spark.read.format("delta").table("sales").createOrReplaceTempView("streaming_vw")
B
Spark.read.format("delta").table("sales").mode("stream").createOrReplaceTempView("streaming_vw")
C
Spark.read.format("delta").table("sales").trigger("stream").createOrReplaceTempView("streaming_vw")
D
Spark.read.format("delta").stream("sales").createOrReplaceTempView("streaming_vw")
E
You can not create a view on streaming data source.
F
Spark.readStream.format("delta").table("sales").createOrReplaceTempView("streaming_vw")