摘要:
有类型转换: map: @Test def trans(): Unit = { // 3. flatMap val ds1 = Seq("hello spark", "hello hadoop").toDS ds1.flatMap( item => item.split(" ") ).show() 阅读全文
摘要:
初识 DataFrameReader: SparkSQL 的一个非常重要的目标就是完善数据读取, 所以 SparkSQL 中增加了一个新的框架, 专门用于读取外部数据源, 叫做 DataFrameReader @Test def reader1(): Unit = { // 1. 创建 SparkS 阅读全文