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

snowflake.core.schema.SchemaCollection

class snowflake.core.schema.SchemaCollection(database: DatabaseResource)

Bases: ObjectCollection[SchemaResource]

Attributes

root

Methods

__init__(database: DatabaseResource) None
create(schema: ModelSchema, *, clone: Clone | None = None, mode: Literal['errorifexists'] | Literal['orreplace'] | Literal['ifnotexists'] = 'errorifexists', kind: str = '') SchemaResource

Create a schema in Snowflake.

Parameters:
  • schema – an instance of Schema.

  • mode – One of the following strings. errorifexists: Throw an snowflake.core.exceptions.ConflictError if the schem already exists in Snowflake. Equivalent to SQL create schema <name> .... “orreplace”: Replace if the schema already exists in Snowflake. Equivalent to SQL create or replace schema <name> .... “ifnotexists”: Do nothing if the schema already exists in Snowflake. Equivalent to SQL create schema <name> if not exists... Default value is “errorifexists”.

items() ItemsView[str, T]
iter(*, like: str | None = None, startswith: str | None = None, limit: int | None = None, from_name: str | None = None) PagedIter[ModelSchema]

Look up schemas in Snowflake.

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