snowflake.core.task.TaskΒΆ

class snowflake.core.task.Task(name: str, definition: str | StoredProcedureCall, *, warehouse: str | None = None, user_task_managed_initial_warehouse_size: str | None = None, suspend_task_after_num_failures: int | None = None, user_task_timeout_ms: int | None = None, schedule: Cron | timedelta | None = None, allow_overlapping_execution: bool | None = None, error_integration: str | None = None, comment: str | None = None, finalize: str | None = None, task_auto_retry_attempts: int | None = None, task_relations: str | None = None, predecessors: List[str] | None = None, condition: str | None = None, config: Dict[str, Any] | None = None, session_parameters: Dict[str, Any] | None = None, id: str | None = None, created_on: datetime | None = None, last_committed_on: datetime | None = None, last_suspended_on: datetime | None = None, state: str | None = None, database_name: str | None = None, schema_name: str | None = None, owner: str | None = None, owner_role_type: str | None = None)ΒΆ

Bases: object

Represents a Snowflake Task.

Attributes

sql_definitionΒΆ

The definition of the task in SQL text.

It’s a readonly property. To set the definition of the Task, use definition.

If definition is a StoredProcedureCall, the SQL that calls the stored procedure, or the anonymous stored procedure definition will be returned.