# How to save spark scala dataframe to elastic search

**URL:** <https://discuss.elastic.co/t/how-to-save-spark-scala-dataframe-to-elastic-search/142315>\
**Category:** Elasticsearch\
**Tags:** es-hadoop\
**Created:** [July 31, 2018, 8:57am UTC](https://discuss.elastic.co/t/how-to-save-spark-scala-dataframe-to-elastic-search/142315 "2018-07-31T08:57:43Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![james.baiera](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/james.baiera/32/10209_2.png) [@james.baiera](https://discuss.elastic.co/u/james.baiera)\
**Post date:** [August 14, 2018, 3:45am UTC](https://discuss.elastic.co/t/how-to-save-spark-scala-dataframe-to-elastic-search/142315/2 "2018-08-14T03:45:57Z")

</div>

Please avoid double posting on here as it creates clutter and makes it harder for people to respond or find answers. I will respond on your other topic.

> [@Not able to detect ES version](https://discuss.elastic.co/t/not-able-to-detect-es-version/142340):
>
> Exception in thread "main" org.elasticsearch.hadoop.EsHadoopIllegalArgumentException: Cannot detect ES version - typically this happens if the network/Elasticsearch cluster is not accessible or when targeting a WAN/Cloud instance without the proper setting 'es.nodes.wan.only' i am dumping dataframe to elastic search but i am not able to do it . df.write.format("org.elasticsearch.spark.sql") .option("es.nodes.wan.only","true") .option("es.port","9200") .option("es.net.ssl","true") .option("…

---

_[View the full topic](https://discuss.elastic.co/t/how-to-save-spark-scala-dataframe-to-elastic-search/142315)._
