class_docstr: Interface used to write a streaming :class:`DataFrame <pyspark.sql.DataFrame>` to external
  storage systems (e.g. file systems, key-value stores, etc).
  Use :attr:`DataFrame.writeStream <pyspark.sql.DataFrame.writeStream>`
  to access this.
  
  .. versionadded:: 2.0.0
  
  .. versionchanged:: 3.5.0
      Supports Spark Connect.
  
  Notes
  -----
  This API is evolving.
  
  Examples
  --------
  The example below uses Rate source that generates rows continuously.
  After that, we operate a modulo by 3, and then writes the stream out to the console.
  The streaming query stops in 3 seconds.
  
  >>> import time
  >>> df = spark.readStream.format("rate").load()
  >>> df = df.selectExpr("value % 3 as v")
  >>> q = df.writeStream.format("console").start()
  >>> time.sleep(3)
  >>> q.stop()
class_docstr_tok: ["Interface","used","to","write","a","streaming",":","class",":","`","DataFrame","<","pyspark.sql.DataFrame",">","`","to","external","storage","systems","(","e.g",".","file","systems",",","key-value","stores",",","etc",")",".","Use",":","attr",":","`","DataFrame.writeStream","<","pyspark.sql.DataFrame.writeStream",">","`","to","access","this",".","..","versionadded",":",":","2.0.0","..","versionchanged",":",":","3.5.0","Supports","Spark","Connect",".","Notes","--","--","-","This","API","is","evolving",".","Examples","--","--","--","--","The","example","below","uses","Rate","source","that","generates","rows","continuously",".","After","that",",","we","operate","a","modulo","by","3",",","and","then","writes","the","stream","out","to","the","console",".","The","streaming","query","stops","in","3","seconds",".",">",">",">","import","time",">",">",">","df","=","spark.readStream.format","(","``","rate","''",")",".load","(",")",">",">",">","df","=","df.selectExpr","(","``","value","%","3","as","v","''",")",">",">",">","q","=","df.writeStream.format","(","``","console","''",")",".start","(",")",">",">",">","time.sleep","(","3",")",">",">",">","q.stop","(",")"]
docstr: Streams the contents of the :class:`DataFrame` to a data source.
  
  The data source is specified by the ``format`` and a set of ``options``.
  If ``format`` is not specified, the default data source configured by
  ``spark.sql.sources.default`` will be used.
  
  .. versionadded:: 2.0.0
  
  .. versionchanged:: 3.5.0
      Supports Spark Connect.
  
  Parameters
  ----------
  path : str, optional
      the path in a Hadoop supported file system
  format : str, optional
      the format used to save
  outputMode : str, optional
      specifies how data of a streaming DataFrame/Dataset is written to a
      streaming sink.
  
      * `append`: Only the new rows in the streaming DataFrame/Dataset will be written to the
        sink
      * `complete`: All the rows in the streaming DataFrame/Dataset will be written to the
        sink every time these are some updates
      * `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 `append` mode.
  partitionBy : str or list, optional
      names of partitioning columns
  queryName : str, optional
      unique name for the query
  **options : dict
      All other string options. You may want to provide a `checkpointLocation`
      for most streams, however it is not required for a `memory` stream.
  
  Notes
  -----
  This API is evolving.
  
  Examples
  --------
  >>> df = spark.readStream.format("rate").load()
  
  Basic example.
  
  >>> q = df.writeStream.format('memory').queryName('this_query').start()
  >>> q.isActive
  True
  >>> q.name
  'this_query'
  >>> q.stop()
  >>> q.isActive
  False
  
  Example with using other parameters with a trigger.
  
  >>> q = df.writeStream.trigger(processingTime='5 seconds').start(
  ...     queryName='that_query', outputMode="append", format='memory')
  >>> q.name
  'that_query'
  >>> q.isActive
  True
  >>> q.stop()
docstr_tok: ["Streams","the","contents","of","the",":","class",":","`","DataFrame","`","to","a","data","source",".","The","data","source","is","specified","by","the","``","format","``","and","a","set","of","``","options","``",".","If","``","format","``","is","not","specified",",","the","default","data","source","configured","by","``","spark.sql.sources.default","``","will","be","used",".","..","versionadded",":",":","2.0.0","..","versionchanged",":",":","3.5.0","Supports","Spark","Connect",".","Parameters","--","--","--","--","--","path",":","str",",","optional","the","path","in","a","Hadoop","supported","file","system","format",":","str",",","optional","the","format","used","to","save","outputMode",":","str",",","optional","specifies","how","data","of","a","streaming","DataFrame\/Dataset","is","written","to","a","streaming","sink",".","*","`","append","`",":","Only","the","new","rows","in","the","streaming","DataFrame\/Dataset","will","be","written","to","the","sink","*","`","complete","`",":","All","the","rows","in","the","streaming","DataFrame\/Dataset","will","be","written","to","the","sink","every","time","these","are","some","updates","*","`","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","does","n't","contain","aggregations",",","it","will","be","equivalent","to","`","append","`","mode",".","partitionBy",":","str","or","list",",","optional","names","of","partitioning","columns","queryName",":","str",",","optional","unique","name","for","the","query","*","*","options",":","dict","All","other","string","options",".","You","may","want","to","provide","a","`","checkpointLocation","`","for","most","streams",",","however","it","is","not","required","for","a","`","memory","`","stream",".","Notes","--","--","-","This","API","is","evolving",".","Examples","--","--","--","--",">",">",">","df","=","spark.readStream.format","(","``","rate","''",")",".load","(",")","Basic","example",".",">",">",">","q","=","df.writeStream.format","(","'memory","'",")",".queryName","(","'this_query","'",")",".start","(",")",">",">",">","q.isActive","True",">",">",">","q.name","'this_query'",">",">",">","q.stop","(",")",">",">",">","q.isActive","False","Example","with","using","other","parameters","with","a","trigger",".",">",">",">","q","=","df.writeStream.trigger","(","processingTime=","'","5","seconds","'",")",".start","(","...","queryName='that_query","'",",","outputMode=","''","append","''",",","format='memory","'",")",">",">",">","q.name","'that_query'",">",">",">","q.isActive","True",">",">",">","q.stop","(",")"]
code: def start(
      self,
      path: Optional[str] = None,
      format: Optional[str] = None,
      outputMode: Optional[str] = None,
      partitionBy: Optional[Union[str, List[str]]] = None,
      queryName: Optional[str] = None,
      **options: "OptionalPrimitiveType",
  ) -> StreamingQuery:
      """Streams the contents of the :class:`DataFrame` to a data source.
  
      The data source is specified by the ``format`` and a set of ``options``.
      If ``format`` is not specified, the default data source configured by
      ``spark.sql.sources.default`` will be used.
  
      .. versionadded:: 2.0.0
  
      .. versionchanged:: 3.5.0
          Supports Spark Connect.
  
      Parameters
      ----------
      path : str, optional
          the path in a Hadoop supported file system
      format : str, optional
          the format used to save
      outputMode : str, optional
          specifies how data of a streaming DataFrame/Dataset is written to a
          streaming sink.
  
          * `append`: Only the new rows in the streaming DataFrame/Dataset will be written to the
            sink
          * `complete`: All the rows in the streaming DataFrame/Dataset will be written to the
            sink every time these are some updates
          * `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 `append` mode.
      partitionBy : str or list, optional
          names of partitioning columns
      queryName : str, optional
          unique name for the query
      **options : dict
          All other string options. You may want to provide a `checkpointLocation`
          for most streams, however it is not required for a `memory` stream.
  
      Notes
      -----
      This API is evolving.
  
      Examples
      --------
      >>> df = spark.readStream.format("rate").load()
  
      Basic example.
  
      >>> q = df.writeStream.format('memory').queryName('this_query').start()
      >>> q.isActive
      True
      >>> q.name
      'this_query'
      >>> q.stop()
      >>> q.isActive
      False
  
      Example with using other parameters with a trigger.
  
      >>> q = df.writeStream.trigger(processingTime='5 seconds').start(
      ...     queryName='that_query', outputMode="append", format='memory')
      >>> q.name
      'that_query'
      >>> q.isActive
      True
      >>> q.stop()
      """
      self.options(**options)
      if outputMode is not None:
          self.outputMode(outputMode)
      if partitionBy is not None:
          self.partitionBy(partitionBy)
      if format is not None:
          self.format(format)
      if queryName is not None:
          self.queryName(queryName)
      if path is None:
          return self._sq(self._jwrite.start())
      else:
          return self._sq(self._jwrite.start(path))
  
imports: import sys
  from collections.abc import Iterator
  from typing import cast, overload, Any, Callable, List, Optional, TYPE_CHECKING, Union
  from py4j.java_gateway import java_import, JavaObject
  from pyspark.sql.column import _to_seq
  from pyspark.sql.readwriter import OptionUtils, to_str
  from pyspark.sql.streaming.query import StreamingQuery
  from pyspark.sql.types import Row, StructType
  from pyspark.sql.utils import ForeachBatchFunction
  from pyspark.errors import PySparkTypeError, PySparkValueError, PySparkAttributeError, PySparkRuntimeError
label_desc: Use image node_id 21 for calling the DataStreamWriter obj's underlying member method code with example usage: obj.start(path, format, outputMode, partitionBy, queryName) and returns: self, self