TASK_DEPENDENTS

functionsupportedUDFs, procedures, tasks, alerts, scripting

docs.snowflake.com ↗

Information SchemaTable functions

This table function returns the list of child tasks for a given root task in a task graph.

Syntax

supportedpartialnot supportednot scored

TASK_DEPENDENTS(
      TASK_NAME => '<string>'
      [, RECURSIVE => <Boolean> ] )

Parameters

NameRequiredDescription
TASK_NAME => 'string'requiredA string specifying a task. The function returns the specified root task as the first entry, followed by the list of child tasks. Note that the entire name must be enclosed in single quotes, including the database and schema (if the name is fully-qualified), i.e. '<db>.<schema>.<task_name>'. If the task name is case-sensitive or includes any special characters or spaces, double quotes are required to process the case/characters. The double quotes must be enclosed within the single quotes, i.e. '"<task_name>"'.
RECURSIVE => BooleanrequiredSpecifies whether to limit the output to include only direct child tasks or to include all recursive child tasks. Values: TRUE: Returns all recursive child tasks (children, grandchildren, etc.) in the output. FALSE: Returns only direct child tasks in the output. Default: TRUE.

Usage notes

Output

The function output provides table properties and metadata in the following columns: Column | Description created_on | Date and time when the task was created. name | Name of the task. database_name | Database for the schema for the task. schema_name | Schema for the task. owner | Role that owns the task (i.e. has the OWNERSHIP privilege on the task) comment | Comment for the task. warehouse | Warehouse that provides the required resources to run the task. schedule | Schedule for running the task. Displays NULL if no schedule is specified. predecessors | JSON array of any tasks identified in the AFTER parameter for the task (i.e. predecessor tasks). When run successfully to completion, these tasks trigger the current task. Individual task names in the array are fully-qualified (i.e. include the container database and schema names). Displays an empty array if the task has no predecessor. state | ‘Started’ or ‘Suspended’ based on the current state of the task. definition | SQL statements executed when the task runs. condition | Condition specified in the WHEN clause for the task.