标签:
val df = sqlContext.load("/opt/modules/spark1.3.1/examples/src/main/resources/people.json","json") df.select("name","age").save("/opt/test/namesAndAges.json","json") //或者 df.select("name","age").save("/opt/test/namesAndAges.parquet","parquet")
spark sql中将数据保存成parquet,json格式
标签:
原文地址:http://www.cnblogs.com/hark0623/p/4511799.html