
Answer-first summary for fast verification
Answer: `spark.streams.active`
The correct method to list all active streams in Databricks is `spark.streams.active`. This method returns a list of all currently active streaming queries, allowing you to iterate over them and stop each one individually.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
To stop all running streams in Python, you first need to identify which streams are currently active. Fill in the blank in the following code snippet to correctly list all active streams for stopping:
for s in _______________:
s.stop()
for s in _______________:
s.stop()
A
activeStreams()
B
spark.streams.getActive
C
Spark.getActiveStreams()
D
spark.streams.active
E
getActiveStreams()