runId (StreamingQuery)
Returns the unique ID of this query that does not persist across restarts. Every query that is started (or restarted from checkpoint) will have a different runId.
Returns
str
Examples
Python
sdf = spark.readStream.format("rate").load()
sq = sdf.writeStream.format('memory').queryName('this_query').start()
sq.runId
# '...'
sq.stop()