DataStreamReader.Schema 方法

定義

多載

Schema(StructType)

使用 StructType 指定架構。

Schema(String)

使用指定的 DDL 格式字串來指定架構。

Schema(StructType)

使用 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

參數

schema
StructType

輸入架構

傳回

這個 DataStreamReader 物件

備註

某些資料來源 (例如 JSON) 可以從資料自動推斷輸入架構。 藉由在這裡指定架構,基礎資料來源可以略過架構推斷步驟,進而加速資料載入。

適用於

Schema(String)

使用指定的 DDL 格式字串來指定架構。

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

參數

schemaString
String

DDL 格式字串

傳回

這個 DataStreamReader 物件

備註

某些資料來源 (例如 JSON) 可以從資料自動推斷輸入架構。 藉由在這裡指定架構,基礎資料來源可以略過架構推斷步驟,進而加速資料載入。

適用於