dbt-databricks
dbt-databricks copied to clipboard
Feature Request: Support Column Masking
trafficstars
Describe the feature
Support Column Masking as part of the YAML definition:
{% macro create_hash_function() %}
CREATE OR REPLACE FUNCTION my_catalog.my_schema.hash_mask(raw_value STRING)
RETURN sha2(raw_value, 256);
{% endmacro %}
on-run-start: "{{ create_hash_function() }}"
models:
- name: foo
description: I'm a teapot
columns:
- name: id
- name: bank_details
column_mask: my_catalog.my_schema.hash_mask
Describe alternatives you've considered
Doing this in a post-hook. It works fine but it's a bit messy,
Additional context
Please include any other relevant context here.
Who will this benefit?
Anyone who wants to define masking for their models
Are you interested in contributing this feature?
Yes