# Hive "Insert-Only" Support

**URL:** <https://community.dremio.com/t/hive-insert-only-support/2035>\
**Category:** Uncategorized\
**Created:** [October 17, 2018, 2:47pm UTC](https://community.dremio.com/t/hive-insert-only-support/2035 "2018-10-17T14:47:49Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nick\_Lewis](https://avatars.discourse-cdn.com/v4/letter/n/a4c791/32.png) [@Nick\_Lewis](https://community.dremio.com/u/Nick_Lewis)\
**Post date:** [October 17, 2018, 2:47pm UTC](https://community.dremio.com/t/hive-insert-only-support/2035/1 "2018-10-17T14:47:49Z")

</div>

Hello,

I’m trying out Dremio on my HDP cluster and trying to connect to my Hive tables. I have successfully gotten past some of my permissions issues, connected to HDFS, and some of my Hive Tables. However, a few of my internal Hive tables can’t be accessed and I get errors stating that the Dremio client doesn’t support “insert-only” tables. Is this a shortcoming of Dremio or my configuration?

Thanks,  
Nick

```
Caused by: java.lang.RuntimeException: MetaException(message:Your client does not appear to support insert-only tables. To skip capability checks, please set metastore.client.capability.check to false. This setting can be set globally, or on the client for the current metastore session. Note that this may lead to incorrect results, data loss, undefined behavior, etc. if your client is actually incompatible. You can also specify custom client capabilities via get_table_req API.)
```

---

<div class="post-metadata">

**Author:** ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)\
**Post date:** [October 17, 2018, 3:04pm UTC](https://community.dremio.com/t/hive-insert-only-support/2035/2 "2018-10-17T15:04:32Z")

</div>

HI @Nick_Lewis

Thank for reaching out. Are these Hive transactional tables. Could you please send me the output of "show create table \<table\_name\> from hive CLI? Also if there is a failed job on the Dremio UI, could you kindly upload the job profile

[Share a query Profile](https://www.dremio.com/tutorials/share-query-profile-dremio/)

Thanks  
@balaji.ramaswamy

---

<div class="post-metadata">

**Author:** ![Nick\_Lewis](https://avatars.discourse-cdn.com/v4/letter/n/a4c791/32.png) [@Nick\_Lewis](https://community.dremio.com/u/Nick_Lewis)\
**Post date:** [October 17, 2018, 3:56pm UTC](https://community.dremio.com/t/hive-insert-only-support/2035/3 "2018-10-17T15:56:45Z")

</div>

Here is my create table statement minus the personal details. I hadn’t noticed that sqoop does create the table as ‘insert-only’ so that certainly makes sense. I don’t get to the point where I can create a job, I get “Error retrieving dataset” when attempting to view the table preview.

```
+----------------------------------------------------+

```

| createtab\_stmt |  
±---------------------------------------------------+  
| CREATE TABLE `TABLENAME`(FIELDS) |  
| COMMENT ‘Imported by sqoop on DATE’ |  
| ROW FORMAT SERDE |  
| ‘org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe’ |  
| WITH SERDEPROPERTIES ( |  
| ‘field.delim’=’’, |  
| ‘line.delim’=’\n’, |  
| ‘serialization.format’=’’) |  
| STORED AS INPUTFORMAT |  
| ‘org.apache.hadoop.mapred.TextInputFormat’ |  
| OUTPUTFORMAT |  
| ‘org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat’ |  
| LOCATION |  
| \<WAREHOUSE\_LOCATION\> |  
| TBLPROPERTIES ( |  
| ‘bucketing\_version’=‘2’, |  
| ‘transactional’=‘true’, |  
| ‘transactional\_properties’=‘insert\_only’, |  
| ‘transient\_lastDdlTime’=‘1538059763’) |  
±---------------------------------------------------+

---

<div class="post-metadata">

**Author:** ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)\
**Post date:** [October 17, 2018, 4:02pm UTC](https://community.dremio.com/t/hive-insert-only-support/2035/4 "2018-10-17T16:02:13Z")

</div>

Thanks @Nick_Lewis, To get the job profile, run the query again on Dremio, let it fail, then click on jobs page and you should see your select. On the right pane you should see “Download Profile” , click on that and it would download a zip file to your computer. Send us the zip file without extracting it

---

<div class="post-metadata">

**Author:** ![Nick\_Lewis](https://avatars.discourse-cdn.com/v4/letter/n/a4c791/32.png) [@Nick\_Lewis](https://community.dremio.com/u/Nick_Lewis)\
**Post date:** [October 17, 2018, 5:08pm UTC](https://community.dremio.com/t/hive-insert-only-support/2035/5 "2018-10-17T17:08:23Z")

</div>

Alright but as the error happens before this point, I can’t enter any SQL in the editor so that is the majority of this error.

[85b6abe8-a2bd-4d6b-91cd-2e5c8bd33b01.zip](https://us1.discourse-cdn.com/flex020/uploads/dremio/original/1X/24ac1b528889386e870e6140e9791ea4ac7f91a3.zip) (4.0 KB)

---

<div class="post-metadata">

**Author:** ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)\
**Post date:** [October 17, 2018, 9:06pm UTC](https://community.dremio.com/t/hive-insert-only-support/2035/6 "2018-10-17T21:06:48Z")

</div>

Hi @Nick_Lewis

I see that your profile has no query. What happens if you do the below?

Logon to the Dremio UI  
Click on “New Query”

> select \* from sys.nodes

Click “preview”

---

<div class="post-metadata">

**Author:** ![Nick\_Lewis](https://avatars.discourse-cdn.com/v4/letter/n/a4c791/32.png) [@Nick\_Lewis](https://community.dremio.com/u/Nick_Lewis)\
**Post date:** [October 18, 2018, 1:32pm UTC](https://community.dremio.com/t/hive-insert-only-support/2035/7 "2018-10-18T13:32:39Z")

</div>

I get results.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/dremio/original/1X/f3a670e5ecd7e2931dbaf0f3942bf3414f56ea11.png)

---

<div class="post-metadata">

**Author:** ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)\
**Post date:** [October 18, 2018, 2:55pm UTC](https://community.dremio.com/t/hive-insert-only-support/2035/8 "2018-10-18T14:55:35Z")

</div>

Awesome @Nick_Lewis

Now what happens if you click on your Hive source on the Dremio UI - Then click on the Database your table resides and then you click on the actual table?

Thanks  
@balaji.ramaswamy

---

<div class="post-metadata">

**Author:** ![Nick\_Lewis](https://avatars.discourse-cdn.com/v4/letter/n/a4c791/32.png) [@Nick\_Lewis](https://community.dremio.com/u/Nick_Lewis)\
**Post date:** [October 18, 2018, 2:56pm UTC](https://community.dremio.com/t/hive-insert-only-support/2035/9 "2018-10-18T14:56:58Z")

</div>

![image](https://us1.discourse-cdn.com/flex020/uploads/dremio/original/1X/75953ece848597ce67dbbe281852444b6b439e47.png)

---

<div class="post-metadata">

**Author:** ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)\
**Post date:** [October 18, 2018, 2:58pm UTC](https://community.dremio.com/t/hive-insert-only-support/2035/10 "2018-10-18T14:58:59Z")

</div>

Now click on jobs and you will see this job failed right at the top. Send us the profile for this failed job. Just the downloaded zip file

---

<div class="post-metadata">

**Author:** ![Nick\_Lewis](https://avatars.discourse-cdn.com/v4/letter/n/a4c791/32.png) [@Nick\_Lewis](https://community.dremio.com/u/Nick_Lewis)\
**Post date:** [October 18, 2018, 3:03pm UTC](https://community.dremio.com/t/hive-insert-only-support/2035/11 "2018-10-18T15:03:12Z")

</div>

Haha I appreciate the help debugging @balaji.ramaswamy, but I believe we are going in a circle here. My prior job profile sent was of this same issue. In the above pictured view I am unable to enter anything in the SQL editor, which leads to any attempts at running a job to fail with the error “invalid query”.

---

<div class="post-metadata">

**Author:** ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)\
**Post date:** [October 18, 2018, 3:07pm UTC](https://community.dremio.com/t/hive-insert-only-support/2035/12 "2018-10-18T15:07:02Z")

</div>

@Nick_Lewis

You do not have to enter anything in UI , when you click the Hive table that you want to see the data you should be able to see the sql “select \* from table” and a preview result. Are you getting “Failure While attempting to read metadata”?

Let us also try something else. I assume thge files you are trying to read through Hive Eg: the text files are on HDFS. Can you try and add source-HDFS and see if you are able to directly query the text files?

Thanks  
@balaji.ramaswamy

---

<div class="post-metadata">

**Author:** ![Nick\_Lewis](https://avatars.discourse-cdn.com/v4/letter/n/a4c791/32.png) [@Nick\_Lewis](https://community.dremio.com/u/Nick_Lewis)\
**Post date:** [October 18, 2018, 3:28pm UTC](https://community.dremio.com/t/hive-insert-only-support/2035/13 "2018-10-18T15:28:53Z")

</div>

After checking the create statements of some of my tables, the one that failed to read metadata was actually a hive external table that pointed to an HBase table. The access issue makes sense there so I’m not concerned with that.

Meanwhile, my internal hive tables that I sqooped in have a different error when selecting them from my datasets.  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/dremio/original/1X/b6476a106c4b4fcb56e546bcd3f79fd52be63b99.png)  
I have successfully connected via HDFS and previewed the data for that same table. I can query in that way.

---

<div class="post-metadata">

**Author:** ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)\
**Post date:** [October 18, 2018, 4:24pm UTC](https://community.dremio.com/t/hive-insert-only-support/2035/14 "2018-10-18T16:24:03Z")

</div>

Do this,

Navigate to the page that lists the table name  
Click on the little copy icon right next to the table name  
Click “New Query”  
Type “select \* from” and paste the table name in your buffer and hit run  
This will for sure produce a profile with an error  
Send us the zip file

Thanks  
@balaji.ramaswamy

---

<div class="post-metadata">

**Author:** ![Nick\_Lewis](https://avatars.discourse-cdn.com/v4/letter/n/a4c791/32.png) [@Nick\_Lewis](https://community.dremio.com/u/Nick_Lewis)\
**Post date:** [October 18, 2018, 4:46pm UTC](https://community.dremio.com/t/hive-insert-only-support/2035/15 "2018-10-18T16:46:50Z")

</div>

[be142e9b-4eb7-4fcd-afc1-11c85c4354d9.zip](https://us1.discourse-cdn.com/flex020/uploads/dremio/original/1X/5204922e4d74f85bb1e36f36f0bb58c0b5d22d94.zip) (3.9 KB)  
Here you are!
