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
- 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 SQLcreate 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] ¶
- keys() KeysView[str] ¶
- values() ValuesView[T] ¶