Loads a dataframe from a folder containing a stream of CSV files.
Loads a dataframe from a folder containing a stream of CSV files.
See UnderlyingDataStreamReader.csv for more information.
Loads a dataframe from a folder containing a stream of JSON files.
Loads a dataframe from a folder containing a stream of JSON files.
See UnderlyingDataStreamReader.json for more information.
Adds an option to the DataFrameReader.
Adds an option to the DataFrameReader.
Adds an option to the DataFrameReader.
Adds an option to the DataFrameReader.
Adds an option to the DataFrameReader.
Adds multiple options to the DataFrameReader.
Loads a dataframe from a folder containing a stream of ORC files.
Loads a dataframe from a folder containing a stream of ORC files.
See UnderlyingDataStreamReader.orc for more information.
Loads a dataframe from a folder containing a stream of PARQUET files.
Loads a dataframe from a folder containing a stream of PARQUET files.
See UnderlyingDataStreamReader.parquet for more information.
ZIO-Spark specifics function to generate the schema from a case class.
ZIO-Spark specifics function to generate the schema from a case class.
E.g.:
import zio.spark._ case class Person(name: String, age: Int) val ds: Dataset[Person] = SparkSession.read.schema[Person].csv("./path.csv").as[Person].getOrThrow
Replace the data schema of the DataFrameReader.
Replace the data schema of the DataFrameReader.
We advice you to always use a schema even if some data sources can infer the schema. It allows you to increase your job speed, it ensures that the schema is the expected one and it is useful as documentation.
E.g.:
schema("a INT, b STRING, c DOUBLE").csv("test.csv")
See UnderlyingDataStreamReader.schema for more information.
Replace the data schema of the DataFrameReader.
Replace the data schema of the DataFrameReader.
We advice you to always use a schema even if some data sources can infer the schema. It allows you to increase your job speed, it ensures that the schema is the expected one and it is useful as documentation.
See UnderlyingDataStreamReader.schema for more information.
Loads a dataframe from a folder containing a stream of TXT files.
Loads a dataframe from a folder containing a stream of TXT files.
The underlying schema of the Dataset contains a single string column named "value". The text files must be encoded as UTF-8.
See UnderlyingDataStreamReader.textFile for more information.
Loads a dataset[String] from a folder containing a stream of TXT files.
Loads a dataset[String] from a folder containing a stream of TXT files.
See UnderlyingDataStreamReader.textFile for more information.