scala的小笔记

    xiaoxiao2021-03-25  112

    一、类型

    1、查看对象的类型

    data_origin.getClass.getSimpleName

    res6: String = DataFrame

    2、类型的转化

    DataFrame 转RDD类型。

    S1: 看DataFrame的api:http://spark.apache.org/docs/1.6.3/api/scala/index.html#org.apache.spark.sql.DataFrame

    里面有一个方法:

    lazy valrdd: RDD[Row]

    Represents the content of the DataFrame as an RDD of Rows.

    转载请注明原文地址: https://ju.6miu.com/read-12060.html

    最新回复(0)