complete_graphs
Creates, updates, deletes, gets or lists a complete_graphs
resource.
Overview
Name | complete_graphs |
Type | Resource |
Id | snowflake.task.complete_graphs |
Fields
The following fields are returned by SELECT
queries:
- get_complete_graphs_deprecated
- get_complete_graphs
A task run executing a standalone task or a DAG of tasks starting from the root task.
Name | Datatype | Description |
---|---|---|
root_task_id | string | The unique task ID for the root task. |
run_id | integer | The unique ID for the current task run. |
database_name | string | The name of the current database for the task run. |
first_error_task_name | string | The name of the first task throwing an error in the task run. |
root_task_name | string | The name of the root task in the current task run. |
schema_name | string | The name of the current schema for the task run. |
completed_time | string (date-time) | The time this task run was last completed. |
first_error_code | integer | The first error code thrown in the task run. |
first_error_message | string | The first error message thrown in the task run. |
graph_version | integer | The current version of the DAG on the task run. |
next_scheduled_time | string (date-time) | The next upcoming time for the task run. |
query_start_time | string (date-time) | The start time for the task run query. |
scheduled_time | string (date-time) | The scheduled time for the task run. |
state | string | The current state of the task run. |
A task run executing a standalone task or a DAG of tasks starting from the root task.
Name | Datatype | Description |
---|---|---|
root_task_id | string | The unique task ID for the root task. |
run_id | integer | The unique ID for the current task run. |
database_name | string | The name of the current database for the task run. |
first_error_task_name | string | The name of the first task throwing an error in the task run. |
root_task_name | string | The name of the root task in the current task run. |
schema_name | string | The name of the current schema for the task run. |
completed_time | string (date-time) | The time this task run was last completed. |
first_error_code | integer | The first error code thrown in the task run. |
first_error_message | string | The first error message thrown in the task run. |
graph_version | integer | The current version of the DAG on the task run. |
next_scheduled_time | string (date-time) | The next upcoming time for the task run. |
query_start_time | string (date-time) | The start time for the task run query. |
scheduled_time | string (date-time) | The scheduled time for the task run. |
state | string | The current state of the task run. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get_complete_graphs_deprecated | select | database_name , schema_name , name , endpoint | resultLimit , errorOnly | This function returns details for graph runs that are completed. |
get_complete_graphs | select | database_name , schema_name , name , endpoint | resultLimit , errorOnly | This function returns details for graph runs that are completed. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
database_name | string | Identifier (i.e. name) for the database to which the resource belongs. You can use the /api/v2/databases GET request to get a list of available databases. |
endpoint | string | Organization and Account Name (default: orgid-acctid) |
name | string | Identifier (i.e. name) for the resource. |
schema_name | string | Identifier (i.e. name) for the schema to which the resource belongs. You can use the /api/v2/databases/{database}/schemas GET request to get a list of available schemas for the specified database. |
errorOnly | boolean | Whether to only return results for tasks runs that have failed. Default is false. |
resultLimit | integer | Number of results to return, at most. Default is 1000, valid range is 1 to 10000. |
SELECT
examples
- get_complete_graphs_deprecated
- get_complete_graphs
This function returns details for graph runs that are completed.
SELECT
root_task_id,
run_id,
database_name,
first_error_task_name,
root_task_name,
schema_name,
completed_time,
first_error_code,
first_error_message,
graph_version,
next_scheduled_time,
query_start_time,
scheduled_time,
state
FROM snowflake.task.complete_graphs
WHERE database_name = '{{ database_name }}' -- required
AND schema_name = '{{ schema_name }}' -- required
AND name = '{{ name }}' -- required
AND endpoint = '{{ endpoint }}' -- required
AND resultLimit = '{{ resultLimit }}'
AND errorOnly = '{{ errorOnly }}';
This function returns details for graph runs that are completed.
SELECT
root_task_id,
run_id,
database_name,
first_error_task_name,
root_task_name,
schema_name,
completed_time,
first_error_code,
first_error_message,
graph_version,
next_scheduled_time,
query_start_time,
scheduled_time,
state
FROM snowflake.task.complete_graphs
WHERE database_name = '{{ database_name }}' -- required
AND schema_name = '{{ schema_name }}' -- required
AND name = '{{ name }}' -- required
AND endpoint = '{{ endpoint }}' -- required
AND resultLimit = '{{ resultLimit }}'
AND errorOnly = '{{ errorOnly }}';