Created 03-28-2017 01:22 PM
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.
Created 03-28-2017 05:20 PM
@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.
Created 03-28-2017 01:32 PM
@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
Created 03-28-2017 01:46 PM
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.
Created 03-28-2017 01:58 PM
@dvt isoft Are the tables you've created via ODBC showing up in beeline? What about if you try creating a database instead.
Created 03-28-2017 02:06 PM
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.
Created 03-28-2017 02:00 PM
Also, is the cluster kerberized? Do you have ranger policies for Hive?
Created 03-28-2017 02:07 PM
My cluster is not kerberized and I do not have ranger policies for Hive.
Created 03-28-2017 05:20 PM
@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.
Created 03-29-2017 09:07 AM
Thank you.
As you said, the client I am using is generating a new session at each call, that was the problem.
Sylvain.
Created 03-28-2017 05:35 PM
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