Policy Tag Taxonomies in BigQuery + dbt

Policy tags have to have the project name specified in its resource path, as well as the location. I don’t think the taxonomy (ies) are usually that big but the number of columns using them may be.

I wonder if anybody tried to write it as DRY as possible.

At the moment I add a policy tag in resource.yml file under columns:

 - 'projects/{{target.project}}/locations/{{var("default_location")}}/taxonomies/6942516414247800377/policyTags/3505403136526480544'

The problem I see is that I would have to copy this whole resource path to every column where I need it. I thought about using vars for it:

  policy_tag_email: 'projects/{{target.project}}/locations/{{var("default_location")}}/taxonomies/6942546414257800377/policyTags/3505403436526380544'

but I wouldn’t be able to use {[target.project}} or var("default_location") in the definition of vars, according to the documentation:

Taxonomies, in order to work, have to live in the project and I’m running DEV and PROD in separate projects. Location is just addition and I could make it hardcoded but the {{target.project}} problem still persists.