sparksql语法,经过映射方式读txt

Inferring the Schema Using Reflection(经过映射指定schema) --声明一个类 scala> case class Person(name: String, age: Int) defined class Person --读取txt文件内容,而后映射到类的字段,转化成dataframe scala> val people = sc.textFile("
相关文章
相关标签/搜索