Apply custom transformation to a column
In this section, you find the details of Apache Ranger policy to set a custom expression to transform the value of name_first column.
- Data before transformation
- The following example shows the data before transformation:
- Policy details
- Add a policy with the following details to specify the expression, initcap(reverse({col})), to transform name_first column values. Ensure that the data type of the expression is same as the data type of the column. Token ‘{col}’ in the expression will be replaced by Apache Ranger policy engine by the name of the column on which masking is being applied.
- Query Results
- The query result shows transformed value name_first column, as shown in the following example: