【发布时间】:2018-06-30 16:50:33
【问题描述】:
您好,我正在尝试加载 CSV 文件来触发数据框。我正在使用 DataBricks CSV jar 来加载数据。我在 Json 文件中有数据架构,并希望将该架构应用于 DataFrame。
以下是我的 Json 架构文件:-
{
"type" : "struct",
"doc": "This is sample",
"fields" : [ {
"name" : "Name",
"type" : "string" ,
"nullable" : "true"
}, {
"name" : "Address1",
"type" : "string",
"nullable" : "true"
}, {
"name" : "Address2",
"type" : "string",
"nullable" : "true"
}, {
"name" : "City",
"type" : "string",
"nullable" : "true"
}]
}
【问题讨论】:
标签: java apache-spark spark-dataframe databricks