Class/Object

zio.spark.sql.streaming

DataStreamWriter

Related Docs: object DataStreamWriter | package streaming

Permalink

final case class DataStreamWriter[T] extends Product with Serializable

Self Type
DataStreamWriter[T]
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DataStreamWriter
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def continuouslyWithCheckpointEvery(duration: zio.Duration): DataStreamWriter[T]

    Permalink

    A ZIO-Spark specific function to describe a continuously stream with checkpoint.

    A ZIO-Spark specific function to describe a continuously stream with checkpoint.

    Scala Example, using ZIO duration ops:

    df.writeStream.continuouslyWithCheckpointEvery(5.seconds)
  7. val ds: Dataset[T]

    Permalink
  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. def foreach(writer: ForeachWriter[T]): DataStreamWriter[T]

    Permalink

    Sets the output of the streaming query to be processed using the provided writer object.

    Sets the output of the streaming query to be processed using the provided writer object. object. See org.apache.spark.sql.ForeachWriter for more details on the lifecycle and semantics.

    Since

    2.0.0

  11. val foreachWriter: Option[ForeachWriter[T]]

    Permalink
  12. def format(source: String): DataStreamWriter[T]

    Permalink

    Change the source (sink) of the stream.

    Change the source (sink) of the stream.

    Since

    2.0.0

  13. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  16. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. def once: DataStreamWriter[T]

    Permalink

    A ZIO-Spark specific function to run the streaming job only once.

  19. def option(key: String, value: Double): DataStreamWriter[T]

    Permalink

    Adds an option to the DataFrameWriter.

  20. def option(key: String, value: Float): DataStreamWriter[T]

    Permalink

    Adds an option to the DataFrameWriter.

  21. def option(key: String, value: Int): DataStreamWriter[T]

    Permalink

    Adds an option to the DataFrameWriter.

  22. def option(key: String, value: Boolean): DataStreamWriter[T]

    Permalink

    Adds an option to the DataFrameWriter.

  23. def option(key: String, value: String): DataStreamWriter[T]

    Permalink

    Adds an option to the DataFrameWriter.

  24. def options(options: Map[String, String]): DataStreamWriter[T]

    Permalink

    Adds multiple options to the DataFrameWriter.

  25. val options: Map[String, String]

    Permalink
  26. def outputMode(outputMode: OutputMode): DataStreamWriter[T]

    Permalink

    Specifies how data of a streaming DataFrame/Dataset is written to a streaming sink.

    Specifies how data of a streaming DataFrame/Dataset is written to a streaming sink.

    • OutputMode.Append(): only the new rows in the streaming DataFrame/Dataset will be written to the sink.
    • OutputMode.Complete(): all the rows in the streaming DataFrame/Dataset will be written to the sink every time there are some updates.
    • OutputMode.Update(): only the rows that were updated in the streaming DataFrame/Dataset will be written to the sink every time there are some updates. If the query doesn't contain aggregations, it will be equivalent to OutputMode.Append() mode.
    Since

    2.0.0

  27. val outputMode: OutputMode

    Permalink
  28. def partitionBy(colName: String, colNames: String*): DataStreamWriter[T]

    Permalink

    Partitions the output by the given columns on the file system.

    Partitions the output by the given columns on the file system. If specified, the output is laid out on the file system similar to Hive's partitioning scheme. As an example, when we partition a dataset by year and then month, the directory layout would look like:

    • year=2016/month=01/
    • year=2016/month=02/

    Partitioning is one of the most widely used techniques to optimize physical data layout. It provides a coarse-grained index for skipping unnecessary data reads when queries have predicates on the partitioned columns. In order for partitioning to work well, the number of distinct values in each column should typically be less than tens of thousands.

    Since

    2.0.0

  29. val partitioningColumns: Option[Seq[String]]

    Permalink
  30. def queryName(queryName: String): DataStreamWriter[T]

    Permalink

    Specifies the name of the StreamingQuery that can be started with start().

    Specifies the name of the StreamingQuery that can be started with start(). This name must be unique among all the currently active queries in the associated SQLContext.

    Since

    2.0.0

  31. def run: Task[Unit]

    Permalink

    Generate the stream as a stoppable blocking task handled by ZIO.

  32. val source: Option[String]

    Permalink
  33. def start: Task[StreamingQuery]

    Permalink

    Starts the execution of the streaming query, which will continually output results to the given path as new data arrives.

    Starts the execution of the streaming query, which will continually output results to the given path as new data arrives. The returned StreamingQuery object can be used to interact with the stream. Throws a TimeoutException if the following conditions are met:

    • Another run of the same streaming query, that is a streaming query sharing the same checkpoint location, is already active on the same Spark Driver
    • The SQL configuration spark.sql.streaming.stopActiveRunOnRestart is enabled
    • The active run cannot be stopped within the timeout controlled by the SQL configuration spark.sql.streaming.stopTimeout
    Annotations
    @throws( ... )
    Since

    2.0.0

  34. def start(path: String): Task[StreamingQuery]

    Permalink

    Starts the execution of the streaming query, which will continually output results to the given path as new data arrives.

    Starts the execution of the streaming query, which will continually output results to the given path as new data arrives. The returned StreamingQuery object can be used to interact with the stream.

    Since

    2.0.0

  35. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  36. def test: Task[Unit]

    Permalink

    Generate a stream with only the available current input.

    Generate a stream with only the available current input. Generally used for testing purpose.

  37. def trigger(trigger: Trigger): DataStreamWriter[T]

    Permalink

    Set the trigger for the stream query.

    Set the trigger for the stream query. The default value is ProcessingTime(0) and it will run the query as fast as possible.

    Scala Example:

    df.writeStream.trigger(ProcessingTime("10 seconds"))
    
    import scala.concurrent.duration._
    df.writeStream.trigger(ProcessingTime(10.seconds))
    Since

    2.0.0

  38. val trigger: Trigger

    Permalink
  39. def triggerEvery(duration: zio.Duration): DataStreamWriter[T]

    Permalink

    A ZIO-Spark specific function to describe a micro batch stream.

    A ZIO-Spark specific function to describe a micro batch stream.

    Scala Example, using ZIO duration ops:

    df.writeStream.triggerEvery(5.seconds)
  40. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  41. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  42. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped