首页 文章
  • 0 votes
     answers
     views

    在Spark2 DataFrame中提供显式架构

    我需要从csv文件中读取数据并根据显式模式对其进行验证,如果模式验证失败,则抛出错误 . 为此,我做了以下工作:1)定义了架构 public static StructField[] schema ={ new StructField("name", DataTypes.StringType, false, Metadata.empty()), ...

热门问题