snowflake.core.taskΒΆ

Manages Snowflake Tasks.

Example

>>> tasks: TaskCollection = root.databases["mydb"].schemas["myschema"].tasks
>>> mytask = tasks.create(Task("mytask", definition="select 1"))
>>> task_iter = tasks.iter(like="my%")
>>> mytask = tasks["mytask"]
>>> # Then call other APIs to manage this task.
>>> mytask.resume()
>>> mytask.suspend()
>>> an_existing_task = tasks["an_existing_task"]
>>> an_existing_task.suspend()
Copy

Refer to snowflake.core.Root to create the root.

Classes

Cron(expr, timezone)

Specifies a cron expression and time zone for periodically running the task.

StoredProcedureCall(func, *[, args, ...])

Represents a procedure call used as a task's definition.

Task(name, definition, *[, warehouse, ...])

Represents a Snowflake Task.

TaskCollection(schema)

Represents the collection operations of the Snowflake Task resource.

TaskResource(name, collection)

Represents a reference to a Snowflake Task resource.

TaskRun(*, root_task_name, database_name, ...)

A model object representing the TaskRun resource.