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)

A reference to a specific Task resource in Snowflake.

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