<?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 mask fields in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/mask-fields/m-p/319747#M227950</link>
    <description>&lt;P&gt;Dear Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how can I mask last 5 digits in field below in Kudu?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="roshanbi_0-1625224570186.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/31769i47CC737F63EEBF8E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="roshanbi_0-1625224570186.png" alt="roshanbi_0-1625224570186.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;on Ranger?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Roshan&lt;/P&gt;</description>
    <pubDate>Fri, 02 Jul 2021 11:16:50 GMT</pubDate>
    <dc:creator>roshanbi</dc:creator>
    <dc:date>2021-07-02T11:16:50Z</dc:date>
    <item>
      <title>mask fields</title>
      <link>https://community.cloudera.com/t5/Support-Questions/mask-fields/m-p/319747#M227950</link>
      <description>&lt;P&gt;Dear Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how can I mask last 5 digits in field below in Kudu?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="roshanbi_0-1625224570186.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/31769i47CC737F63EEBF8E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="roshanbi_0-1625224570186.png" alt="roshanbi_0-1625224570186.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;on Ranger?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Roshan&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jul 2021 11:16:50 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/mask-fields/m-p/319747#M227950</guid>
      <dc:creator>roshanbi</dc:creator>
      <dc:date>2021-07-02T11:16:50Z</dc:date>
    </item>
    <item>
      <title>Re: mask fields</title>
      <link>https://community.cloudera.com/t5/Support-Questions/mask-fields/m-p/319811#M227970</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/81707"&gt;@roshanbi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think there are really two questions here:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;For each row of my data set, can I mask the last 5 digits of each data element present in the &lt;FONT face="courier new,courier,monospace"&gt;pri_identity&lt;/FONT&gt; column using Ranger?&lt;/LI&gt;&lt;LI&gt;Is this possible to achieve while using Kudu?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I'll restrict myself to addressing the first question. Your second question is a good one, though, because most of the documentation I've read about this simply doesn't mention Kudu, so I'll leave that part of your question to another community member who has more experience with &lt;SPAN&gt;Apache Kudu as a storage&amp;nbsp;&lt;/SPAN&gt;option.&amp;nbsp;You didn't provide the version of either Impala, Ranger or Kudu you're using or on what distribution, but I will attempt to point you in the right direction nonetheless.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can see a quick demonstration of why and how to use a mask in Ranger on CDP in the first two minutes of this video:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.cloudera.com/t5/Community-Articles/How-to-use-Column-Masking-and-Row-Filtering/ta-p/288213" target="_blank" rel="noopener"&gt;How to use Column Masking and Row Filtering in CDP&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You can see a slightly longer length demonstration of how to do something similar on HDP 3.1.x in this video:&lt;/P&gt;&lt;P&gt;&lt;A href="https://youtu.be/3XbZ6tga52Q" target="_blank" rel="noopener"&gt;How to mask Hive columns using Atlas tags and Ranger&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Neither quite shows how to establish the &lt;EM&gt;custom masking expression&lt;/EM&gt;, though, which is what I think you'll need to satisfy your requirements.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To suppress the display of the last 5 digits in the &lt;FONT face="courier new,courier,monospace"&gt;pri_identity&lt;/FONT&gt; column, you are likely to need a custom masking expression for use in Ranger. Ranger includes several "out of the box" masking types, but a cursory look &lt;A href="https://docs.cloudera.com/HDPDocuments/HDP3/HDP-3.1.5/authorization-ranger/content/dynamic_resource_based_column_masking_in_hive_with_ranger_policies.html" target="_blank" rel="noopener"&gt;at the documentation&lt;/A&gt; indicates that the masking policy you've described and desire is not one of them. If that's true, you can always write a custom masking expression using the UDF syntax, which you can read about at the Apache.org site here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF#LanguageManualUDF-HiveOperatorsandUser-DefinedFunctions(UDFs)" target="_blank" rel="noopener"&gt;Hive Operators and User-Defined Functions (UDFs)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jul 2021 02:11:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/mask-fields/m-p/319811#M227970</guid>
      <dc:creator>ask_bill_brooks</dc:creator>
      <dc:date>2021-07-05T02:11:38Z</dc:date>
    </item>
  </channel>
</rss>

