Column-Based Masking
Column-based masking masks the values of a single, individually named column in query results, rather than every column carrying a shared tag. Each column policy targets one column by name and schema location, and maps user roles to the masking type applied when that role queries it.
Column-based masking applies to Snowflake data sources.
ALTR recommends tag-based masking over column-based masking for most cases: a tag-based policy covers every column carrying its tag as new columns are tagged, while a column-based policy needs a separate rule for each additional column. Column-based masking fits targeted exceptions — masking one specific column without tagging it.
Precedence Over Tag Policy
Section titled “Precedence Over Tag Policy”If both a tag-based policy and a column-based policy apply to the same column, the column-based policy takes precedence.
Create a Column Policy
Section titled “Create a Column Policy”To create a column policy:
- Ensure the column is connected to ALTR.
- Select Policy in the navigation menu.
- Click Create Policy.
- Locate the Column Policy card and click Create Policy.
- Select the Column the policy affects. The policy applies masking to the values in this column.
- Click Next.
- Build the rule statement:
- Select the Role the rule affects.
- Select the Masking Type — the masking type applied to query results for that role. See Masking Types for the available masking types.
- (Optional) Click Add an Alert to configure a policy alert for this rule. See Policy Alerts.
- (Optional) Click + Rule Statement to add another rule to the policy.
- (Optional) Disable Policy State to create the policy now and activate it later. To deactivate a policy after it’s created, first resolve all of its alerts. Deactivating a policy stops applying masking to the column.
- Click Save. ALTR saves the policy.
Edit a Column Policy
Section titled “Edit a Column Policy”To edit a column policy:
- Select Policy in the navigation menu.
- Expand the policy to edit.
- Click Edit Policy.
- Update the policy as needed.
- Click Save. ALTR saves your changes.
Delete a Column Policy
Section titled “Delete a Column Policy”Deleting a column policy removes its masking rules; values in the affected column are no longer masked for the roles the policy covered.
To delete a column policy:
- Select Policy in the navigation menu.
- Expand the policy to delete.
- Click Edit Policy.
- Click Delete Policy; a confirmation modal displays.
- Click Delete Policy to confirm.