Unable to read data from Elasticsearch with spark in Databricks.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2022 09:18 PM
When I am trying to read data from elasticsearch by spark sql, it throw an error like
RuntimeException: Error while encoding: java.lang.RuntimeException: scala.collection.convert.Wrappers$JListWrapper is not a valid external type for schema of string
Caused by: RuntimeException: scala.collection.convert.Wrappers$JListWrapper is not a valid external type for schema of string
It show like schema generated with spark is not matching with data received from elasticsearch.
Could you let know how I can read the data from elastic via either csv, or excel format?
Labels: