pyspark.sql.streaming.StreamingQuery.isActive#

property StreamingQuery.isActive#

Whether this streaming query is currently active or not.

Added in version 2.0.0.

Changed in version 3.5.0: Supports Spark Connect.

Returns:
bool

The result whether specified streaming query is currently active or not.

Examples

>>> sdf = spark.readStream.format("rate").load()
>>> sq = sdf.writeStream.format('memory').queryName('this_query').start()
>>> sq.isActive
True
>>> sq.stop()