Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Hive - ODBC driver - Error_State when querying with condition

Solved Go to solution

Hive - ODBC driver - Error_State when querying with condition

New Contributor

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

 

1 ACCEPTED SOLUTION

Accepted Solutions

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

New Contributor

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
2 REPLIES 2

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

Champion
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?

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

New Contributor

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