Parameter Hierarchy
Parameters are a core building block of hibase workflows. They let you inject dynamic values into your data source queries, making your pipelines flexible, automated, and reusable.
What Are Parameters
A parameters set is a JSON object that is made available to your data source query, so you can inject values into it before it gets executed.
For example, you might define the following parameters within one of your steps:
{
"date_start": "{{ $today - 7 }}",
"date_end": "{{ $today }}"
}
...and reference them in an SQL query:
SELECT *
FROM my_table
WHERE timestamp >= {{ $date_start }}
AND timestamp <= {{ $date_end }}
The parameter values are injected into the query before execution. In this example, the resulting query selects only records from the past seven days.
Parameters are referenced by name, prefixed with $.
Where Parameters Are Defined
Parameters can be set at different levels, each with its own priority:
| Level | Priority | Where to set it |
|---|---|---|
| Default Params | 4 (lowest) | Automatic — always available |
| Workflow Params | 3 | Workflow properties → Workflow parameters |
| Step JSON Params | 2 | Step → Enable JSON Params |
| Step Query Params | 1 (highest) | Step → Enable Params from SQL Query |
Each level can reference parameters from all previous (lower-priority) levels. Later levels override earlier ones when keys conflict.
Execution Order
Parameters are resolved sequentially, from broadest to most specific:
- Default Params are always available
- Workflow Params are calculated once when the workflow starts
- Step JSON Params are evaluated when each step begins (can reference workflow params)
- Step Query Params run an SQL query whose result columns become parameters (can reference all of the above)
This access matrix shows which levels can reference which:
| Level | Default | Workflow | Step JSON | Step Query |
|---|---|---|---|---|
| Default Params | — | No | No | No |
| Workflow Params | Yes | — | No | No |
| Step JSON Params | Yes | Yes | — | No |
| Step Query Params | Yes | Yes | Yes | — |
How Overrides Work
When the same key appears at multiple levels, higher-priority levels win. For example:
Workflow params:
{
"key1": "workflow value 1",
"key2": "workflow value 2"
}
Step JSON params:
{
"key1": "step value 1"
}
Final parameters set:
{
"key1": "step value 1",
"key2": "workflow value 2"
}
The step took precedence for key1 (conflicting key), while key2 was inherited unchanged from the workflow level.
Workflow Params vs Step Params
The difference between workflow and step parameters is not only in their priority — they also differ in scope and timing:
Workflow parameters are calculated once when the entire workflow starts, and passed to every step without ever being recalculated. Step parameters are calculated when each step starts and are never passed to other steps.
This matters when working with timestamps. Defining a param as {{ $now }} in your Workflow params ensures all steps get the same timestamp. Defining it in Step params recalculates it for each step, resulting in different values.
Rule of thumb: If a parameter value must be consistent across all steps, define it at the workflow level.
Referencing Params Within Params
Because parameters are resolved sequentially, higher-priority levels can reference values from lower-priority levels.
For example, if your Workflow params define:
{
"category_id": 42
}
... your Step Query params can use this value:
SELECT max(created_at) AS last_created
FROM products
WHERE category_id = {{ $category_id }}
This correctly evaluates to WHERE category_id = 42, because category_id was resolved at the workflow level before the step query runs.
Default Parameters
The following parameters are always available without any configuration:
{
"step_target": {
"column_names": ["col1", "col2", "..."]
}
}
The step_target.column_names array contains the ordered list of column names of the target table configured in the step.
In addition, all built-in variables from the hibase templating language (like $today, $now, etc.) are available.
Step-Level Toggles
Within each step, three toggles control how step-level parameters are configured:
Enable JSON Params — Opens a JSON editor for static or dynamic key-value pairs. Supports hibase templating expressions.
Enable Params from SQL Query — Attaches a parameter query that runs before the main data source query. See Parameter Queries for details.
Enable Params Iteration — When enabled, the main query runs once per row returned by the parameter query (or per element in a JSON array). See Parameter Queries for details on iteration.