DataStreamReader
Loads a streaming DataFrame from a streaming source. Use SparkSession.readStream to access this.
Mirrors the public surface of org.apache.spark.sql.streaming.DataStreamReader over the Spark Connect protocol. A streaming read is expressed as a Read relation whose is_streaming flag is set, so the resulting DataFrame is unbounded and is meant to be consumed through a DataStreamWriter.
Attributes
- Example
-
val df = spark.readStream.format("rate").option("rowsPerSecond", 5).load() - Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
Value members
Concrete methods
Returns the row-level changes (Change Data Capture) of the table as a streaming DataFrame (Spark 4.2+), for Data Source V2 tables whose catalog supports change logs. Use options such as startingVersion to choose where to start.
Returns the row-level changes (Change Data Capture) of the table as a streaming DataFrame (Spark 4.2+), for Data Source V2 tables whose catalog supports change logs. Use options such as startingVersion to choose where to start.
Attributes
Specifies the input data source format (e.g. "rate", "kafka").
Specifies the input data source format (e.g. "rate", "kafka").
Attributes
- Returns
-
this reader, for chaining.
Names this streaming source (Spark 4.2+). The name identifies the source in checkpoint metadata, so a query keeps a stable checkpoint location when its sources evolve. Names may only contain ASCII letters, digits, and underscores.
Names this streaming source (Spark 4.2+). The name identifies the source in checkpoint metadata, so a query keeps a stable checkpoint location when its sources evolve. Names may only contain ASCII letters, digits, and underscores.
Attributes
Adds an input option for the underlying data source.
Adds an input option for the underlying data source.
Attributes
- Returns
-
this reader, for chaining.
Adds a boolean input option. @return this reader, for chaining.
Adds a boolean input option. @return this reader, for chaining.
Attributes
Adds a long input option. @return this reader, for chaining.
Adds a long input option. @return this reader, for chaining.
Attributes
Adds a double input option. @return this reader, for chaining.
Adds a double input option. @return this reader, for chaining.
Attributes
Adds multiple input options.
Adds multiple input options.
Attributes
- Returns
-
this reader, for chaining.
(Java-specific) Adds multiple input options.
(Java-specific) Adds multiple input options.
Attributes
Specifies the input schema using a DDL-formatted string (e.g. "a INT, b STRING").
Specifies the input schema using a DDL-formatted string (e.g. "a INT, b STRING").
Attributes
- Returns
-
this reader, for chaining.
Specifies the input schema using a StructType.
Specifies the input schema using a StructType.
Attributes
- Returns
-
this reader, for chaining.
Loads a text file stream and returns a Dataset[String] of its lines.
Loads a text file stream and returns a Dataset[String] of its lines.