SnowDDL
Search
K

TASK

Config path: /<database>/<schema>/task/<name>.yaml
Example:
body: |-
CALL test_procedure_1(1)
schedule: 5 MINUTE
warehouse: task_wh
body: |-
CALL test_procedure_1(2)
after:
- test_task_1
warehouse: task_wh

Schema

  • body (str) - SQL statement to be executed by task
  • schedule (str) - schedule for period running tasks
  • after (list)
    • {items} (ident) - one or more predecessor tasks for the current task
  • when (str) - SQL expression returning BOOLEAN
  • warehouse (ident) - warehouse used to execute task
  • user_task_managed_initial_warehouse_size (str) - warehouse size for serverless task execution
  • allow_overlapping_execution (bool) - allow multiple instances of the task tree to run concurrently
  • session_params (dict)
    • {key} (ident) - session parameter name
    • {value} (bool, float, int, str) - session parameter value
  • user_task_timeout_ms (int) - time limit on a single run of the task before it times out
  • comment (str)

Usage notes

  1. 1.
    SnowDDL only creates tasks. Tasks are initially suspended. You should execute ALTER TASK ... RESUME via different means to enable execution.
  2. 2.
    Tasks should be suspended via ALTER TASK ... SUSPEND before they can be altered by SnowDDL. Tasks are not suspended automatically.
  3. 3.
    Task is executed with privileges of task owner, which is schema_owner role. It will have full access to all objects in the same schema, but no access to objects in other schemas. This behaviour may improve in future.
Last modified 1yr ago