do block calls a supported task. This reference documents every available task, its parameters, output schema, and usage examples.
For how tasks fit into the overall workflow specification, see Workflow Specification Syntax.
Supported tasks
CreateMaterializedViewIfNotExists
Task that creates a materialized view if it does not already exist. Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
nql | string | Yes | An NQL query string |
datasetName | string | Yes | The name of a dataset. Must contain only alphanumeric characters and underscores, with a maximum length of 256 characters. |
executionCluster | enum (shared, dedicated) | No | The execution cluster to use for running the task. |
Parameter details
Parameter details
nql (required)An NQL query string- Type: string
- Min length: 1
- Examples:
SELECT id, name FROM company_data.my_table WHERE status = 'active',INSERT INTO company_data.audit_log (action, timestamp) VALUES ('refresh', CURRENT_TIMESTAMP)
datasetName (required)The name of a dataset. Must contain only alphanumeric characters and
underscores, with a maximum length of 256 characters.- Type: string
- Min length: 1
- Max length: 256
- Pattern:
^[a-zA-Z0-9_]+$ - Examples:
my_materialized_view,weekly_events,active_users
executionCluster (optional)The execution cluster to use for running the task.- Type: string
- Allowed values:
shared,dedicated - Default:
shared - Examples:
shared,dedicated
| Field | Type | Always present | Description |
|---|---|---|---|
dataset_id | integer | Yes | The ID of the created or existing dataset. |
snapshot_id | integer | No | The Iceberg snapshot ID of the initial refresh. Present only for newly created views. |
recalculation_id | string or null | No | The recalculation ID, if applicable. Present only for newly created views. |
RefreshMaterializedView
Task that triggers a refresh of an existing materialized view. Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
datasetName | string | Yes | The name of a dataset. Must contain only alphanumeric characters and underscores, with a maximum length of 256 characters. |
executionCluster | enum (shared, dedicated) | No | The execution cluster to use for running the task. |
Parameter details
Parameter details
datasetName (required)The name of a dataset. Must contain only alphanumeric characters and
underscores, with a maximum length of 256 characters.- Type: string
- Min length: 1
- Max length: 256
- Pattern:
^[a-zA-Z0-9_]+$ - Examples:
my_materialized_view,weekly_events,active_users
executionCluster (optional)The execution cluster to use for running the task.- Type: string
- Allowed values:
shared,dedicated - Default:
shared - Examples:
shared,dedicated
| Field | Type | Always present | Description |
|---|---|---|---|
dataset_id | integer | No | The ID of the refreshed dataset. |
snapshot_id | integer | No | The new Iceberg snapshot ID after the refresh. |
recalculation_id | string or null | No | The recalculation ID, if applicable. |
ExecuteDml
Task that executes a DML statement on a dataset. Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
nql | string | Yes | An NQL query string |
executionCluster | enum (shared, dedicated) | No | The execution cluster to use for running the task. |
Parameter details
Parameter details
nql (required)An NQL query string- Type: string
- Min length: 1
- Examples:
SELECT id, name FROM company_data.my_table WHERE status = 'active',INSERT INTO company_data.audit_log (action, timestamp) VALUES ('refresh', CURRENT_TIMESTAMP)
executionCluster (optional)The execution cluster to use for running the task.- Type: string
- Allowed values:
shared,dedicated - Default:
shared - Examples:
shared,dedicated
| Field | Type | Always present | Description |
|---|---|---|---|
affected_rows | integer | No | The number of rows affected by the DML statement. |

