snowflake.core.task.TaskRun | Snowflake Documentation (original) (raw)

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:

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

classmethod from_dict(obj: dict) → TaskRun

Create an instance of TaskRun from a dict.

classmethod from_json(json_str: str) → TaskRun

Create an instance of TaskRun from a JSON string.

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.