Support Questions

Find answers, ask questions, and share your expertise

Hortonworks odbc driver fail to access table/columns with ranger policy in place.

avatar
Rising Star

SELECT table1.col1, table1.col2 FROM db1.table1;

The import process encountered an unexpected error
ERROR [42S02] [ACL][SQLEngine] (31740) Table or view not found: HIVE.db1.table1Command Failed

Database tables access was restricted through ranger by restricting some of the sensitive columns. Above selected columns are not part of the ranger policy and are accessible through ambari hive view and beeline. Above error coming only when access through odbc driver.

1 ACCEPTED SOLUTION

avatar
Rising Star

Issue is fixed after enabling the Use native Query option from Advanced Options. Hwx odbc driver verrsion we got the issue is v2.1.5.1006 64bit). ODBC driver logs showed, without the native query option, it tries to describe the table "desc db1.tabl1". As some of the columns are restricted in that table for the end users, describe query is failing. When "Use native query" option enabled it did not tried to describe the table, so the end users query on permitted columns work well.

Feel free to to comment on this explanation and corrections.

View solution in original post

2 REPLIES 2

avatar
Rising Star

Issue is fixed after enabling the Use native Query option from Advanced Options. Hwx odbc driver verrsion we got the issue is v2.1.5.1006 64bit). ODBC driver logs showed, without the native query option, it tries to describe the table "desc db1.tabl1". As some of the columns are restricted in that table for the end users, describe query is failing. When "Use native query" option enabled it did not tried to describe the table, so the end users query on permitted columns work well.

Feel free to to comment on this explanation and corrections.

avatar
Rising Star