Spark实验五

 

json数据

{ "id":1 ,"name":"Ella","age":36}
{ "id":2,"name":"Bob","age":29 }
{ "id":3 ,"name":"Jack","age":29}
{ "id":4 ,"name":"Jim","age":28}
{ "id":4 ,"name":"Jim","age":28}
{ "id":5 ,"name":"Damon" }
{ "id":5 ,"name":"Damon" }

Spark实验五

 

 命令行:

cd /usr/local/spark
bin/spark-shell
import org.apache.spark.sql.SparkSession
val spark=SparkSession.builder().getOrCreate()
import spark.implicits._
val df = spark.read.json("file:///usr/local/spark/employee.json")

Spark实验五

 

上一篇:2021-06-10


下一篇:Mybatis实现连接查询和分段查询以及association和collection的运用