Skip to main content
A Metric Template is a reusable parameterized SQL rule stored in the Rule Library. Write the quality logic once, assign it to any number of assets, and let each assignment carry its own parameter overrides. When the template changes, all assignments update on their next run — no manual edits across dozens of metrics. Navigate to: Click the Metric Template button at the top of the Metrics page to switch from the metric list to the Rule Library.
Metric Templates have a separate permission set from standard Metrics. Access must be granted explicitly in your organization’s RBAC configuration — having Metric access does not automatically grant Template access.

Template vs. standalone parameterized metric


Template Dashboard

The Metric Template page opens with three summary cards:

Attribute-only templates

If the SQL contains {{column}} or {{attribute}}, Prizm flags the template as Attribute-only — it can only be assigned to column-level objects, not table-level assets. If neither token appears, the template can be assigned to either Assets or Attributes.

Use cases

Regional REGEX validation (MTART)

Business need: Validate that the MTART (Material Type) column matches the allowed format for each region. The format differs by region and the rule applies to dozens of tables. Without templates: one metric per region per table — dozens of near-identical metrics to maintain.
With a template: one definition, one assignment per region/table, each with its own REGEX override.
Template SQL:
Assignments: Updating the template SQL (e.g., adding a WHERE clause to exclude archived records) automatically propagates to all three assignments.

Territory ENUM allowlist check

Business need: Ensure every Territory value in the sales table is one of the approved codes. The approved list differs per region.
Each sales region table gets its own assignment with its own allowed_territories override.

Cross-asset null check

Business need: Apply the same null-rate check on a specific column across many tables. The column name varies per table.
Both {{table}} and {{attribute}} are SOURCE parameters — they resolve automatically from the column selected in the asset configuration. No manual override required.

Freshness SLA with configurable window

Business need: Different tables have different acceptable freshness windows — hourly, daily, or weekly. One template handles all with a max_hours override per assignment.
Pass criteria: Metric value must be <= {{max_hours}} (set via Custom Threshold using the parameter). Three SLA policies. One template. Zero metric duplication.

Real-world SQL complexity examples

Completeness check — reserved keywords only

Template: C_POLICY_EFF_DATE_COMPLETENESS
Both tokens are SOURCE — resolved from the assigned attribute. No popup input needed. Resolved SQL for attribute POL_EFF_DT:

Date validity — reserved + one custom parameter

Template: POL_EFF_DATE_VALIDITY
Assignment opens a parameter input pane requesting stale_date. User enters 1900-01-01. Resolved SQL:

Cross-table join check — reserved + custom identifier and value

Template: PREMIUM_TRANS_CODE_MISMATCH
No {{column}} → can be assigned at Asset or Attribute level. Resolved SQL:

Setup

Step-by-step: create a template, assign to assets, propagation fields, and Run All.