Skip to content

ConsoleSinkProvider

ConsoleSinkProvider is a SimpleTableProvider (Spark SQL) for console data source.

ConsoleSinkProvider is a DataSourceRegister (Spark SQL) and registers itself as the console data source format.

ConsoleSinkProvider is a CreatableRelationProvider (Spark SQL).

Demo

import org.apache.spark.sql.streaming.Trigger
val q = spark
  .readStream
  .format("rate")
  .load
  .writeStream
  .format("console") // <-- requests ConsoleSinkProvider for a sink
  .trigger(Trigger.Once)
  .start
scala> println(q.lastProgress.sink)
{
  "description" : "org.apache.spark.sql.execution.streaming.ConsoleSinkProvider@2392cfb1"
}