Specification structure
Document fields
Thedocument block defines workflow metadata.
| Field | Type | Required | Description |
|---|---|---|---|
dsl | string | Yes | DSL version. Use '1.0.0' |
namespace | string | Yes | Logical grouping for the workflow (e.g., analytics, etl) |
name | string | Yes | Unique identifier for the workflow within its namespace |
version | string | Yes | Version string for tracking changes (e.g., '1.0.0') |
Schedule
The optionalschedule block configures automatic execution.
| Field | Type | Required | Description |
|---|---|---|---|
cron | string | Yes (within schedule) | CRON expression defining when the workflow runs |
| Expression | Schedule |
|---|---|
0 * * * * | Every hour |
0 0 * * * | Daily at midnight UTC |
0 0 * * 0 | Weekly on Sunday at midnight UTC |
0 0 1 * * | Monthly on the 1st at midnight UTC |
15 15 * * 1 | Every Monday at 3:15 PM UTC |
0 2 1 * * | 1st of each month at 2:00 AM UTC |
Schedules are activated separately from workflow creation. Use the Schedule a workflow endpoint or set
schedule_immediately: true when creating the workflow.Task structure
Thedo block contains an ordered list of tasks. Each task is a YAML mapping with a unique name as the key.
| Field | Type | Required | Description |
|---|---|---|---|
call | string | Yes | The task to execute. Must be one of the supported tasks |
with | object | Yes | Parameters for the task. Fields vary by task |
export | object | No | Controls how task output is merged into the workflow context. See Export |
Task output
Every task produces a JSON object after execution. The output fields use snake_case names and vary by task — see the Task Reference for per-task output schemas. Within anexport.as expression, . (dot) refers to the current task’s output. In ${…} variable expressions in the next task’s parameters, . also refers to the immediately preceding task’s output.
Export
The optionalexport block controls how a task’s output is merged into the workflow context — an object ($context) that accumulates data as the workflow runs. The context starts as an empty object {} and is threaded through every task.
| Field | Type | Description |
|---|---|---|
export.as | string (jq expression) | A jq expression that produces the new value of $context |
export.as:
| Variable | Description |
|---|---|
. | The current task’s output |
$context | The accumulated workflow context before this task |
export is omitted, $context is unchanged.
Examples:
Store the entire task output as context:
Variable expressions
Task parameters support${…} variable expressions that inject values from previous task output or the workflow context. Variable expressions are evaluated before the task executes.
Syntax rules:
| Pattern | Behavior | Example |
|---|---|---|
${<expr>} as the entire value | Preserves the JSON type of the expression result | ${.dataset_id} → integer 42 |
${" ... "} or mixed with text | Result is always a string | ${"Dataset \(.dataset_id) created"} → "Dataset 42 created" |
${…}:
| Variable | Description |
|---|---|
. | The immediately preceding task’s output |
$context | The accumulated workflow context |
\(expr) to embed values inside a string expression:
Supported tasks
The following tasks are available in workflows. See the Task Reference for full parameter details, constraints, and examples.| Task | Description |
|---|---|
CreateMaterializedViewIfNotExists | Task that creates a materialized view if it does not already exist. |
RefreshMaterializedView | Task that triggers a refresh of an existing materialized view. |
ExecuteDml | Task that executes a DML statement on a dataset. |
Complete example
A multi-step workflow that creates two materialized views and refreshes one, running daily:Example with data passing
A workflow that creates a view, captures its dataset ID, and logs the result:createViewcreates a materialized view and exportsdataset_idinto$context.datasetIdlogCreatedDatasetuses.dataset_id(the previous task’s direct output) in a variable expressionlogFromContextuses$context.datasetIdto access the same value via the workflow context

