# ES hadoop spark connector having a issue with nested json

**URL:** <https://discuss.elastic.co/t/es-hadoop-spark-connector-having-a-issue-with-nested-json/332551>\
**Category:** Elasticsearch\
**Tags:** es-hadoop\
**Created:** [May 4, 2023, 12:18pm UTC](https://discuss.elastic.co/t/es-hadoop-spark-connector-having-a-issue-with-nested-json/332551 "2023-05-04T12:18:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kuldeep\_Pal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kuldeep_pal/32/118290_2.png) [@Kuldeep\_Pal](https://discuss.elastic.co/u/Kuldeep_Pal)\
**Post date:** [May 4, 2023, 12:18pm UTC](https://discuss.elastic.co/t/es-hadoop-spark-connector-having-a-issue-with-nested-json/332551/1 "2023-05-04T12:18:58Z")

</div>

org.elasticsearch.hadoop.rest.EsHadoopParsingException: org.elasticsearch.hadoop.EsHadoopIllegalStateException: Position for 'contacts.phone' not found in row; typically this is caused by a mapping inconsistency

Not able to read the data...

---

<div class="post-metadata">

**Author:** ![Keith\_Massey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/keith_massey/32/83666_2.png) [@Keith\_Massey](https://discuss.elastic.co/u/Keith_Massey)\
**Post date:** [May 4, 2023, 12:55pm UTC](https://discuss.elastic.co/t/es-hadoop-spark-connector-having-a-issue-with-nested-json/332551/2 "2023-05-04T12:55:17Z")

</div>

Hi @Kuldeep_Pal. What version of es-hadoop are you using? I'm guessing that the problem is that es-hadoop does not currently support dots (`.`) in field names. Newer versions of es-hadoop (8.2.0 and above) give a better error message about this -- [Documenting that we do not support dots in field names by masseyke · Pull Request #1900 · elastic/elasticsearch-hadoop · GitHub](https://github.com/elastic/elasticsearch-hadoop/pull/1900). There is an open ticket about supporting dots at [Dots in field names exception · Issue #853 · elastic/elasticsearch-hadoop · GitHub](https://github.com/elastic/elasticsearch-hadoop/issues/853).

---

<div class="post-metadata">

**Author:** ![Kuldeep\_Pal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kuldeep_pal/32/118290_2.png) [@Kuldeep\_Pal](https://discuss.elastic.co/u/Kuldeep_Pal)\
**Post date:** [May 4, 2023, 3:01pm UTC](https://discuss.elastic.co/t/es-hadoop-spark-connector-having-a-issue-with-nested-json/332551/3 "2023-05-04T15:01:12Z")

</div>

So there is no way I can use the nested json or read the data from elastic? This is still open issue for newest version also , right?  
@Keith_Massey

---

<div class="post-metadata">

**Author:** ![Keith\_Massey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/keith_massey/32/83666_2.png) [@Keith\_Massey](https://discuss.elastic.co/u/Keith_Massey)\
**Post date:** [May 4, 2023, 3:52pm UTC](https://discuss.elastic.co/t/es-hadoop-spark-connector-having-a-issue-with-nested-json/332551/4 "2023-05-04T15:52:26Z")

</div>

Nested fields are fine. The problem is with non-nested field names that actually have a `.` in their name. Can you post the mapping, data, and spark code to reproduce this?

---

<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:** [June 5, 2023, 6:08am UTC](https://discuss.elastic.co/t/es-hadoop-spark-connector-having-a-issue-with-nested-json/332551/6 "2023-06-05T06:08:50Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
