StreamingQuery.
runId
Returns the unique id of this query that does not persist across restarts. That is, every query that is started (or restarted from checkpoint) will have a different runId.
New in version 2.1.0.
The unique id of query that does not persist across restarts.
Examples
>>> sdf = spark.readStream.format("rate").load() >>> sq = sdf.writeStream.format('memory').queryName('this_query').start()
Get the unique id of this query that does not persist across restarts
>>> sq.runId '...'
>>> sq.stop()