DataStreamReader.Schema Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Schema(StructType) |
Specifies the schema by using StructType. |
Schema(String) |
Specifies the schema by using the given DDL-formatted string. |
Schema(StructType)
Specifies the schema by using StructType.
public Microsoft.Spark.Sql.Streaming.DataStreamReader Schema (Microsoft.Spark.Sql.Types.StructType schema);
member this.Schema : Microsoft.Spark.Sql.Types.StructType -> Microsoft.Spark.Sql.Streaming.DataStreamReader
Public Function Schema (schema As StructType) As DataStreamReader
Parameters
- schema
- StructType
The input schema
Returns
This DataStreamReader object
Remarks
Some data sources (e.g. JSON) can infer the input schema automatically from data. By specifying the schema here, the underlying data source can skip the schema inference step, and thus speed up data loading.
Applies to
Schema(String)
Specifies the schema by using the given DDL-formatted string.
public Microsoft.Spark.Sql.Streaming.DataStreamReader Schema (string schemaString);
member this.Schema : string -> Microsoft.Spark.Sql.Streaming.DataStreamReader
Public Function Schema (schemaString As String) As DataStreamReader
Parameters
- schemaString
- String
DDL-formatted string
Returns
This DataStreamReader object
Remarks
Some data sources (e.g. JSON) can infer the input schema automatically from data. By specifying the schema here, the underlying data source can skip the schema inference step, and thus speed up data loading.