Every time I set the policy_tags in BigQuery (BQ) and rerun my dbt transformations the policy gets wiped away. I have enabled the proper permissions in BQ ( Data Catalog Admin & Policy Tag Admin to be sure) and established the +persist_doc config suggested in dbt_project.yml. My schema.yml contains the policy_tag setup as explained in dbt docs.
Need to establish policy_tags in BQ to have a targeted permission-based access to PII fields in our datasets.
Detailed approach above. Any video or doc link of examples would be greatly appreciated. Not seeing much out there in my search.
I’ll give it a shot. To be 100% clear, the persist_docs refers to the target schema (as in where the model will build into) and not the source schema (where the SQL is pulling from).
[Update] Be sure to assign policy in model/schema.yml to specific filed path. The main issue I discovered here had more to do with the COLUMN naming (name.fullName NOT fullName). Thanks @brunoszdl for ensuring the rest was correct.