- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
mask fields
- Labels:
-
Apache Impala
-
Apache Kudu
-
Apache Ranger
Created ‎07-02-2021 04:16 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Team,
how can I mask last 5 digits in field below in Kudu?
on Ranger?
Thanks,
Roshan
Created ‎07-04-2021 07:11 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @roshanbi
I think there are really two questions here:
- For each row of my data set, can I mask the last 5 digits of each data element present in the pri_identity column using Ranger?
- Is this possible to achieve while using Kudu?
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 Apache Kudu as a storage option. 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.
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:
How to use Column Masking and Row Filtering in CDP
You can see a slightly longer length demonstration of how to do something similar on HDP 3.1.x in this video:
How to mask Hive columns using Atlas tags and Ranger
Neither quite shows how to establish the custom masking expression, though, which is what I think you'll need to satisfy your requirements.
To suppress the display of the last 5 digits in the pri_identity 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 at the documentation 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:
Hive Operators and User-Defined Functions (UDFs)
Hope this helps
Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Created ‎07-04-2021 07:11 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @roshanbi
I think there are really two questions here:
- For each row of my data set, can I mask the last 5 digits of each data element present in the pri_identity column using Ranger?
- Is this possible to achieve while using Kudu?
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 Apache Kudu as a storage option. 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.
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:
How to use Column Masking and Row Filtering in CDP
You can see a slightly longer length demonstration of how to do something similar on HDP 3.1.x in this video:
How to mask Hive columns using Atlas tags and Ranger
Neither quite shows how to establish the custom masking expression, though, which is what I think you'll need to satisfy your requirements.
To suppress the display of the last 5 digits in the pri_identity 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 at the documentation 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:
Hive Operators and User-Defined Functions (UDFs)
Hope this helps
Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
