Skip to main content
Modifies an asynchronous ETL task submitted using SUBMIT TASK. This feature has been supported from v4.1 onwards. You can use this statement to:
  • Suspend a running task
  • Resume a suspended task
  • Update task properties

Syntax

Parameters

Usage notes

  • You can check the information of asynchronous tasks by querying the metadata views tasks and task_runs in Information Schema.
  • The SUSPEND action stops the task scheduler for periodic tasks and kills any currently running task runs. The task state will be changed to PAUSE.
  • The RESUME action restarts the task scheduler for periodic tasks. The task state will be changed to ACTIVE.
  • The SET action updates task properties that will be applied to subsequent task executions. You can use session. prefix with session variables to change the task running connect context configurations.

Examples

Example 1: Suspend a task named etl_task:
Example 2: Resume a suspended task named etl_task:
Example 3: Update the query timeout for a task named etl_task:
Example 4: Update multiple properties for a task:
Example 5: Suspend a task only if it exists (avoid error if task does not exist):