Securing Apache Hive
Also available as:
PDF

Mask columns based on Ranger policies

You can mask data in query results based on Apache Ranger policies.

Apache Ranger masking filter supports the following types of masking:
  • show last 4 digits
  • show first 4 digits
  • hash
  • show only year
  • NULL
Masks are evaluated in the order that they are listed in the policy. You can exclude users, groups, or conditions from masking. You can configure mask types through configuration and by creating UDFs.
  1. Apply a masking policy to the ssn column of a table to show the last four digits and exclude Jane Doe and John Smith.
  2. Apply a masking policy to the birthday column of a table to show only the year except to members of the Finance group.
  3. Apply a masking policy to each column of table ABC if the confidential column value is no.