Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Temporary table not found (ODBC driver issue ?)

avatar
Contributor

Hi,

I am facing the following problem : Using the Hortonworks ODBC driver for Hive, I can create a temporary table (hiveserver2.log tell me that it is done without error), but I can't retrieve this table with a SELECT query thereafter.

When I try to do so, I get a "table not found" error. Does it mean the ODBC driver does not keep the session between 2 hive calls ? Is there something I am doing wrong or some configuration I need to set ? I believe since hive 0.14, the "temporary table" part in the ODBC driver configuration is not necessary, or is it ?

Thanks in advance,

Sylvain.

1 ACCEPTED SOLUTION

avatar
Rising Star

@dvt isoft I am not sure which client you are using to connect. It might be worth checking if the same connection (so that same session) is being used to run successive queries or is it like client is kind of establishing new connection for each query. Otherwise, hive odbc driver is able to run select queries on temporary tables and as you already mentioned you don't need to enable it explicitly starting Hive 0.14.

View solution in original post

11 REPLIES 11

avatar
Expert Contributor

@dvt isoft Hi,

Are you able to access hive through command line? If so, I would look to see if your table is showing up there. I would also double check the database is selected correctly. Are you creating it in default database or creating your own database and a table within it.

Thanks

avatar
Contributor

Thank you mliem,

I am able to access hive through beeline. I can create my temporary table, and see it appearing with a "show tables" command using beeline.

I tried creating my temporary table in the default database, and in a specified one, but I get the same result.

Sylvain.

avatar
Expert Contributor

@dvt isoft Are the tables you've created via ODBC showing up in beeline? What about if you try creating a database instead.

avatar
Contributor

Yes, the tables created via ODBC are showing up in beeline. Creating a database via ODBC works too. The problem seems to be only appearing with temporary tables.

avatar
Expert Contributor

Also, is the cluster kerberized? Do you have ranger policies for Hive?

avatar
Contributor

My cluster is not kerberized and I do not have ranger policies for Hive.

avatar
Rising Star

@dvt isoft I am not sure which client you are using to connect. It might be worth checking if the same connection (so that same session) is being used to run successive queries or is it like client is kind of establishing new connection for each query. Otherwise, hive odbc driver is able to run select queries on temporary tables and as you already mentioned you don't need to enable it explicitly starting Hive 0.14.

avatar
Contributor

Thank you.

As you said, the client I am using is generating a new session at each call, that was the problem.

Sylvain.

avatar
@dvt isoft

Are you able to connect hive using ODBC driver? Can you add screen shot?

Can you add screen shot for successful table creation?

run show tables and add screen shot as well. Thanks