Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Called when the query is idle and waiting for new data to process.
Syntax
onQueryIdle(event)
Parameters
| Parameter | Type | Description |
|---|---|---|
event |
QueryIdleEvent | The event object containing information about the idle query. |
Returns
None
Examples
from pyspark.sql.streaming import StreamingQueryListener
class MyListener(StreamingQueryListener):
def onQueryStarted(self, event):
pass
def onQueryProgress(self, event):
pass
def onQueryIdle(self, event):
print(f"Query idle: {event.id}")
def onQueryTerminated(self, event):
pass
spark.streams.addListener(MyListener())