> ## Documentation Index
> Fetch the complete documentation index at: https://docs.e6data.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Parameters and query context

> Keep one workflow definition and supply different typed values for each run. Set the initial catalog, namespace, SQL time zone, and name rules once for all tasks.

How-to guideApplies to: Unified engine deployments

Keep one workflow definition and supply different typed values for each run. Set the initial catalog, namespace, SQL time zone, and name rules once for all tasks.

## 1. Run a parameterized example

This example uses the same six orders. The default region is North and the minimum amount is zero.

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "name": "Learn - parameterized orders",
  "tasks": [
    {
      "name": "summarize",
      "sql": "WITH orders(id, category, region, amount) AS (\n  VALUES\n    (1, 'Books', 'North', 20),\n    (2, 'Games', 'South', 30),\n    (3, 'Games', 'North', 15),\n    (4, 'Books', 'North', 40),\n    (5, 'Garden', 'South', 25),\n    (6, 'Garden', 'North', 10)\n)\nSELECT category, SUM(amount) AS sales\nFROM orders\nWHERE region = :region AND amount >= :minimum_amount\nGROUP BY category\nORDER BY category;",
      "settings": {
        "current_catalog": "default",
        "namespace": [
          "default"
        ],
        "time_zone": "UTC",
        "case_sensitive": false,
        "ansi_enabled": true
      }
    }
  ],
  "dependencies": [],
  "options": {
    "execution_target": "DuckDb"
  },
  "policy": "Manual",
  "parameters": {
    "region": {
      "type": "string",
      "required": true,
      "default": "North",
      "enum": [
        "North",
        "South"
      ]
    },
    "minimum_amount": {
      "type": "integer",
      "required": true,
      "default": 0
    }
  }
}
```

Validate, save as Manual, and start a run. Review the parameter dialog before submitting. Expect:

| category | sales |
| - | -: |
| Books | 60 |
| Games | 15 |
| Garden | 10 |

Start a second run with `region = South` and `minimum_amount = 25`. Expect Games 30 and Garden 25. Run overrides do not change saved defaults.

## Choose types and presence rules

| Type | JSON example |
| - | - |
| `string` | `"North"` |
| `integer` | `25` |
| `decimal` | `"12.50"` |
| `boolean` | `true` |
| `date` | `"2026-01-01"` |
| `timestamp` | `"2026-01-01T09:00:00Z"` |
| `string_array` | `["Books", "Games"]` |

A required parameter needs a supplied value or a default. A nullable parameter permits explicit `null`. An omitted value and an explicit null are different inputs. An optional parameter without a default must permit its null result.

Use `enum` to restrict accepted values. For a string array, allowed values restrict its elements. Scheduled runs have no prompt, so their required parameters need defaults.

Decimals use JSON strings to preserve precision. Integers must fit signed 64-bit values; send values beyond JavaScript's safe integer range as strings. Decimal precision is at most 38 digits.

## Bind values in SQL

Write `region = :region`, without quotes around the binding. Parameters supply values, not table names, column names, or SQL fragments. Names starting with `__` are reserved.

| Built-in binding | Meaning |
| - | - |
| `:__run_id` | This run's ID. |
| `:__scheduled_at` | The recorded scheduled timestamp. |
| `:__trigger_type` | `manual` or `scheduled`. |
| `:__window_start` | Inclusive window start, when a data window is present. |
| `:__window_end` | Exclusive window end, when a data window is present. |

A delayed run keeps its logical scheduled timestamp. Use the window bindings to filter the intended period; see [Data windows](https://docs.e6data.com/transformation/workloads/data-windows.md). Incremental workloads have separate parameter restrictions; see [Incremental workloads](https://docs.e6data.com/transformation/workloads/incremental.md).

## Set query context

In workload details, set the shared catalog, namespace, time zone, case sensitivity, and ANSI checks. Apply the same initial settings to every task. Fully qualified table names reduce ambiguity when reading and writing across namespaces.

The SQL time zone affects timestamp interpretation. The schedule time zone chooses cron boundaries. They are separate settings. Use UTC for the examples unless a lesson says otherwise.

Worker reuse does not make session changes a reliable shared context. Save the intended initial settings on the workload. Use explicit `SET` or `USE` tasks for supported session changes within a run and connect their ordering deliberately.

## Inspect effective values

Open the run's recorded invocation to compare supplied values, resolved defaults, revision, and timestamps. The current editor can show a newer revision. Preserve the original submission identity when recovering a lost response; see [Definition and API reference](https://docs.e6data.com/transformation/workloads/reference.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.