Reply
New Contributor
Posts: 2
Registered: ‎02-20-2017
Accepted Solution

Hive - ODBC driver - Error_State when querying with condition

Hi,

 

I'm working on the cloudera quickstart docker et have the hive odbc installed (version 2.5.21) with unixodbc (version 2.3.4).

 

I can perfom queries like :

select a from my_table;

select a from my_table where true;

 

However when I try to execute queries like

select a from my_table where b=value;

I get the following error

 

[Cloudera][Hardy] (35) Error from server: error code: '0' error message: 'ExecuteStatement finished with operation state: ERROR_STATE'

 

 

 Any ideas on what the problem could be?

 

Regards

 

Posts: 642
Topics: 3
Kudos: 121
Solutions: 67
Registered: ‎08-16-2016

Re: Hive - ODBC driver - Error_State when querying with condition

Can you run this query in Hive w/o the driver?

I believe the first two queries do not require MR job(s) and it is possible for it to work w/o proper user setup.

The last query will require MR and that requires that the users exist.

What user are you on when using the ODBC driver? Does that user exist in the docker quickstart container?
New Contributor
Posts: 2
Registered: ‎02-20-2017

Re: Hive - ODBC driver - Error_State when querying with condition

Hi,

 

Thanks for your answer.

Yes, that is what I'm thinking.

I have used the hdfs and hive users.

 

Since that time, I have solved the problem by executing the commands below (from the top of https://www.cloudera.com/documentation/enterprise/5-6-x/topics/sg_sentry_service_config.html) :

 

$ sudo -u hdfs hdfs dfs -chmod -R 777 /user/hive/warehouse
$ sudo -u hdfs hdfs dfs -chown -R hive:hive /user/hive/warehouse