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.