You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en/sql-reference/10-sql-commands/00-ddl/04-task/01-ddl-create_task.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ The CREATE TASK statement is used to define a new task that executes a specified
17
17
CREATE [ OR REPLACE ] TASK [ IF NOT EXISTS ] <name>
18
18
WAREHOUSE =<string>
19
19
SCHEDULE = { <num> MINUTE | <num> SECOND | USING CRON <expr><time_zone> }
20
-
[ AFTER <string> [ , <string> , ... ]]
20
+
[ AFTER <string>
21
21
[ WHEN <boolean_expr> ]
22
22
[ SUSPEND_TASK_AFTER_NUM_FAILURES =<num> ]
23
23
[ ERROR_INTEGRATION =<string> ]
@@ -34,7 +34,7 @@ AS
34
34
| WAREHOUSE | Required. Specifies the virtual warehouse to use for the task. |
35
35
| SCHEDULE | Required. Defines the schedule on which the task will run. Can be specified in minutes or using a CRON expression along with a time zone. |
36
36
| SUSPEND_TASK_AFTER_NUM_FAILURES | Optional. The number of consecutive failures after which the task will be automatically suspended. |
37
-
| AFTER |Lists tasks that must be completed before this task starts. |
37
+
| AFTER |List task that must be completed before this task starts. |
38
38
| WHEN boolean_expr | A condition that must be true for the task to run. |
39
39
|[ERROR_INTEGRATION](../16-notification/index.md)| Optional. The name of the notification integration to use for the task error notification with specific [task error payload ](./10-task-error-integration-payload.md)applied |
40
40
| COMMENT | Optional. A string literal that serves as a comment or description for the task. |
@@ -151,7 +151,7 @@ In this example, a task named `daily_sales_summary` is created with **second-lev
Copy file name to clipboardExpand all lines: docs/en/sql-reference/10-sql-commands/00-ddl/04-task/02-ddl-alter-task.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ ALTER TASK [ IF EXISTS ] <name> SET
29
29
ALTER TASK [ IF EXISTS ] <name> MODIFY AS<sql>
30
30
31
31
--- modify DAG when condition and after condition
32
-
ALTER TASK [ IF EXISTS ] <name> REMOVE AFTER <string>[ , <string> , ... ] | ADD AFTER <string> [ , <string> , ... ]
32
+
ALTER TASK [ IF EXISTS ] <name> REMOVE AFTER <string> | ADD AFTER <string>
33
33
--- allow to change condition for task execution
34
34
ALTER TASK [ IF EXISTS ] <name> MODIFY WHEN <boolean_expr>
35
35
```
@@ -41,8 +41,8 @@ ALTER TASK [ IF EXISTS ] <name> MODIFY WHEN <boolean_expr>
41
41
| RESUME \| SUSPEND | Resume or suspend the task. |
42
42
| SET | Change task settings. details parameter descriptions could be found on see [Create Task](01-ddl-create_task.md). |
43
43
| MODIFY AS | Change task SQL. |
44
-
| REMOVE AFTER | Remove predecessor tasks from the task dag, task would become a standalone task or a root task if no predecessor tasks left. |
45
-
| ADD AFTER | Add predecessor tasks to the task dag. |
44
+
| REMOVE AFTER | Remove predecessor task from the task dag, task would become a standalone task or a root task if no predecessor tasks left. |
45
+
| ADD AFTER | Add predecessor task to the task dag. |
46
46
| MODIFY WHEN | Change the condition for task execution. |
47
47
48
48
## Examples
@@ -72,7 +72,7 @@ ALTER TASK mytaskchild MODIFY WHEN STREAM_STATUS('stream3') = False;
72
72
In this example, we are modifying the mytaskchild task to change its WHEN condition. The task will now only run if the STREAM_STATUS function for 'stream3' evaluates to False. This means the task will execute when 'stream3' does not contain change data.
73
73
74
74
```sql
75
-
ALTER TASK MyTask1 ADD AFTER 'task2', 'task3';
75
+
ALTER TASK MyTask1 ADD AFTER 'task2';
76
76
```
77
77
In this example, we are adding dependencies to the MyTask1 task. It will now run after the successful completion of both 'task2' and 'task3'. This creates a dependency relationship in a Directed Acyclic Graph (DAG) of tasks.
0 commit comments