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
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.
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
Output:
FieldTypeAlways presentDescription
dataset_idintegerYesThe ID of the created or existing dataset.
snapshot_idintegerNoThe Iceberg snapshot ID of the initial refresh. Present only for newly created views.
recalculation_idstring 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'
        datasetName: my_materialized_view

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
dataset_idintegerNoThe ID of the refreshed dataset.
snapshot_idintegerNoThe new Iceberg snapshot ID after the refresh.
recalculation_idstring 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
affected_rowsintegerNoThe 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'