Ali Zuhair
Ali Zuhair

Reputation: 313

HortonWorks “Table or view not found” when querying Hive from Excel using ODBC connection in Mac

I am using Hortonworks sandbox 2.1 with Apache Hive ODBC driver 2.1 and iODBC.

The ODBC connection is successful when I test it using the iODBC software. But, when I open excel and use Microsoft query to return the data to excel spreadsheet I get this error when I run SQL SELECT query

: [Hortonworks][SQLEngine] (31740) Table or view not found: HIVE.default.tweetsbi.

I am able to view the tables inside the database, but I can't view the content of them. Whenever I press Run I get the aforementioned error.

I am getting the same error in both Excel 2011 and 2016

enter image description here

Upvotes: 1

Views: 5202

Answers (2)

Croco971
Croco971

Reputation: 1

Congrats, that you found a solution! However it may be that you don't want to grant sandbox access to your tables. I regard it as a bug in the Hortonworks driver, that this default HIVE databasename appears in the path.

Another - more general purpose - solution: Install the Microsoft Hive driver. Works fine and doesn't have the bug :-)

https://www.microsoft.com/en-us/download/confirmation.aspx?id=40886

ATB!

Croco

Upvotes: 0

Ali Zuhair
Ali Zuhair

Reputation: 313

I've got it to work by :

  1. Editing the configuration of Hortonworks Hive ODBC Driver by changing UseNativeQuery from 0 to 1.
  2. Give permission to the user "sandbox"

     hive
     grant SELECT on table tweetsbi to user sandbox;
    

Upvotes: 1

Related Questions