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 |
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 |
|---|---|---|---|
datasetId | integer | Yes | The ID of the created or existing dataset. |
snapshotId | integer | No | The Iceberg snapshot ID of the initial refresh. Present only for newly created views. |
recalculationId | 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 |
|---|---|---|---|
datasetId | integer | No | The ID of the refreshed dataset. |
snapshotId | integer | No | The new Iceberg snapshot ID after the refresh. |
recalculationId | 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 |
|---|---|---|---|
affectedRows | integer | No | The number of rows affected by the DML statement. |
RunModelInference
Task that runs a model inference job. Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
model | enum (anthropic.claude-haiku-4.5, anthropic.claude-sonnet-4.5, anthropic.claude-opus-4.5, openai.gpt-oss-120b, openai.gpt-4.1, openai.o4-mini) | Yes | The narrative model ID to use for inference. |
messages | array | Yes | A list of messages to send to the model. |
inferenceConfig | object | Yes | Configuration for the model inference. |
executionCluster | enum (shared, dedicated) | No | The execution cluster to use for running the task. |
Parameter details
Parameter details
model (required)The narrative model ID to use for inference.- Type: string
- Allowed values:
anthropic.claude-haiku-4.5,anthropic.claude-sonnet-4.5,anthropic.claude-opus-4.5,openai.gpt-oss-120b,openai.gpt-4.1,openai.o4-mini
messages (required)A list of messages to send to the model.- Type: array
inferenceConfig (required)Configuration for the model inference.- Type: object
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 |
|---|---|---|---|
structuredOutput | object | No | The structured output from the model, conforming to the provided outputFormatSchema. |
usage | object | No | Token usage information. |
CreateRosettaStoneMappingsIfNotExist
Task that creates Rosetta Stone attribute mappings for a dataset. 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. |
mappings | array | Yes | A list of mapping definitions to create. |
allowPartial | boolean | No | When true, individual mapping failures don’t prevent other valid mappings from being created. When false, any single failure causes the entire operation to fail. |
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
mappings (required)A list of mapping definitions to create.- Type: array
allowPartial (optional)When true, individual mapping failures don’t prevent other valid
mappings from being created. When false, any single failure causes
the entire operation to fail.- Type: boolean
- Default:
true
| Field | Type | Always present | Description |
|---|---|---|---|
createdMappings | array | Yes | Mappings that were successfully created. |
failedMappings | array | Yes | Mappings that failed to create. |
conflictMappings | array | Yes | Mappings skipped because an identical mapping already exists. |
Related content
Workflow Specification Syntax
Full specification format for document, schedule, and task blocks
Automating Multi-Step Pipelines
Step-by-step guide to creating and running workflows
Materialized Views
How materialized views work
Workflows API
REST API endpoints for managing workflows

