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")
时间: 2024-10-23 07:23:00