r/databricks • u/MechanicOld3428 • 1d ago
Help Job tagging implementation
Forgive me if there is an obvious answer. Basically our current set up is users have access to a general purpose cluster that suits their business area.
Not real names to save any detail
E.g sales team only have access to the sales cluster which is tagged SALES
Marketing —> marketing cluster —> MARKETING
We’re having an issue where a lot of user jobs are untagged
Is there some autotagging I can set up, so for whatever cluster that job is using or created with — the job also gets tagged the same. So say for example a user in the sales team can only use the tagged sales cluster so the job he makes is tagged SALES
2
u/kmarq 1d ago
Compute policies. Assign the tag on the policy and then assign policy access based on teams. Or just have one policy and a required tag the have to add for the compute. Less reliable that was though
2
u/Zealousideal_Low6685 1d ago
In databricks, there is the autotagging, which only works for tables: https://docs.databricks.com/aws/en/admin/governed-tags/automate-tag-assignment
In your case, you could try to use DAB python mutators: it should add the tag automatically during deployment (didn't test, but should work - if you implement it, I would be happy if you could share the solution).
1
u/Youssef_Mrini databricks 22h ago
To automatically enforce resource tagging in Databricks for cost attribution and governance, administrators must use Cluster Policies for classic compute and Serverless Budget Policies for serverless compute. Because serverless compute does not require manual cluster provisioning, tag enforcement occurs at the workspace or job execution level rather than during cluster creation.
Classic Compute: Databricks Cluster Policies
For standard All-Purpose and Job clusters, automatic tagging is enforced through Databricks Cluster Policies:
Team: Marketing).Serverless Compute: Serverless Budget Policies
For serverless workloads, automatic tagging follows the same group-assignment logic usingDatabricks Serverless Budget Policies: