org.apache.spark.sql.streaming
A trigger that runs a query periodically based on the processing time. If interval is 0, the query will run as fast as possible.
interval
Scala Example:
df.writeStream.trigger(ProcessingTime("10 seconds")) import scala.concurrent.duration._ df.writeStream.trigger(ProcessingTime(10.seconds))
Java Example:
df.writeStream.trigger(ProcessingTime.create("10 seconds")) import java.util.concurrent.TimeUnit df.writeStream.trigger(ProcessingTime.create(10, TimeUnit.SECONDS))
(Since version 2.2.0) use Trigger.ProcessingTime(intervalMs)
2.0.0
A trigger that runs a query periodically based on the processing time. If
interval
is 0, the query will run as fast as possible.Scala Example:
Java Example:
(Since version 2.2.0) use Trigger.ProcessingTime(intervalMs)
2.0.0