StreamingQueryManager.
active
Returns a list of active queries associated with this SparkSession
New in version 2.0.0.
The active queries associated with this SparkSession.
SparkSession
Examples
>>> sdf = spark.readStream.format("rate").load() >>> sdf.printSchema() root |-- timestamp: timestamp (nullable = true) |-- value: long (nullable = true)
>>> sq = sdf.writeStream.format('memory').queryName('this_query').start() >>> sqm = spark.streams
Get the list of active streaming queries
>>> [q.name for q in sqm.active] ['this_query'] >>> sq.stop()