Apply a rule template
Status: in preview — part of the Validations rework. See the rule templates concept for the model.
Goal
Reuse one set of data-quality rules across many tables: capture rules once as a template, apply them to the assets that should share them (mapping columns where names differ), then run them together as a scheduled validation. This turns "re-author the same null / uniqueness / freshness checks on every table" into a two-click apply.
Prereqs
- One asset that already has the rules you want to reuse — see Add rules to a data asset. (You can also author a template's rules directly through the API.)
- Workspace editor role or higher (
can_create_rule/can_edit_rule) — a viewer can see templates but can't create, apply, or save them. - The target assets exist as data assets. They don't need rules yet — the template supplies them. A profile run on each target helps: the apply dialog offers the profiled columns as column-map targets.
Steps
-
Save an asset's rules as a template. Open the asset with the rules you like → the Rules tab → Save as template. Give it a name (e.g. Standard PII checks) and save. The template captures the current, saved rules — column names and all.
-
Apply the template to another asset. Open a target asset → Rules tab → Apply template. Pick your template. If any of the template's columns aren't on this asset, a column map appears: for each unmatched column, choose the asset's equivalent column (or leave it as-is to apply the rule with the original name). The dialog previews how many rules will be added (and how many are already present). Click Apply — the rules merge into this asset's suite; your hand-authored rules are kept.
-
Or do both at once — create a validation from the template. Go to Validations → New validation. Under Start from a template, choose your template, then tick the assets to apply it to. On Create, each selected asset gets the template applied and is added to the new validation in one step. (Leave the template unset to add assets that already have rules; select no assets to create an empty validation and fill it later.)
-
Schedule it. Open the validation and add it to a schedule so the shared rules run on a cadence. Now every asset carrying the template's checks is validated together, automatically.
Verify
- On each target asset's Rules tab, the template's rules now appear in the rules list (merged with any existing rules).
- The Rules on this asset card shows the validation under Runs in: once the asset is bound.
- Run now on the validation produces a per-asset breakdown covering every asset you applied the template to, and the validation's health score reflects the combined result.
Notes
- Copy-on-apply. Applying a template copies its rules in; later edits to the template do not change assets you already applied it to. Re-apply the template to push a newer version (the merge skips rules that are already present, so re-applying only adds what's new).
- Additive, never destructive. A template apply only ever adds rules to an asset. It never removes or overwrites rules you authored by hand.
- Column mapping is per apply. The map you choose applies to that one asset. Applying the same template to a differently-named table just means a different map.