pyspark.sql.streaming.StreamingQueryManager.get¶
-
StreamingQueryManager.
get
(id: str) → pyspark.sql.streaming.query.StreamingQuery¶ Returns an active query from this SQLContext or throws exception if an active query with this name doesn’t exist.
Examples
>>> sq = sdf.writeStream.format('memory').queryName('this_query').start() >>> sq.name 'this_query' >>> sq = spark.streams.get(sq.id) >>> sq.isActive True >>> sq = sqlContext.streams.get(sq.id) >>> sq.isActive True >>> sq.stop()