A named, human-set scalar value referenced inside a step's command text (SQL, PowerShell, or CmdExec) as a MAconst:Name token -- the same bare-prefix token family as the alert-message MA:xxx tokens.

Status: v1, scalar only. No table/recipe values yet, no step can write a constant's value.

What it's for

A value that's genuinely a policy/config fact -- not something a script can just compute -- that you don't want copy-pasted into every job that needs it: CompanyName, BackupRootPath, SupportEmail, a shared retention-days number, a feature-flag boolean. Change it in one place (Admin -> Constants) instead of every step that references it.

Using one

  1. Admin -> Constants: add a constant -- Name, Type (String/Integer/Decimal/Boolean), Value, optional Description, and Fleet-wide vs. Local.
  2. Reference it anywhere in a step's command text as MAconst:Name (case-insensitive).
  3. Worker substitutes it with the constant's literal value right before the step runs, for every step type -- not just SQL.

A name with no matching constant is left as literal, unreplaced text in the command -- a typo'd or deleted MAconst:Name should be visibly wrong, not silently vanish.

Special characters are escaped per step type

  • T-SQL -- an embedded ' is doubled (''), standard T-SQL escaping.
  • PowerShell -- assumes double-quoted usage. Backtick, $, and " are escaped so an embedded one doesn't get interpreted as PowerShell's own escape character, variable interpolation, or an early string close.
  • CmdExec -- assumes unquoted, bare usage. & | < > ( ) ^ are caret-escaped. An embedded " or a %NAME%-shaped pair aren't fully covered yet -- avoid both in a constant referenced from a CmdExec step for now.

Fleet-wide vs. Local

Fleet-wide is meant to hold the same value on every node once Fleet Job Sync's still-unbuilt push mechanism exists -- today, with one shared database, there's no behavioral difference yet; the flag just marks intent so nothing needs a later migration. Local is for a value that should never propagate even once that exists.

See also: Glossary for related terms.