摘要: 有类型转换: map: @Test def trans(): Unit = { // 3. flatMap val ds1 = Seq("hello spark", "hello hadoop").toDS ds1.flatMap( item => item.split(" ") ).show() 阅读全文
posted @ 2021-01-13 22:15 喜欢爬的孩子 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 初识 DataFrameReader: SparkSQL 的一个非常重要的目标就是完善数据读取, 所以 SparkSQL 中增加了一个新的框架, 专门用于读取外部数据源, 叫做 DataFrameReader @Test def reader1(): Unit = { // 1. 创建 SparkS 阅读全文
posted @ 2021-01-13 20:44 喜欢爬的孩子 阅读(478) 评论(0) 推荐(0) 编辑