Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| kb:bigdata:spark:import_json [2017/11/26 16:32] – created yehuda | kb:bigdata:spark:import_json [2022/01/03 16:03] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 6: | Line 6: | ||
| # import json | # import json | ||
| - | df = sc.wholeTextFiles('/ | + | df = sc.wholeTextFiles('/ |
| - | jsonRDD = sc.wholeTextFiles("/ | + | jsonRDD = sc.wholeTextFiles("/ |
| namesJson = sqlContext.read.json(jsonRDD) | namesJson = sqlContext.read.json(jsonRDD) | ||
| namesJson.printSchema | namesJson.printSchema | ||