如何从pyspark中的elasticsearch读取数据(面对java.lang.arrayindexoutofboundsexception)?

kiz8lqtg  于 2021-07-13  发布在  Spark
关注(0)|答案(0)|浏览(147)

我有个问题。我从ElasticSearch中读取数据。
数据架构具有嵌套数组。

df = spark.read.format("org.elasticsearch.spark.sql").option("es.query",dsl).option("es.read.field.as.include",column_list).load(es_index) 

ex) 
root
 |-- aaa: struct (nullable = true)
 |    |-- bbb: string (nullable = true)
 |    |-- ddd: string (nullable = true)
 |    |-- eee: string (nullable = true)

当我保存或显示()时,我看到错误消息。
java.lang.arrayindexoutofboundsexception异常
原因是什么?请帮帮我。

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题