spark读取es数据时,数据中含有array类型,发出报错:
Field 'collect_list(comm).time' not found; typically this occurs with arrays which are not mapped as single value
则增加配置文件即可:
conf.set("es.read.field.as.array.include","数组名字")

解决Spark读取Elasticsearch中带有Array类型字段时出现的错误,通过配置文件指定将特定数组字段作为单值处理。
spark读取es数据时,数据中含有array类型,发出报错:
Field 'collect_list(comm).time' not found; typically this occurs with arrays which are not mapped as single value
则增加配置文件即可:
conf.set("es.read.field.as.array.include","数组名字")

684
1188
1288
1703

被折叠的 条评论
为什么被折叠?