Created 07-02-2021 04:16 AM
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
Hi @roshanbi
I think there are really two questions here:
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
Created 07-04-2021 07:11 PM
Hi @roshanbi
I think there are really two questions here:
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