snowflake.core.schema.SchemaΒΆ
- class snowflake.core.schema.Schema(name: str, created_on: datetime | None = None, kind: str | None = 'PERMANENT', is_default: bool | None = None, is_current: bool | None = None, database_name: str | None = None, owner: str | None = None, comment: str | None = None, options: str | None = None, managed_access: bool | None = False, retention_time: int | None = None, dropped_on: datetime | None = None, owner_role_type: str | None = None, budget: str | None = None, data_retention_time_in_days: int | None = None, default_ddl_collation: str | None = None, log_level: str | None = None, pipe_execution_paused: bool | None = None, max_data_extension_time_in_days: int | None = None, suspend_task_after_num_failures: int | None = None, trace_level: str | None = None, user_task_managed_initial_warehouse_size: str | None = None, user_task_timeout_ms: int | None = None)ΒΆ
Bases:
object
A model object representing the ModelSchema resource.
Constructs an object of type ModelSchema with the provided properties.
- Parameters:
name (str) β A Snowflake object identifier.
created_on (datetime, optional) β Date and time the schema was created.
kind (str, default 'PERMANENT') β Schema type, permanent (default) or transient.
is_default (bool, optional) β Default schema for a user.
is_current (bool, optional) β Current schema for the session.
database_name (str, optional) β Database that the schema belongs to
owner (str, optional) β Name of the role that owns the schema.
comment (str, optional) β Optional comment in which to store information related to the schema.
options (str, optional)
managed_access (bool, default False) β Whether this schema is a managed access schema that centralizes privilege management with the schema owner.
retention_time (int, optional) β Number of days that historical data is retained for Time Travel.
dropped_on (datetime, optional) β Date and time the schema was dropped.
owner_role_type (str, optional) β Type of role that owns the object, either ROLE or DATABASE_ROLE.
budget (str, optional) β Budget that defines a monthly spending limit on the compute costs for a Snowflake account or a custom group of Snowflake objects.
data_retention_time_in_days (int, optional) β Number of days for which Time Travel actions (CLONE and UNDROP) can be performed on the schema, as well as specifying the default Time Travel retention time for all tables created in the schema
default_ddl_collation (str, optional) β Specifies a default collation specification for all tables added to the schema. You an override the default at the schema and individual table levels.
log_level (str, optional) β Severity level of messages that should be ingested and made available in the active event table. Currently, Snowflake supports only TRACE, DEBUG, INFO, WARN, ERROR, FATAL and OFF.
pipe_execution_paused (bool, optional) β Whether pipe execution is paused.
max_data_extension_time_in_days (int, optional) β Maximum number of days for which Snowflake can extend the data retention period for tables in the schema to prevent streams on the tables from becoming stale.
suspend_task_after_num_failures (int, optional) β Specifies the number of consecutive failed task runs after which the current task is suspended automatically.
trace_level (str, optional) β How trace events are ingested into the event table. Currently, Snowflake supports only ALWAYS, ON_EVENT, and OFF.
user_task_managed_initial_warehouse_size (str, optional) β Size of the compute resources to provision for the first run of the task, before a task history is available for Snowflake to determine an ideal size.
user_task_timeout_ms (int, optional) β Time limit, in milliseconds, for a single run of the task before it times out.
Methods
- classmethod from_dict(obj: dict) ModelSchemaModel ΒΆ
Creates an instance of ModelSchema from a dict.
This method constructs a ModelSchema object from a dictionary with the key-value pairs of its properties.
- Parameters:
obj (dict) β A dictionary whose keys and values correspond to the properties of the resource object.
- Returns:
A ModelSchema object created using the input dictionary; this will fail if the required properties are missing.
- Return type:
ModelSchema
- to_dict()ΒΆ
Creates a dictionary of the properties from a ModelSchema.
This method constructs a dictionary with the key-value entries corresponding to the properties of the ModelSchema object.
- Returns:
A dictionary object created using the input model.
- Return type:
dict