# Elasticsearch Schema incompatibility with Hive Parquet

**URL:** https://discuss.elastic.co/t/elasticsearch-schema-incompatibility-with-hive-parquet/63244
**Category:** Elasticsearch
**Tags:** es-hadoop
**Created:** [October 18, 2016, 5:09am UTC](https://discuss.elastic.co/t/elasticsearch-schema-incompatibility-with-hive-parquet/63244 "2016-10-18T05:09:07Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Jae](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jae/32/791_2.png) [@Jae](https://discuss.elastic.co/u/Jae)
#### Post date: [October 18, 2016, 5:09am UTC](https://discuss.elastic.co/t/elasticsearch-schema-incompatibility-with-hive-parquet/63244/1 "2016-10-18T05:09:07Z")

</div>

Hello Elasticsearch-Hadoop user

I got a little bit complicated situation. I am trying to back up Elasticsearch data to Hive through parquet file format with schema. Writing to parquet file was ok but while registering its schema to Hive metadata store, I got the following error:

Caused by: org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: ParseException line 1:208 mismatched input '-' expecting \> near 'timestamp' in struct type

Somebody who's in charge of hadoop/hive cluster told me this problem is already known in parquet-hive incompatibility problem and I should've used long or string type for date format but I cannot control in Elasticsearch-hadoop connector.

Is there any hidden 🙂 feature in elasticsearch-hadoop connector to convert date format to long or string type? Otherwise, if I have to touch source codes and build my own library, may I have some advices on touching source codes?

Thank you!

---

<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: [October 18, 2016, 3:33pm UTC](https://discuss.elastic.co/t/elasticsearch-schema-incompatibility-with-hive-parquet/63244/2 "2016-10-18T15:33:46Z")

</div>

Is there any hidden 🙂 feature in elasticsearch-hadoop connector to convert date format to long or string type?

@jae setting `es.mapping.date.rich = false` will instruct the connector to convert date oriented fields into Strings or Longs. This (not-secret-at-all 🙂) property is explained further in depth [here](https://www.elastic.co/guide/en/elasticsearch/hadoop/current/configuration.html#cfg-field-info), along with the rest of the available user properties.

---

<div class="post-metadata">

### Author: ![Jae](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jae/32/791_2.png) [@Jae](https://discuss.elastic.co/u/Jae)
#### Post date: [October 18, 2016, 10:41pm UTC](https://discuss.elastic.co/t/elasticsearch-schema-incompatibility-with-hive-parquet/63244/3 "2016-10-18T22:41:34Z")

</div>

Wow, thank you so much, I should've read the document more carefully. Thank you tons again 🙂

---

<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:22pm UTC](https://discuss.elastic.co/t/elasticsearch-schema-incompatibility-with-hive-parquet/63244/4 "2017-07-06T13:22:50Z")

</div>


