Spark 2.2.1 Parquet文件处理的案例与解读
(一) 加载数据
加载Parquet数据源,并将加载后的people使用createOrReplaceTempView方法注册到临时表中,然后使用SQL语句对该临时表进行操作,最后将操作结果打印出来。
scala> valpeople =spark.read.parquet("/resources/people.parquet")
18/02/18 08:51:40WARN metastore.ObjectStore: Failed to get database global_temp, returningNoSuchObjectException
people:org.apache.spark.sql.DataFrame = [age: bigint, name: string]
scala>people.createOrReplaceTempView("parquetFile")
scala> valteenagers = spark.sql("SELECT name FROM parquetFile WHERE age >= 13 ANDage
关注
打赏
热门博文
- 计算机视觉系列 -MMDetection 之MobileNetV2YOLOV3 经典算法(一)
- Rasa 3.x 学习系列- Rasa - Issues 4635:Make Rasa X model pull interval configurable in local mode
- Rasa 3.x 学习系列- Rasa - Issues 4759:Training Luis data with luis_schema_version higher than 4.x.x will
- Rasa 3.x 学习系列- Rasa - Issues 4799 rasa interactive does not work without nlu data
- Rasa 3.x 学习系列- Rasa - Issues 4917 Support S3 namespaces when retrieving models from buckets
- Rasa 3.x 学习系列- Rasa - Issues 4925 “rasa init” will ask if user wants to train a model
- Rasa 3.x 学习系列- Rasa - Issues 4985 Fix errors during training in ResponseSelector学习笔记
- Rasa 3.x 学习系列- Rasa - Issues 4933 Improved error message that appears when an incorrect paramete学习笔记
- Rasa 3.x 学习系列- Rasa - Issues 4792 socket debug logs clog up debug feed学习笔记
- Rasa 3.x 学习系列- Rasa - Issues 4873 dispatcher.utter_message 学习笔记