# Connection String Options for Hive

**URL:** <https://community.dremio.com/t/connection-string-options-for-hive/167>\
**Category:** Uncategorized\
**Created:** [August 7, 2017, 10:31pm UTC](https://community.dremio.com/t/connection-string-options-for-hive/167 "2017-08-07T22:31:36Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![LewG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/lewg/32/608_2.png) [@LewG](https://community.dremio.com/u/LewG)\
**Post date:** [August 7, 2017, 10:31pm UTC](https://community.dremio.com/t/connection-string-options-for-hive/167/1 "2017-08-07T22:31:36Z")

</div>

I setup a Hive Source but believe I need to add Connection String Options in order to make it functional. In the source definition window there is a note:

> **These options will be added to your Hive connection string. Please see the Dremio documentation for a list of commonly used connection string options**

I have searched in vein for this list; no where to be found.

The reason I believe I need to set some of these options is “No Data” is displayed in the main window once the source is defined. I’ve tried running queries against the data source and they do not error out, but instead just appear to be taking up cycles as I get a message with the timer that the query is running.

New to Dremio and trying to build some knowledge step by step. Any help here would be most appreciated.

---

<div class="post-metadata">

**Author:** ![yufeldman](https://avatars.discourse-cdn.com/v4/letter/y/c77e96/32.png) [@yufeldman](https://community.dremio.com/u/yufeldman)\
**Post date:** [August 7, 2017, 10:47pm UTC](https://community.dremio.com/t/connection-string-options-for-hive/167/2 "2017-08-07T22:47:14Z")

</div>

Usually the only information that needs to be provided is:  
“host”. See

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

But it really depends what additional properties you set/use to connect to HiveMetastore (either through hive-site.xml or on command line) for your other applications

---

<div class="post-metadata">

**Author:** ![LewG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/lewg/32/608_2.png) [@LewG](https://community.dremio.com/u/LewG)\
**Post date:** [August 7, 2017, 10:56pm UTC](https://community.dremio.com/t/connection-string-options-for-hive/167/3 "2017-08-07T22:56:01Z")

</div>

For instance when I connect to Hive through DBViz I specify just the Host, Port, and my credentials. I am guessing there are Connection string options that would allow me to include my Userid and PW. Just find it odd I’m not getting an authentication error when trying to connect.

---

<div class="post-metadata">

**Author:** ![yufeldman](https://avatars.discourse-cdn.com/v4/letter/y/c77e96/32.png) [@yufeldman](https://community.dremio.com/u/yufeldman)\
**Post date:** [August 7, 2017, 11:14pm UTC](https://community.dremio.com/t/connection-string-options-for-hive/167/4 "2017-08-07T23:14:46Z")

</div>

Dremio is a service, so it is not going to connect to HiveMetastore as an end user logged into dremio, but rather as a user that is running dremio and it will be using impersonation.  
So as a user that logged in to dremio you may not have permissions to view certain (or none) data.

---

<div class="post-metadata">

**Author:** ![venki](https://avatars.discourse-cdn.com/v4/letter/v/f0a364/32.png) [@venki](https://community.dremio.com/u/venki)\
**Post date:** [August 7, 2017, 11:21pm UTC](https://community.dremio.com/t/connection-string-options-for-hive/167/5 "2017-08-07T23:21:34Z")

</div>

One another thing to point out is Dremio connects to Hive Metastore service and not the HiveServer2 service which can accepts username/password as credentials. Hive Metastore can accept only kerberos credentials or no credentials. username/password is not option when connecting to Hive metastore. You can check out your hive-site.xml for the hostname of Hive metastore in property hive.metastore.uris.

---

<div class="post-metadata">

**Author:** ![LewG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/lewg/32/608_2.png) [@LewG](https://community.dremio.com/u/LewG)\
**Post date:** [August 8, 2017, 3:52pm UTC](https://community.dremio.com/t/connection-string-options-for-hive/167/6 "2017-08-08T15:52:43Z")

</div>

yufeldman and vvv, greatly appreciate your replies as you were right on target. I changed my connection string to use the HiveMetastore Port (9083); once I did this I was able to see the directory tree in Hadoop and navigate to the folder that contained the Hive Tables I was interested in. Now I just need to figure out why Dremio can’t read these tables; yufeldman you alluded to this possibility of not having permissions to view certain data going this route. What confuses me is that since one does not connect with their own credentials to the HiveMetastore how would access to tables be enabled?

---

<div class="post-metadata">

**Author:** ![yufeldman](https://avatars.discourse-cdn.com/v4/letter/y/c77e96/32.png) [@yufeldman](https://community.dremio.com/u/yufeldman)\
**Post date:** [August 8, 2017, 4:08pm UTC](https://community.dremio.com/t/connection-string-options-for-hive/167/7 "2017-08-08T16:08:09Z")

</div>

Glad you were able to connect.

When you are saying:

> [@LewG](#):
>
> Now I just need to figure out why Dremio can’t read these tables

Do you see error while trying to access data or something else?

---

<div class="post-metadata">

**Author:** ![LewG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/lewg/32/608_2.png) [@LewG](https://community.dremio.com/u/LewG)\
**Post date:** [August 8, 2017, 4:21pm UTC](https://community.dremio.com/t/connection-string-options-for-hive/167/8 "2017-08-08T16:21:33Z")

</div>

![Dremio Err](https://us1.discourse-cdn.com/flex020/uploads/dremio/original/1X/96dc393e218b03cd925124caa63ac8eedf8377e8.png)

---

<div class="post-metadata">

**Author:** ![yufeldman](https://avatars.discourse-cdn.com/v4/letter/y/c77e96/32.png) [@yufeldman](https://community.dremio.com/u/yufeldman)\
**Post date:** [August 8, 2017, 4:32pm UTC](https://community.dremio.com/t/connection-string-options-for-hive/167/9 "2017-08-08T16:32:41Z")

</div>

![28 AM](https://us1.discourse-cdn.com/flex020/uploads/dremio/original/1X/5db1268a05f5f214abd35bd639e86aa2fbf10a69.png)

Could you look under “Jobs” (in example image it is in the top menu) and you will probably see failed job marked with red hexagon and next to it more detailed page. If you could click on “Profile” (highlighted in red)

You will see something similar to:

 ![57 AM](https://us1.discourse-cdn.com/flex020/uploads/dremio/original/1X/ee731df4e52f763433866254228626caee9e1ec1.jpg)

Please examine “Verbose Error Message”

---

<div class="post-metadata">

**Author:** ![LewG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/lewg/32/608_2.png) [@LewG](https://community.dremio.com/u/LewG)\
**Post date:** [August 25, 2017, 6:27pm UTC](https://community.dremio.com/t/connection-string-options-for-hive/167/10 "2017-08-25T18:27:12Z")

</div>

This is what I see when I examine the Verbose Error Message:

DATA\_READ ERROR: Failure while attempting to read metadata for table ad\_users

This leads credence to my suspicion that I would somehow need to pass my credential as a connections string option to get this to work…

Here is the rest of the verbose error message:

Sql Query SELECT \*  
FROM “Hive (dev)”.adv\_analytics.ad\_users  
(java.lang.IllegalArgumentException) java.net.UnknownHostException: edwbidevwar  
org.apache.hadoop.security.SecurityUtil.buildTokenService():417  
org.apache.hadoop.hdfs.NameNodeProxiesClient.createProxyWithClientProtocol():130  
org.apache.hadoop.hdfs.DFSClient.():343  
org.apache.hadoop.hdfs.DFSClient.():287  
org.apache.hadoop.hdfs.DistributedFileSystem.initialize():156  
org.apache.hadoop.fs.FileSystem.createFileSystem():2811  
org.apache.hadoop.fs.FileSystem.access$200():100  
org.apache.hadoop.fs.FileSystem$Cache.getInternal():2848  
org.apache.hadoop.fs.FileSystem$Cache.get():2830  
org.apache.hadoop.fs.FileSystem.get():389  
org.apache.hadoop.fs.Path.getFileSystem():356  
com.dremio.exec.store.dfs.FileSystemWrapper.get():128  
com.dremio.exec.store.hive.DatasetBuilder.addInputPath():634  
com.dremio.exec.store.hive.DatasetBuilder.buildSplits():455  
com.dremio.exec.store.hive.DatasetBuilder.buildIfNecessary():298  
com.dremio.exec.store.hive.DatasetBuilder.getDataset():217  
com.dremio.exec.store.SimpleSchema.getTableFromDataset():283  
com.dremio.exec.store.SimpleSchema.getTableWithRegistry():252  
com.dremio.exec.store.SimpleSchema.getTable():345  
org.apache.calcite.jdbc.SimpleCalciteSchema.getImplicitTable():67  
org.apache.calcite.jdbc.CalciteSchema.getTable():219  
org.apache.calcite.prepare.CalciteCatalogReader.getTableFrom():117  
org.apache.calcite.prepare.CalciteCatalogReader.getTable():106  
org.apache.calcite.prepare.CalciteCatalogReader.getTable():73  
org.apache.calcite.sql.validate.EmptyScope.getTableNamespace():71  
org.apache.calcite.sql.validate.DelegatingScope.getTableNamespace():189  
org.apache.calcite.sql.validate.IdentifierNamespace.validateImpl():104  
org.apache.calcite.sql.validate.AbstractNamespace.validate():84  
org.apache.calcite.sql.validate.SqlValidatorImpl.validateNamespace():910  
org.apache.calcite.sql.validate.SqlValidatorImpl.validateQuery():891  
org.apache.calcite.sql.validate.SqlValidatorImpl.validateFrom():2859  
org.apache.calcite.sql.validate.SqlValidatorImpl.validateFrom():2844  
org.apache.calcite.sql.validate.SqlValidatorImpl.validateSelect():3077  
org.apache.calcite.sql.validate.SelectNamespace.validateImpl():60  
org.apache.calcite.sql.validate.AbstractNamespace.validate():84  
org.apache.calcite.sql.validate.SqlValidatorImpl.validateNamespace():910  
org.apache.calcite.sql.validate.SqlValidatorImpl.validateQuery():891  
org.apache.calcite.sql.SqlSelect.validate():208  
org.apache.calcite.sql.validate.SqlValidatorImpl.validateScopedExpression():866  
org.apache.calcite.sql.validate.SqlValidatorImpl.validate():577  
com.dremio.exec.planner.sql.SqlConverter.validate():187  
com.dremio.exec.planner.sql.handlers.PrelTransformer.validateNode():167  
com.dremio.exec.planner.sql.handlers.PrelTransformer.validateAndConvert():155  
com.dremio.exec.planner.sql.handlers.query.NormalHandler.getPlan():43  
com.dremio.exec.planner.sql.handlers.commands.HandlerToExec.plan():66  
com.dremio.exec.work.foreman.AttemptManager.run():285  
java.util.concurrent.ThreadPoolExecutor.runWorker():1145  
java.util.concurrent.ThreadPoolExecutor$Worker.run():615  
java.lang.Thread.run():748  
Caused By (java.net.UnknownHostException) edwbidevwar  
org.apache.hadoop.security.SecurityUtil.buildTokenService():417  
org.apache.hadoop.hdfs.NameNodeProxiesClient.createProxyWithClientProtocol():130  
org.apache.hadoop.hdfs.DFSClient.():343  
org.apache.hadoop.hdfs.DFSClient.():287  
org.apache.hadoop.hdfs.DistributedFileSystem.initialize():156  
org.apache.hadoop.fs.FileSystem.createFileSystem():2811  
org.apache.hadoop.fs.FileSystem.access$200():100  
org.apache.hadoop.fs.FileSystem$Cache.getInternal():2848  
org.apache.hadoop.fs.FileSystem$Cache.get():2830  
org.apache.hadoop.fs.FileSystem.get():389  
org.apache.hadoop.fs.Path.getFileSystem():356  
com.dremio.exec.store.dfs.FileSystemWrapper.get():128  
com.dremio.exec.store.hive.DatasetBuilder.addInputPath():634  
com.dremio.exec.store.hive.DatasetBuilder.buildSplits():455  
com.dremio.exec.store.hive.DatasetBuilder.buildIfNecessary():298  
com.dremio.exec.store.hive.DatasetBuilder.getDataset():217  
com.dremio.exec.store.SimpleSchema.getTableFromDataset():283  
com.dremio.exec.store.SimpleSchema.getTableWithRegistry():252  
com.dremio.exec.store.SimpleSchema.getTable():345  
org.apache.calcite.jdbc.SimpleCalciteSchema.getImplicitTable():67  
org.apache.calcite.jdbc.CalciteSchema.getTable():219  
org.apache.calcite.prepare.CalciteCatalogReader.getTableFrom():117  
org.apache.calcite.prepare.CalciteCatalogReader.getTable():106  
org.apache.calcite.prepare.CalciteCatalogReader.getTable():73  
org.apache.calcite.sql.validate.EmptyScope.getTableNamespace():71  
org.apache.calcite.sql.validate.DelegatingScope.getTableNamespace():189  
org.apache.calcite.sql.validate.IdentifierNamespace.validateImpl():104  
org.apache.calcite.sql.validate.AbstractNamespace.validate():84  
org.apache.calcite.sql.validate.SqlValidatorImpl.validateNamespace():910  
org.apache.calcite.sql.validate.SqlValidatorImpl.validateQuery():891  
org.apache.calcite.sql.validate.SqlValidatorImpl.validateFrom():2859  
org.apache.calcite.sql.validate.SqlValidatorImpl.validateFrom():2844  
org.apache.calcite.sql.validate.SqlValidatorImpl.validateSelect():3077  
org.apache.calcite.sql.validate.SelectNamespace.validateImpl():60  
org.apache.calcite.sql.validate.AbstractNamespace.validate():84  
org.apache.calcite.sql.validate.SqlValidatorImpl.validateNamespace():910  
org.apache.calcite.sql.validate.SqlValidatorImpl.validateQuery():891  
org.apache.calcite.sql.SqlSelect.validate():208  
org.apache.calcite.sql.validate.SqlValidatorImpl.validateScopedExpression():866  
org.apache.calcite.sql.validate.SqlValidatorImpl.validate():577  
com.dremio.exec.planner.sql.SqlConverter.validate():187  
com.dremio.exec.planner.sql.handlers.PrelTransformer.validateNode():167  
com.dremio.exec.planner.sql.handlers.PrelTransformer.validateAndConvert():155  
com.dremio.exec.planner.sql.handlers.query.NormalHandler.getPlan():43  
com.dremio.exec.planner.sql.handlers.commands.HandlerToExec.plan():66  
com.dremio.exec.work.foreman.AttemptManager.run():285  
java.util.concurrent.ThreadPoolExecutor.runWorker():1145  
java.util.concurrent.ThreadPoolExecutor$Worker.run():615  
java.lang.Thread.run():748

---

<div class="post-metadata">

**Author:** ![yufeldman](https://avatars.discourse-cdn.com/v4/letter/y/c77e96/32.png) [@yufeldman](https://community.dremio.com/u/yufeldman)\
**Post date:** [August 25, 2017, 6:35pm UTC](https://community.dremio.com/t/connection-string-options-for-hive/167/11 "2017-08-25T18:35:00Z")

</div>

> [@LewG](#):
>
> Sql Query SELECT \*
> 
> FROM “Hive (dev)”.adv\_analytics.ad\_users
> 
> (java.lang.IllegalArgumentException) java.net.UnknownHostException: edwbidevwar

Is the host resolvable?

---

<div class="post-metadata">

**Author:** ![LewG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/lewg/32/608_2.png) [@LewG](https://community.dremio.com/u/LewG)\
**Post date:** [August 29, 2017, 3:12pm UTC](https://community.dremio.com/t/connection-string-options-for-hive/167/12 "2017-08-29T15:12:30Z")

</div>

Doesn’t the fact I’m seeing the HIVE Folders in Dremio an indication that the Host is resolvable? I am only running into this issue trying to access the HIVE Tables.

---

<div class="post-metadata">

**Author:** ![yufeldman](https://avatars.discourse-cdn.com/v4/letter/y/c77e96/32.png) [@yufeldman](https://community.dremio.com/u/yufeldman)\
**Post date:** [August 29, 2017, 3:53pm UTC](https://community.dremio.com/t/connection-string-options-for-hive/167/13 "2017-08-29T15:53:25Z")

</div>

Showing Hive folders and tables (from HiveMetadata) is not the same as fetching the real data from NameNode/DataNodes. And looks like exception is related to NameNode host resolution.

Just a an idea:  
Could you include following as an additional property while configuring HiveSource:  
name: fs.defaultFS  
value: hdfs://\<namenode\_host\>:8020

---

<div class="post-metadata">

**Author:** ![LewG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/lewg/32/608_2.png) [@LewG](https://community.dremio.com/u/LewG)\
**Post date:** [August 29, 2017, 4:38pm UTC](https://community.dremio.com/t/connection-string-options-for-hive/167/14 "2017-08-29T16:38:25Z")

</div>

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

Seems not the solution, its been trying to load for last 20 min.

---

<div class="post-metadata">

**Author:** ![yufeldman](https://avatars.discourse-cdn.com/v4/letter/y/c77e96/32.png) [@yufeldman](https://community.dremio.com/u/yufeldman)\
**Post date:** [August 29, 2017, 4:41pm UTC](https://community.dremio.com/t/connection-string-options-for-hive/167/15 "2017-08-29T16:41:39Z")

</div>

I did not mean instead of HiveMetastore, I meant adding it under “AddProperty”

---

<div class="post-metadata">

**Author:** ![LewG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/lewg/32/608_2.png) [@LewG](https://community.dremio.com/u/LewG)\
**Post date:** [August 29, 2017, 6:05pm UTC](https://community.dremio.com/t/connection-string-options-for-hive/167/16 "2017-08-29T18:05:10Z")

</div>

I did add it as a new Property, Hive Metastore entry was not changed.

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

---

<div class="post-metadata">

**Author:** ![can](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/can/32/40_2.png) [@can](https://community.dremio.com/u/can)\
**Post date:** [August 29, 2017, 6:28pm UTC](https://community.dremio.com/t/connection-string-options-for-hive/167/17 "2017-08-29T18:28:57Z")

</div>

Hey @LewG you need to be able to resolve the NameNode from all your nodes. I’d recommend configuring this either:

- At the DNS level
- By adding entries to /etc/hosts file on all nodes

---

<div class="post-metadata">

**Author:** ![maver1ck](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@maver1ck](https://community.dremio.com/u/maver1ck)\
**Post date:** [September 21, 2017, 10:32pm UTC](https://community.dremio.com/t/connection-string-options-for-hive/167/18 "2017-09-21T22:32:13Z")

</div>

I think problem could be with namenode HA.  
I have similar problem.  
Caused by: java.net.UnknownHostException: hdfs1  
… 49 common frames omitted

Where hdfs1 is cluster name.

---

<div class="post-metadata">

**Author:** ![joshw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/joshw/32/27_2.png) [@joshw](https://community.dremio.com/u/joshw)\
**Post date:** [September 21, 2017, 11:36pm UTC](https://community.dremio.com/t/connection-string-options-for-hive/167/19 "2017-09-21T23:36:26Z")

</div>

@maver1ck I had the same problem and updating the /etc/hosts file like Can mentioned was the solution.

---

<div class="post-metadata">

**Author:** ![laurent](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/laurent/32/16_2.png) [@laurent](https://community.dremio.com/u/laurent)\
**Post date:** [September 21, 2017, 11:47pm UTC](https://community.dremio.com/t/connection-string-options-for-hive/167/20 "2017-09-21T23:47:52Z")

</div>

@maverick if your HDFS cluster uses HA, you would have to provide the fully qualified hostname for the master namenode.  
Alternatively It is probably possible to use the cluster name, but you would need to add your hdfs configuration (hdfs-site.xml or similar) under `<DREMIO_HOME>/conf` in order for Dremio to get the HA configuration for the HDFS cluster.

[Next page](https://community.dremio.com/t/connection-string-options-for-hive/167.md?page=2)
