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

Reuse values and SQL with Parameters and snippets

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

A Parameter is a named value, and a Snippet is a reusable block of SQL. You define each once and reference it in every pipeline that needs it; when you change it, every pipeline that uses it is flagged stale so you can rerun them. Open them under Data in the left sidebar, on the Parameters tab; Project Admins and Project Editors can create and change them, and Parameters are included on every plan.

To plug them into filters, formulas and SQL rules, see Use a Parameter or Snippet in a filter, formula or SQL.

What a Parameter is

A Parameter is a named value that you plug into conditions, filters, calculations and step values. Instead of typing 100 into ten filters, define Max_Units with value 100 and reference {Max_Units} everywhere; change the threshold once.

TypeUse forExample value
NumberThresholds, counts, amounts100, 0.75
TextStatus values, category names, flags"Active", "Yes"
DateCut-off dates, reporting periods2026-04-01

Reference a parameter with curly braces around its name:

{Max_Units}

A SQL rule like WHERE Discount < {Max_Discount} substitutes the current value at runtime.

What a Snippet is

A Snippet is a reusable block of SQL, such as a fragment, a subquery or a WHERE clause. Embed it with double braces:

SELECT {{column_list}} FROM orders WHERE {{standard_date_filter}}

A snippet's language is always SQL. Snippets can reference parameters, but not other snippets. The Snippets entry in Ask's navigation is unrelated: there, a snippet is a canvas of charts, numbers and notes saved from your chats.

Find Parameters and snippets in the library

Click Data, then the Parameters tab (after Datasets, Connections and Automations). It shows every parameter and snippet for the current project, grouped by category.

ColumnWhat it shows
NameThe identifier used in {name} references
DescriptionWhat this parameter represents
ValueThe current value
SubtypeNumber, Text or Date (parameters); SQL (snippets)
UsesHow many pipelines reference it
  • Search parameters finds by name.
  • Filter narrows by type (parameters or snippets), subtype (Date, Number, Text, SQL) or category.
  • Group by switches between None, Category (the default) and Type.
  • The Learn more icon links to help.

Who can manage Parameters and snippets

Creating, editing, duplicating and deleting needs the Manage Parameters and Snippets permission, which Project Admin and Project Editor have. A Project Viewer can read every item, but New Parameter is disabled with "Your role doesn't have permission to perform this action". See Members, roles and custom roles.

Create a Parameter or Snippet

  1. On the Parameters tab, click New Parameter.
  2. Choose the Parameter card or the Snippet card.
  3. Set the Name, Value and, for a parameter, Type (see below).
  4. Optionally set Category and Description under "More options".
  5. Click Create Parameter or Create Snippet.
FieldRequiredNotes
NameYesStarts with a letter or underscore; letters, numbers and underscores; no spaces; up to 100 characters.
TypeParameters onlyNumber, Text or Date. Can't be changed after creation.
ValueYesFor a parameter, must match the type; dates use a date picker and are stored as YYYY-MM-DD. For a snippet, the SQL code (no language selector); type /param to reference a parameter.
CategoryNoAn existing category, or General. Under "More options".
DescriptionNoShown in the library and the picker. Under "More options".

The item appears in the library under its category. Items made here are Project-scoped (there's no Scope field), and names must be unique within their scope. A snippet is referenced with {{name}}. Saving fails with "Snippets cannot reference other snippets" if its code contains another snippet reference in double braces; parameters such as {Max_Units} are fine.

Edit a Parameter and rerun stale pipelines

Click an item to open its detail panel, then Edit (or the edit icon on hover). You can change the value, description and category. The Name is read-only ("Name can't be edited"), and Type and Scope can't be changed. Each change is recorded in the item's history.

Saving changes no data straight away. Every pipeline that uses the item is marked stale, and Mammoth does not rerun them on its own:

  • The library highlights stale rows, with a banner such as "2 parameters were updated. Rerun affected pipelines to apply changes." and Rerun stale pipelines.
  • The detail panel shows, for example, Stale in 3 pipelines with Rerun.
  • The SQL rule, Apply Filter and Data check panels show their own stale banner with Rerun.

A rerun starts from the first task that uses the changed parameter; unchanged upstream tasks are not rerun.

See which pipelines use a Parameter and its history

The detail panel's Uses section lists each pipeline that references the item, as a project, dataset and View path, so you see what a change will affect. Snippets show the same.

Its history shows each change with how long ago it happened, the old value struck through, then the new value. Use it to trace a downstream change back to a specific edit.

Group Parameters into categories

Items go into General by default. Category headings have inline rename and delete icons. To add or manage categories, click + Manage next to the category pills under More options when you create or edit an item; Manage categories names them and gives them colours. Deleting a category moves its items back to General without deleting them.

Duplicate a Parameter or Snippet

  1. Click the duplicate icon next to Edit in the detail panel (or on hover).
  2. Duplicate Parameter or Duplicate Snippet opens with _copy added to the name, for example Max_Units_copy. Change the name or value if you like.
  3. Click Create Duplicate. Nothing is created until you do. A taken name gives "Name already in use".

Delete a Parameter or Snippet

Deleting is immediate and permanent, with no Trash entry and no restore.

  1. Click the trash icon at the right of the detail panel's header.
  2. If no pipeline uses it, Delete parameter (or Delete snippet) asks "Are you sure you want to delete" followed by the name, for example Max_Units, and warns that this can't be undone.
  3. Click Delete.

If a pipeline uses it, Cannot delete parameter (or Cannot delete snippet) says it "is used by pipelines and cannot be deleted", lists each View with its task count, and offers only Close. Remove the references first.

Project and workspace scope

Project scopeWorkspace scope
Visible inThis project onlyAll projects in the workspace
Reference syntax{name} / {{name}}Same syntax
Name uniquenessUnique within this projectUnique across the workspace
Best forDataset-specific thresholds, View-specific logicShared standards, such as fiscal year start or company-wide thresholds

New Parameter always creates a Project-scoped item. Workspace-scoped items can exist (for example, created through the API), and you see and reference them like any other. A project-scoped Threshold and a workspace-scoped Threshold can coexist. Scope can't be changed after creation.

Troubleshooting

SymptomCauseFix
New Parameter is disabled: "Your role doesn't have permission to perform this action"You are a Project Viewer.Ask a Project Admin for the Editor role, or to make the change.
Cannot delete parameterPipelines still use it.Remove the references in the listed Views, then delete.
"Snippets cannot reference other snippets"The snippet code has another {{...}} reference.Paste the other snippet's code instead, or use a parameter.
"Name already in use"The duplicate's name exists.Choose another name.
Data didn't change after you edited a valueMammoth doesn't rerun stale pipelines on its own.Click Rerun or Rerun stale pipelines.
Was this page helpful?

Something wrong? support@mammoth.io