# DataStreamWriter Class

## Definition

DataStreamWriter provides functionality to write a streaming DataFrame to external storage systems (e.g. file systems, key-value stores, etc).

public sealed class DataStreamWriter
type DataStreamWriter = class
Public NotInheritable Class DataStreamWriter
Inheritance
DataStreamWriter

## Methods

 Sets the output of the streaming query to be processed using the provided writer object. See IForeachWriter for more details on the lifecycle and semantics. Sets the output of the streaming query to be processed using the provided function. This is supported only in the micro-batch execution modes (that is, when the trigger is not continuous). In every micro-batch, the provided function will be called in every micro-batch with (i) the output rows as a DataFrame and (ii) the batch identifier. The batchId can be used to deduplicate and transactionally write the output (that is, the provided Dataset) to external systems. The output DataFrame is guaranteed to exactly same for the same batchId (assuming all operations are deterministic in the query). Specifies the underlying output data source. Adds an output option for the underlying data source. Adds an output option for the underlying data source. Adds an output option for the underlying data source. Adds an output option for the underlying data source. Adds output options for the underlying data source. Specifies how data of a streaming DataFrame is written to a streaming sink. Specifies how data of a streaming DataFrame is written to a streaming sink. 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. 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. Starts the execution of the streaming query. Sets the trigger for the stream query.