ALTER TASK GRAPH

statementnot supportedUDFs, procedures, tasks, alerts, scriptingpreview

docs.snowflake.com ↗

Object: TASK GRAPH

Modifies the properties, member defaults, or lifecycle state of an existing Task Graph Object. This command supports the following variants: - ALTER TASK GRAPH … SET / UNSET: Sets or unsets graph-wide properties, member defaults, the graph’s WHEN condition, tags, or contacts. - ALTER TASK GRAPH … COMMIT: Freezes staged changes into a new committed version. - ALTER TASK GRAPH … REVERT: Discards staged changes. - ALTER TASK GRAPH … RESUME: Starts running the graph on its schedule. - ALTER TASK GRAPH … SUSPEND: Stops scheduling new runs.

Syntax

supportedpartialnot supportednot scored

ALTER TASK GRAPH [ IF EXISTS ] <name> SET
  <property> = <value> [ , <property> = <value> ... ]

ALTER TASK GRAPH [ IF EXISTS ] <name> UNSET
  <property> [ , <property> ... ]

ALTER TASK GRAPH [ IF EXISTS ] <name> SET TASK_DEFAULTS (
  <default_property> = <value> [ , <default_property> = <value> ... ] )

ALTER TASK GRAPH [ IF EXISTS ] <name> UNSET TASK_DEFAULTS (
  <default_property> [ , <default_property> ... ] )

ALTER TASK GRAPH [ IF EXISTS ] <name> MODIFY WHEN <boolean_expr>

ALTER TASK GRAPH [ IF EXISTS ] <name> REMOVE WHEN

ALTER TASK GRAPH [ IF EXISTS ] <name> SET TAG <tag_name> = '<tag_value>' [ , <tag_name> = '<tag_value>' ... ]

ALTER TASK GRAPH [ IF EXISTS ] <name> UNSET TAG <tag_name> [ , <tag_name> ... ]

ALTER TASK GRAPH [ IF EXISTS ] <name> SET CONTACT <purpose> = <contact_name> [ , <purpose> = <contact_name> ... ]

ALTER TASK GRAPH [ IF EXISTS ] <name> UNSET CONTACT <purpose> [ , <purpose> ... ]

SET TASK_DEFAULTS performs a merge, not a replace — it changes only the properties you name, leaving the rest of the set untouched. To remove a default, use UNSET TASK_DEFAULTS ( <property> ). An unqualified UNSET TASK_DEFAULTS (with no property list) is not supported.

ALTER TASK GRAPH [ IF EXISTS ] <name> COMMIT

Validates the graph and freezes the current shape and settings into a new committed version. The next run uses the new version. COMMIT does not start the schedule and has no SCHEDULE or WHEN requirement.

ALTER TASK GRAPH [ IF EXISTS ] <name> REVERT

Discards all staged (uncommitted) changes to the graph and its member tasks, restoring them to the most recently committed version. Member tasks that were newly added but never committed are disconnected from the graph rather than dropped. REVERT returns an error if the graph has never been committed.

ALTER TASK GRAPH [ IF EXISTS ] <name> RESUME

If you want a graph that never runs on its own and only runs when you trigger it manually with EXECUTE TASK GRAPH, omit both SCHEDULE and WHEN: you can still COMMIT it and run it on demand. To avoid unintended scheduling, don’t call RESUME.

ALTER TASK GRAPH [ IF EXISTS ] <name> SUSPEND

Usage notes

See also

Referenced by