pyspark.sql.streaming.StreamingQuery.stop

StreamingQuery.stop() → None[source]

Stop this streaming query.

New in version 2.0.0.

Examples

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

Stop streaming query

>>> sq.stop()
>>> sq.isActive
False