# Querying ElasticSearch Hive table from Sql workbench

**URL:** <https://discuss.elastic.co/t/querying-elasticsearch-hive-table-from-sql-workbench/133732>\
**Category:** Elasticsearch\
**Tags:** es-hadoop\
**Created:** [May 29, 2018, 6:15pm UTC](https://discuss.elastic.co/t/querying-elasticsearch-hive-table-from-sql-workbench/133732 "2018-05-29T18:15:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![naresh523](https://avatars.discourse-cdn.com/v4/letter/n/e480ec/32.png) [@naresh523](https://discuss.elastic.co/u/naresh523)\
**Post date:** [May 29, 2018, 6:15pm UTC](https://discuss.elastic.co/t/querying-elasticsearch-hive-table-from-sql-workbench/133732/1 "2018-05-29T18:15:15Z")

</div>

Hi,

I'm trying to query elasticsearch hive table from SQL Workbench.

I'm using Elastic: 6.2.X version.  
I've uploaded both elasticsearch-hadoop & elasticsearch-hadoop-hive jars but, it didn't work.

Here is the error:  
Error while compiling statement: FAILED: RuntimeException org.apache.hadoop.hive.ql.metadata.HiveException: Error in loading storage handler.org.elasticsearch.hadoop.hive.EsStorageHandler [SQL State=42000, DB Errorcode=40000]

Please advise?

---

<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:** [May 30, 2018, 7:54pm UTC](https://discuss.elastic.co/t/querying-elasticsearch-hive-table-from-sql-workbench/133732/2 "2018-05-30T19:54:41Z")

</div>

We don't have any tests configured for SQL workbench, and I have no real experience with it. My guess is that there's additional settings required in Hive for this to work. Do you have any more detailed error messages for the problem, perhaps from the HiveServer log itself?

---

<div class="post-metadata">

**Author:** ![naresh523](https://avatars.discourse-cdn.com/v4/letter/n/e480ec/32.png) [@naresh523](https://discuss.elastic.co/u/naresh523)\
**Post date:** [June 5, 2018, 4:56pm UTC](https://discuss.elastic.co/t/querying-elasticsearch-hive-table-from-sql-workbench/133732/3 "2018-06-05T16:56:43Z")

</div>

That is the complete error, even if i do select \* from table\_name(ES table), it is throwing above error.  
I did added elasticsearch-hadoop jar to driver on sql workbench.

---

<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 3, 2018, 5:10pm UTC](https://discuss.elastic.co/t/querying-elasticsearch-hive-table-from-sql-workbench/133732/4 "2018-07-03T17:10:58Z")

</div>

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