Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

Hive - ODBC driver - Error_State when querying with condition

avatar
Frequent Visitor

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

avatar
Frequent Visitor

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

View solution in original post

2 REPLIES 2

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

avatar
Frequent Visitor

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