【异常】Exception in thread "main" java.lang.IllegalArgumentException: Illegal pattern c
在windows上执行的时候,option(“timestampFormat”, “yyyy/MM/dd HH:mm:ss ZZ”)必须带上,不然报错:
Exception in thread "main" java.lang.IllegalArgumentException: Illegal pattern component: XX。
使用比如:
val df1 = spark.read.format("json").option("timestampFormat", "yyyy/MM/dd HH:mm:ss ZZ").load("hdfs://192.168.137.141:9000/data/people.json")
df1.show()