ParserError NUMERIC_VALUE_ILLEGAL_CHARACTER

Caused by: org.apache.flink.api.common.io.ParseException: Line could not be parsed: '503, 100108, , 5, 2.1, 82.1%, 43.9%, 132, 1933.3%, 336, 67.2, 228, 45.6'
ParserError NUMERIC_VALUE_ILLEGAL_CHARACTER

使用Flink以实体类的方式读取csv文件

    val filePath = "file:///media/lyd/wyl/data/allSeasonPoint3.csv"
    val playerDataSet: DataSet[PlayerData] = environment.readCsvFile[PlayerData](filePath, fieldDelimiter = ",",
      pojoFields = Array("ranking", "playerName", "team", "gamePlayed", "timePerGame", "shootingAverage", "threePointShotPercentage", "threePointTotal",
        "freeThrowPercentage", "totalPoints", "pointsPerGame", "totalRebounds", "reboundsPerGame"))
    playerDataSet.print()

ParserError NUMERIC_VALUE_ILLEGAL_CHARACTER_第1张图片

 CSV中的数据用逗号分割,且不允许有空格

你可能感兴趣的:(scala)