Skip to main content

Creating a Metric Template

1

Open the Rule Library

Navigate to Metric and click the Metric Template button at the top of the page. This switches from the metric list to the Rule Library.Click + Add Metric Template.
Image
2

Fill in the template details

The Sub Category is set to Parameter automatically.
3

Write the SQL with `{{param_name}}` tokens

In the SQL editor, write the parameterized query.
Prizm auto-detects all {{param}} tokens on save and populates the parameter list.
If the SQL contains {{column}} or {{attribute}}, the template is flagged Attribute-only — it can only be assigned to column-level objects, not table-level assets.
4

Configure detected parameters

For each auto-detected parameter, set:SOURCE parameters ({{table}}, {{schema}}, {{attribute}}, etc.) are configured automatically — no manual setup needed.
5

Save the template

Click Save Template. The template is now available in the Rule Library and ready to assign.

Assigning a Template to an Asset

A single template can be assigned to multiple assets. Each assignment creates one executable metric named Template Name — Asset Name.
1

Open the assignment form

From the Rule Library, find the template and click Assign. Alternatively, open an asset’s metric tab and select Add from Template.
2

Select the target asset

Choose the table, view, or attribute. SOURCE parameters ({{table}}, {{schema}}, etc.) resolve automatically — no manual entry.
3

Set parameter overrides

The assignment form lists all declared parameters with their template defaults. Override any value specific to this asset:Parameters left blank use the template default. Required parameters with no default must be filled before the assignment can be activated.
4

Set schedule and threshold

Configure the run schedule and optionally override the template’s default threshold for this assignment. Overridden values are marked overridden vs. inherited and are never silently reset when the template default later changes.
5

Save

Click Save Assignment. The metric appears in the asset’s metric list and runs as a standard metric from that point forward.

Parameter Resolution Order

At run time, values are resolved in this priority:

Updating a Template

Edit the template’s SQL or parameters directly in the Rule Library. The following fields propagate to all assignments on their next run: Assignment-level overrides are always preserved — template updates never overwrite them.
Assignments receive an in-app notification when the template changes. Review updated parameters before the next scheduled run.

Running Templates

Run a single assignment

Open the assigned metric on the asset page and click Run. If the metric has unresolved runtime parameters, a popup prompts for values before execution.

Run All — execute every assignment at once

From the Rule Library, open a template and click Run All. This executes every metric generated from that template in a single batch. If any assignment has unresolved runtime parameters, a dialog appears with an accordion layout — one section per asset — where you supply values before submitting. All metrics are submitted together and the Timeline updates as each completes.

Viewing Assignments and Timeline

Open a template in the Rule Library and select the Assignments tab to see:
  • Every asset the template is assigned to, listed as Template Name — Asset Name
  • The active parameter overrides per assignment
  • Run history per assignment: resolved SQL, effective parameters, status, and timestamps
Multi-asset timeline: When a template has multiple assignments, the Timeline view shows a metric dropdown. Select a specific assignment to view that asset’s run history.