Skip to content

Template Examples

These scenarios show when a template pays off, and how the choice between Locked and Unlocked plays out over time.

One Rule Across Every Customer Table

Situation. Five datastores each hold a customer table, and every one of them must have a customer ID on every row. The rule is the same everywhere, and the data governance team wants it to stay the same.

Template. A Not Null template, Locked, with the description Every customer record must carry a customer ID and the tag customer-data.

Applying it. From the template's page, Add › Multiple Checks lists one target per customer table, each with its own ID field. The five checks are created as Draft, reviewed, and activated.

Later. The team decides that test accounts should not count, and adds the filter clause is_test = false to the template. Because the template is locked, the new filter reaches all five checks in the same save. With an unlocked template, each check would have needed the edit by hand.

A Starting Point Each Team Adjusts

Situation. Several teams want a Max Length rule on free-text fields, but each team's limit depends on its own downstream systems.

Template. A Max Length template, Unlocked, with a common limit of 255 and the tag text-limits.

Applying it. Each team adds a check from the template on its own field, then lowers the limit where its system needs a shorter value. Because the template is unlocked, those edits stay on each check.

Later. Retagging the template from text-limits to field-length still reaches every linked check: tags follow the template even when it is unlocked. Changing the template's limit to 500 does not, so no team loses the limit it set.

One Check per Country

Situation. Every order must have a positive total, and the business needs to know which country is affected when one does not.

Template. A Positive template with the filter clause country_code = each('BRA', 'USA', 'ESP'), Locked.

Applying it. Adding a check from the template to the TOTAL_AMOUNT field of the ORDERS table creates three checks, one per country, each with its own filter such as country_code = 'BRA'.

Later. The business opens in Mexico. Adding 'MEX' to the template's filter creates a fourth check on ORDERS. When the Spanish operation closes, removing 'ESP' deletes the Spain check. See Filter Permutations.

Taking a Check Off a Template

Situation. One of the five customer tables from the first example starts carrying partner accounts, which legitimately have no customer ID. That check needs a different filter, but the template is locked.

What to do. Editing that check directly is not possible while it is linked to a locked template. The options are:

  • Add the partner rule to the template's filter, so all five checks share it, if it makes sense everywhere.
  • Create a separate check for that table without the template, then archive the linked one.

Archiving the template itself is not an option while it is locked and has checks. See Archiving a Template.

See Also