snowflake.core.task.TaskRunΒΆ
- class snowflake.core.task.TaskRun(*, root_task_name: Annotated[str, Strict(strict=True)], database_name: Annotated[str, Strict(strict=True)], schema_name: Annotated[str, Strict(strict=True)], state: Annotated[str, Strict(strict=True)], first_error_task_name: Annotated[str, Strict(strict=True)] | None = None, first_error_code: Annotated[int, Strict(strict=True)] | None = None, first_error_message: Annotated[str, Strict(strict=True)] | None = None, scheduled_time: datetime, query_start_time: datetime | None = None, next_scheduled_time: datetime, completed_time: datetime | None = None, root_task_id: Annotated[str, Strict(strict=True)], graph_version: Annotated[int, Strict(strict=True)], run_id: Annotated[int, Strict(strict=True)])ΒΆ
Bases:
BaseModel
A model object representing the TaskRun resource.
Constructs an object of type TaskRun with the provided properties.
- Parameters:
root_task_name (str) β The name of the root task in the current task run.
database_name (str) β The name of the current database for the task run.
schema_name (str) β The name of the current schema for the task run.
state (str) β The current state of the task run.
scheduled_time (datetime) β The scheduled time for the task run.
next_scheduled_time (datetime) β The next upcoming time for the task run.
root_task_id (str) β The unique task ID for the root task.
graph_version (int) β The current version of the DAG on the task run.
run_id (int) β The unique ID for the current task run.
first_error_task_name (str, optional) β The name of the first task throwing an error in the task run.
first_error_code (int, optional) β The first error code thrown in the task run.
first_error_message (str, optional) β The first error message thrown in the task run.
query_start_time (datetime, optional) β The start time for the task run query.
completed_time (datetime, optional) β The time this task run was last completed.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
Methods
- to_dict(hide_readonly_properties: bool = False) Dict[str, Any] ΒΆ
Returns the dictionary representation of the model using alias.
- to_dict_without_readonly_properties() Dict[str, Any] ΒΆ
Return the dictionary representation of the model without readonly properties.
- to_json() str ΒΆ
Returns the JSON representation of the model using alias.
- to_str() str ΒΆ
Returns the string representation of the model using alias.