id (StreamingQuery)
Returns the unique ID of this query that persists across restarts from checkpoint data. The ID is generated when a query is started for the first time, and is the same every time it is restarted from checkpoint data. There can only be one query with the same ID active in a Spark cluster.
Returns
str
Examples
Python
sdf = spark.readStream.format("rate").load()
sq = sdf.writeStream.format('memory').queryName('this_query').start()
sq.id
# '...'
sq.stop()