current_graphs
Creates, updates, deletes, gets or lists a current_graphs
resource.
Overview
Name | current_graphs |
Type | Resource |
Id | snowflake.task.current_graphs |
Fields
The following fields are returned by SELECT
queries:
- get_current_graphs_deprecated
- get_current_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_current_graphs_deprecated | select | database_name , schema_name , name , endpoint | resultLimit | This function returns details for graph runs that are currently executing or are next scheduled to run within the next 8 days. |
get_current_graphs | select | database_name , schema_name , name , endpoint | resultLimit | This function returns details for graph runs that are currently executing or are next scheduled to run within the next 8 days. |
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. |
resultLimit | integer |
SELECT
examples
- get_current_graphs_deprecated
- get_current_graphs
This function returns details for graph runs that are currently executing or are next scheduled to run within the next 8 days.
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.current_graphs
WHERE database_name = '{{ database_name }}' -- required
AND schema_name = '{{ schema_name }}' -- required
AND name = '{{ name }}' -- required
AND endpoint = '{{ endpoint }}' -- required
AND resultLimit = '{{ resultLimit }}';
This function returns details for graph runs that are currently executing or are next scheduled to run within the next 8 days.
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.current_graphs
WHERE database_name = '{{ database_name }}' -- required
AND schema_name = '{{ schema_name }}' -- required
AND name = '{{ name }}' -- required
AND endpoint = '{{ endpoint }}' -- required
AND resultLimit = '{{ resultLimit }}';