<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Querying a Hive Table (via Hiveserver2) with Column Masking enabled via Ranger Hive Plugin returns with an error. in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Querying-a-Hive-Table-via-Hiveserver2-with-Column-Masking/m-p/167265#M129597</link>
    <description>&lt;P&gt;I tried the above scenario and &lt;A rel="user" href="https://community.cloudera.com/users/15925/navendugarg.html" nodeid="15925"&gt;@Navendu Garg&lt;/A&gt;'s exact issue is described below: &lt;/P&gt;&lt;P&gt;There is a table say 'default.testtable1' with one of the column names containing a space say 'account name'. &lt;/P&gt;&lt;P&gt;[create table testtable1(Name String,`Account number` String,Age int);&lt;/P&gt;&lt;P&gt;...log/webhcat/webhcat.log.2017-02-14:hive.support.quoted.identifiers=column]&lt;/P&gt;&lt;P&gt;A user say 'user1' has a Hive access policy granting all permissions to user1 on default.testtable1, all columns. &lt;/P&gt;&lt;P&gt;There is also a masking policy which masks column 'name' in same table 'default.testtable1' with mask type='redact' for user1.&lt;/P&gt;&lt;P&gt;select * from default.testtable1 throws:&lt;/P&gt;&lt;PRE&gt;Error: Error while compiling statement: FAILED: SemanticException org.apache.hadoop.hive.ql.parse.ParseException: line 1:41 rule Identifier failed predicate: {allowQuotedId()}?
line 1:56 rule Identifier failed predicate: {allowQuotedId()}?
line 1:129 rule Identifier failed predicate: {allowQuotedId()}?
line 1:144 rule Identifier failed predicate: {allowQuotedId()}? (state=42000,code=40000)&lt;/PRE&gt;&lt;P&gt;Audit shows only masking policy allowed the txn. There is no deny and no access policy mentioned in the audit. The flow didn't reach the access policies auth.&lt;/P&gt;&lt;P&gt;On disabling the masking policy, the select shows correct results.&lt;/P&gt;&lt;P&gt;NOTE: I tried it with mask type as 'Hash','Partial mask','Nullify' and same result.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.hortonworks.com/questions/82350/querying-a-hive-table-via-hiveserver2-with-column.html#"&gt;@Madhan Neethiraj&lt;/A&gt;, Will you pls confirm if this is expected - If any of the column names in a table contain spaces and there is a mask policy on any of that table's columns, then select with fail with the above exception.&lt;/P&gt;</description>
    <pubDate>Thu, 16 Feb 2017 03:47:10 GMT</pubDate>
    <dc:creator>aleekha</dc:creator>
    <dc:date>2017-02-16T03:47:10Z</dc:date>
  </channel>
</rss>

