在使用elasticsearch-hadoop库读取带有空属性的elasticsearch索引时,获取异常
Caused by: java.lang.RuntimeException: scala.None$ is not a valid external type for schema of stringgithub中有一个打开的缺陷,与复制它的步骤相同:https://github.com/elastic/elasticsearch-hadoop/issues/1635
火花: 3.1.1 Elasticsearch-Hadoop :elasticsearch-火花-30_2.12-7.12.0 Elasticsearch : 2.3.4
发布于 2021-04-30 05:45:24
它通过设置elasticsearch属性es.field.read.empty.as.null = no来工作。
.option("es.field.read.empty.as.null", "no")来自Elasticsearch 链接
es.field.read.empty.as.null (默认为是)
elasticsearch是否将空字段视为null。
https://stackoverflow.com/questions/67328780
复制相似问题