# ElasticSearch and Hive

**URL:** https://discuss.elastic.co/t/elasticsearch-and-hive/110875
**Category:** Elasticsearch
**Tags:** es-hadoop
**Created:** [December 8, 2017, 4:11pm UTC](https://discuss.elastic.co/t/elasticsearch-and-hive/110875 "2017-12-08T16:11:10Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![cw2579](https://avatars.discourse-cdn.com/v4/letter/c/e47c2d/32.png) [@cw2579](https://discuss.elastic.co/u/cw2579)
#### Post date: [December 8, 2017, 4:11pm UTC](https://discuss.elastic.co/t/elasticsearch-and-hive/110875/1 "2017-12-08T16:11:10Z")

</div>

I can create hive elasticsearch table:  
CREATE EXTERNAL TABLE artists\_es ( id BIGINT, name STRING )  
STORED BY 'org.elasticsearch.hadoop.hive.EsStorageHandler'  
TBLPROPERTIES('es.nodes'='10.0.14.71','es.port'= '9200','es.resource'= 'radio/artists');

But I can't select or insert data into this table  
here is the error:  
Failed with exception java.io.IOException:org.elasticsearch.hadoop.EsHadoopIllegalArgumentException: Unsupported/Unknown Elasticsearch version 5.6.0

Can anyone advise?

---

<div class="post-metadata">

### Author: ![thiago](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thiago/32/32096_2.png) [@thiago](https://discuss.elastic.co/u/thiago)
#### Post date: [December 9, 2017, 8:00pm UTC](https://discuss.elastic.co/t/elasticsearch-and-hive/110875/2 "2017-12-09T20:00:36Z")

</div>

It's because you are using an incompatible version of es-hadoop (probably version 2.2.x).

According to [this](https://github.com/elastic/elasticsearch-hadoop/blob/master/README.md) you should be using es-hadoop at least in version 5.x to be able to connect with Elasticsearch version 5.6.0

---

<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: [December 13, 2017, 7:40pm UTC](https://discuss.elastic.co/t/elasticsearch-and-hive/110875/3 "2017-12-13T19:40:29Z")

</div>

It is best to use ES-Hadoop 5.6.0 and up for interacting with 5.6, as it is specifically tested against Elasticsearch 5.6.0+.

---

<div class="post-metadata">

### Author: ![cw2579](https://avatars.discourse-cdn.com/v4/letter/c/e47c2d/32.png) [@cw2579](https://discuss.elastic.co/u/cw2579)
#### Post date: [December 13, 2017, 7:53pm UTC](https://discuss.elastic.co/t/elasticsearch-and-hive/110875/4 "2017-12-13T19:53:15Z")

</div>

The issue is resolved.

---

<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: [January 10, 2018, 7:53pm UTC](https://discuss.elastic.co/t/elasticsearch-and-hive/110875/5 "2018-01-10T19:53:16Z")

</div>

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