alterTask
Last updated: January 27, 2026
Alters an existing Snowflake task with comprehensive configuration options including comment, schedule, tags, contacts, session parameters, warehouse, execution settings, predecessors, conditional execution, state management, and more.
Note: This change type does not support automatic rollback or database inspection features (snapshot, diff, diff-changelog, and generate-changelog commands).
Available attributes
Name | Type | Description | Required |
|---|---|---|---|
| String | Name of the catalog (database) containing the task | No |
| String | Name of the schema containing the task | No |
| String | Name of the task to alter | Yes |
| Boolean | If true, uses | No |
| String | Notification integration to call when task encounters errors | No |
| String | Notification integration to call when task completes successfully | No |
| Nested | Modify or remove task comment | No |
| Nested | Modify or remove task schedule | No |
| Nested | Add or remove tags | No |
| Nested | Set or unset session parameters | No |
| Nested | Add or remove contacts | No |
| Nested | Modify the SQL statement executed by the task | No |
| Nested | Change warehouse settings | No |
| Nested | Control concurrent execution | No |
| Nested | Suspend or resume task execution | No |
| Nested | Modify task configuration | No |
| Nested | Modify conditional execution | No |
| Nested | Manage task predecessors (dependencies) | No |
| Nested | Change execution context | No |
| Nested | Set or remove finalizer task | No |
| Nested | Set target completion time (serverless tasks) | No |
Nested elements
Each nested element represents a specific alteration operation. Only include the elements for the properties you want to modify.
alterComment - Modify or remove task comment:
Attribute | Type | Description | Required |
|---|---|---|---|
| String | New comment text | No* |
| Boolean | If true, removes the comment | No* |
*Exactly one of newComment or unsetComment must be specified.
alterSchedule - Modify or remove task schedule:
Attribute | Type | Description | Required |
|---|---|---|---|
| String | New schedule (e.g., | No* |
| Boolean | If true, removes the schedule | No* |
*Exactly one of newSchedule or unsetSchedule must be specified.
alterTags - Add or remove tags:
Attribute | Type | Description | Required |
|---|---|---|---|
| MapWrapper | Key-value pairs of tags to set | No* |
| String | Space-separated tag names to unset (e.g., | No* |
*Exactly one of setTags or unsetTags must be specified. Tags must exist before being set.
alterSessionParams - Set or unset session parameters:
Attribute | Type | Description | Required |
|---|---|---|---|
| MapWrapper | Key-value pairs of session parameters (e.g., | No* |
| String | Space-separated parameter names to unset | No* |
*Exactly one of setSessionParams or unsetSessionParams must be specified.
alterContacts - Add or remove contacts:
Attribute | Type | Description | Required |
|---|---|---|---|
| MapWrapper | Key-value pairs mapping contact purposes to contact names | No* |
| String | Space-separated contact purposes to unset | No* |
*Exactly one of setContacts or unsetContacts must be specified. Valid purposes: steward, support, access_approval. Contacts must exist before being set.
alterAsClause - Modify the SQL statement executed by the task:
Attribute | Type | Description | Required |
|---|---|---|---|
| String | New SQL statement | Yes |
alterWarehouse - Change warehouse settings:
Attribute | Type | Description | Required |
|---|---|---|---|
| String | New warehouse name | No* |
| String | Initial warehouse size for serverless tasks | No* |
| Boolean | If true, removes warehouse assignment | No* |
*Exactly one option must be specified.
alterAllowOverlappingExecution - Control concurrent execution:
Attribute | Type | Description | Required |
|---|---|---|---|
| Boolean | If true, allows multiple task instances to run concurrently | No* |
| Boolean | If true, removes this setting | No* |
*Exactly one must be specified.
alterState - Suspend or resume task execution:
Attribute | Type | Description | Required |
|---|---|---|---|
| Boolean | If true, suspends the task | No* |
| Boolean | If true, resumes the task | No* |
*Exactly one of suspend or resume must be true.
alterConfig - Modify task configuration:
Attribute | Type | Description | Required |
|---|---|---|---|
| String | JSON configuration string | No* |
| Boolean | If true, removes configuration | No* |
*Exactly one must be specified.
alterWhenClause - Modify conditional execution:
Attribute | Type | Description | Required |
|---|---|---|---|
| String | SQL condition that must be true for task to execute | No* |
| Boolean | If true, removes the WHEN clause | No* |
*Exactly one must be specified.
alterOrder - Manage task predecessors (dependencies):
Attribute | Type | Description | Required |
|---|---|---|---|
| String | Space-separated names of predecessor tasks to add | No* |
| String | Space-separated names of predecessor tasks to remove | No* |
*At least one must be specified. Predecessor tasks must exist. Root tasks cannot have predecessors.
alterExecuteAsUser - Change execution context:
Attribute | Type | Description | Required |
|---|---|---|---|
| String | User name for task execution context | No* |
| Boolean | If true, removes execute as user setting | No* |
*Exactly one must be specified.
alterFinalize - Set or remove finalizer task:
Attribute | Type | Description | Required |
|---|---|---|---|
| String | Name of finalizer task | No* |
| Boolean | If true, removes finalize setting | No* |
*Exactly one must be specified.
alterTargetCompletionInterval - Set target completion time (serverless tasks):
Attribute | Type | Description | Required |
|---|---|---|---|
| String | Target interval (e.g., | No* |
| Boolean | If true, removes target completion interval | No* |
*Exactly one must be specified.