Skip to main content
Each task in a workflow’s 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:
ParameterTypeRequiredDescription
nqlstringYesAn NQL query string
executionClusterenum (shared, dedicated)NoThe execution cluster to use for running the task.
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
Output:
FieldTypeAlways presentDescription
datasetIdintegerYesThe ID of the created or existing dataset.
snapshotIdintegerNoThe Iceberg snapshot ID of the initial refresh. Present only for newly created views.
recalculationIdstring or nullNoThe recalculation ID, if applicable. Present only for newly created views.
Example:
document:
  dsl: '1.0.0'
  namespace: example
  name: create-materialized-view-if-not-exists-example
  version: '1.0.0'
do:
  - createMaterializedViewIfNotExists:
      call: CreateMaterializedViewIfNotExists
      with:
        nql: SELECT id, name FROM company_data.my_table WHERE status = 'active'

RefreshMaterializedView

Task that triggers a refresh of an existing materialized view. Parameters:
ParameterTypeRequiredDescription
datasetNamestringYesThe name of a dataset. Must contain only alphanumeric characters and underscores, with a maximum length of 256 characters.
executionClusterenum (shared, dedicated)NoThe execution cluster to use for running the task.
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
Output:
FieldTypeAlways presentDescription
datasetIdintegerNoThe ID of the refreshed dataset.
snapshotIdintegerNoThe new Iceberg snapshot ID after the refresh.
recalculationIdstring or nullNoThe recalculation ID, if applicable.
Example:
document:
  dsl: '1.0.0'
  namespace: example
  name: refresh-materialized-view-example
  version: '1.0.0'
do:
  - refreshMaterializedView:
      call: RefreshMaterializedView
      with:
        datasetName: my_materialized_view

ExecuteDml

Task that executes a DML statement on a dataset. Parameters:
ParameterTypeRequiredDescription
nqlstringYesAn NQL query string
executionClusterenum (shared, dedicated)NoThe execution cluster to use for running the task.
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
Output:
FieldTypeAlways presentDescription
affectedRowsintegerNoThe number of rows affected by the DML statement.
Example:
document:
  dsl: '1.0.0'
  namespace: example
  name: execute-dml-example
  version: '1.0.0'
do:
  - executeDml:
      call: ExecuteDml
      with:
        nql: SELECT id, name FROM company_data.my_table WHERE status = 'active'

RunModelInference

Task that runs a model inference job. Parameters:
ParameterTypeRequiredDescription
modelenum (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)YesThe narrative model ID to use for inference.
messagesarrayYesA list of messages to send to the model.
inferenceConfigobjectYesConfiguration for the model inference.
executionClusterenum (shared, dedicated)NoThe execution cluster to use for running the task.
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
Output:
FieldTypeAlways presentDescription
structuredOutputobjectNoThe structured output from the model, conforming to the provided outputFormatSchema.
usageobjectNoToken usage information.
Example:
document:
  dsl: '1.0.0'
  namespace: example
  name: run-model-inference-example
  version: '1.0.0'
do:
  - runModelInference:
      call: RunModelInference
      with:
        model: anthropic.claude-haiku-4.5
        messages: <messages>
        inferenceConfig: <inferenceConfig>

CreateRosettaStoneMappingsIfNotExist

Task that creates Rosetta Stone attribute mappings for a dataset. Parameters:
ParameterTypeRequiredDescription
datasetNamestringYesThe name of a dataset. Must contain only alphanumeric characters and underscores, with a maximum length of 256 characters.
mappingsarrayYesA list of mapping definitions to create.
allowPartialbooleanNoWhen true, individual mapping failures don’t prevent other valid mappings from being created. When false, any single failure causes the entire operation to fail.
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
Output:
FieldTypeAlways presentDescription
createdMappingsarrayYesMappings that were successfully created.
failedMappingsarrayYesMappings that failed to create.
conflictMappingsarrayYesMappings skipped because an identical mapping already exists.
Example:
document:
  dsl: '1.0.0'
  namespace: example
  name: create-rosetta-stone-mappings-if-not-exist-example
  version: '1.0.0'
do:
  - createRosettaStoneMappingsIfNotExist:
      call: CreateRosettaStoneMappingsIfNotExist
      with:
        datasetName: my_materialized_view
        mappings: <mappings>

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