# Empty strings not being allowed for insertion into ES from Spark

**URL:** https://discuss.elastic.co/t/empty-strings-not-being-allowed-for-insertion-into-es-from-spark/58619
**Category:** Elasticsearch
**Tags:** es-hadoop
**Created:** [August 22, 2016, 8:56pm UTC](https://discuss.elastic.co/t/empty-strings-not-being-allowed-for-insertion-into-es-from-spark/58619 "2016-08-22T20:56:31Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![ZeroGraviti](https://avatars.discourse-cdn.com/v4/letter/z/8797f3/32.png) [@ZeroGraviti](https://discuss.elastic.co/u/ZeroGraviti)
#### Post date: [August 22, 2016, 8:56pm UTC](https://discuss.elastic.co/t/empty-strings-not-being-allowed-for-insertion-into-es-from-spark/58619/1 "2016-08-22T20:56:31Z")

</div>

There is an exception being thrown when I execute my Scala app with functionality of `myRDD.saveToEs`. My ES version is 2.3.5.  
I am using `Spark1.5.0` so maybe there is a way to configure this in the `SparkContext` which I am not aware of. The mini stacktrace is as under -  
`Exception in thread "main" org.apache.spark.SparkException: Job aborted due to stage failure: Task 0 in stage 2.0 failed 1 times, most recent failure: Lost task 0.0 in stage 2.0 (TID 2, localhost): org.apache.spark.util.TaskCompletionListenerException: Found unrecoverable error [127.0.0.1:9200] returned Bad Request(400) - failed to parse [foo_eff_dt];Invalid format: ""; Bailing out..`

Please help/guide.  
TIA.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 6, 2017, 1:23pm UTC](https://discuss.elastic.co/t/empty-strings-not-being-allowed-for-insertion-into-es-from-spark/58619/2 "2017-07-06T13:23:37Z")

</div>


