How to read data from ElasticSearch in pyspark (facing java.lang.ArrayIndexOutOfBoundsException)?

Viewed 121

I have a question. I read data from Elastic Search.

The data schema has nested array.

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)

When I save or show(), I see error message.

  • java.lang.ArrayIndexOutOfBoundsException

What is the reason? Please help me.

0 Answers
Related