You are viewing documentation about an older version (0.1.3). View latest version

snowflake.core.warehouse.WarehouseCollection

class snowflake.core.warehouse.WarehouseCollection(root: Root)

Bases: AccountObjectCollectionParent[WarehouseResource]

Represents the collection operations of the Snowflake Warehouse resource.

Attributes

root

Methods

__init__(root: Root) None
create(warehouse: Warehouse, *, mode: Literal['errorifexists'] | Literal['orreplace'] | Literal['ifnotexists', 'ifexists'] | None = None) WarehouseResource

Create a warehouse in Snowflake.

Parameters:
  • warehouse – an instance of Warehouse.

  • mode

    One of the following strings.

    errorifexists: Throw an snowflake.core.exceptions.ConflictError if the warehouse already exists in Snowflake. Equivalent to SQL create warehouse <name> ....

    ”orreplace”: Replace if the warehouse already exists in Snowflake. Equivalent to SQL create or replace warehouse <name> ....

    ”ifnotexists”: Do nothing if the warehouse already exists in Snowflake. Equivalent to SQL create warehouse <name> if not exists...

    ”ifexists”: Do nothing if the warehouse doesn’t exist in Snowflake. Equivalent to SQL alter warehouse if exists <name> ...

    Default value is None.

create_or_update(warehouse: Warehouse) WarehouseResource

Create or alter a warehouse in Snowflake.

items() ItemsView[str, T]
iter(*, like: str | None = None) PagedIter[Warehouse]

Look up warehouses in Snowflake.

keys() KeysView[str]
values() ValuesView[T]