说明:
spark --version : 2.2.0
我有两个json文件,分别是emp和dept:
emp内容如下:
{"name": "zhangsan", "age": 26, "depId": 1, "gender": "male", "salary": 20000} { "name": "lisi", "age": 36, "depId": 2, "gender": "female", "salary": 8500} { "name": "wangwu", "age": 23, "depId": 1, "gender": "male", "salary": 5000} { "name": "zhaoliu", "age": 25, "depId": 3, "gender": "male", "salary": 7000} { "name": "marry", "age": 19, "depId": 2, &#