Skip to content
Learn › Organise your data › Parameters and snippets: open the docs menu

Use a Parameter or Snippet in a filter, formula or SQL

Every plan · Project Admin and Project Editor · Updated 8 Nov 2026

Once a Parameter or Snippet exists, you plug it into pipeline steps instead of typing the value or SQL. In most steps you pick a parameter from a picker, and Mammoth shows it as a {Max_Units} token; in a SQL rule you insert a snippet as {{name}}. To create them, see Reuse values and SQL with Parameters and snippets.

Use a Parameter in a filter condition

When you add a condition to a filter in Builder mode, the chip in front of the value reads Val by default.

  1. Open a pipeline and add or edit a filter condition.
  2. Click the Val chip and select Parameter ("Bind to a project parameter"). The chip changes to #.
  3. Search for and select the parameter. The picker shows parameters whose type matches the column. To create one without leaving the condition, use its New Parameter link.
  4. Save the condition. To unbind later, click the X on the token.

The filter uses the parameter's current value each time the pipeline runs. Parameters also work as inputs in Data check. See Filter rows.

Add Condition dialog with Discount is less than Parameter chosen and a picker listing Pending_units, Number 100, with a New Parameter link

A Conditional Filter in SQL mode does not read parameters: {Max_Units} in it stays plain text. Use Builder mode for a parameter-driven filter.

Where you can use a Parameter

StepHow to add the parameterParameter types offered
Conditional Filter, and any Add Condition built in Builder modeVal chip > ParameterThe column's type
Label & Insert Values (Enter a value)Val chip > ParameterThe result column's type
Find & Replace (Find value, Replace with)Val chip > ParameterText
Show Top/Bottom Rows (row count)Val chip > ParameterNumber
Obtain Large or Small Values (Add a custom value to compare)Val chip > ParameterNumber
Math Function, Formula modeInsert Parameter above the formula, or the autocomplete listNumber
Math Function, SQL modeInsert Parameter above the SQL Expression editorAll. Text and Date parameters go in as '{name}' so they read as SQL strings.

In Math Function, the parameter is written into the expression as {name}, and two errors can appear:

  • "Parameter ... not found": the formula names a parameter that doesn't exist.
  • "Only numeric parameters allowed, ... is not one": a Text or Date parameter is in a formula.

For the formula syntax, see Calculate with formulas.

Use a Snippet in a SQL rule

In a SQL rule, click Insert Snippet, pick the snippet, and choose how to insert it:

OptionWhat it inserts
Reference{{name}}, which stays linked: later edits to the snippet reach the task.
Paste valueThe snippet's current code as plain text, with no link.
SELECT customer_id, SUM(amount)
FROM transactions
WHERE {{standard_date_filter}}
GROUP BY 1

At run time, Mammoth substitutes the snippet's code for {{standard_date_filter}}. When the snippet changes, its detail panel flags the pipelines that use it as stale; use Rerun to apply the change. See Write SQL with AI.

Troubleshooting

SymptomCauseFix
{Max_Units} stays as text in a filterThe Conditional Filter is in SQL mode.Switch to Builder mode and bind the value with Val > Parameter.
"Only numeric parameters allowed, ... is not one"A Text or Date parameter is in a Formula-mode Math Function.Use a Number parameter, or switch to SQL mode.
"Parameter ... not found"The formula names a parameter that doesn't exist.Create it, or fix the name.
Was this page helpful?

Something wrong? support@mammoth.io