snowflake.core.stream.Stream¶

class snowflake.core.stream.Stream(*, created_on: datetime | None = None, name: Annotated[str, Strict(strict=True)], stream_source: StreamSource, comment: Annotated[str, Strict(strict=True)] | None = None, database_name: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[Strict(strict=True)])] | None = None, schema_name: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[Strict(strict=True)])] | None = None, owner: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[Strict(strict=True)])] | None = None, table_name: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[Strict(strict=True)])] | None = None, stale: Annotated[bool, Strict(strict=True)] | None = None, mode: Annotated[str, Strict(strict=True)] | None = None, stale_after: datetime | None = None, invalid_reason: Annotated[str, Strict(strict=True)] | None = None, owner_role_type: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[Strict(strict=True)])] | None = None, type: Annotated[str, Strict(strict=True)] | None = None)¶

Bases: BaseModel

A model object representing the Stream resource.

Constructs an object of type Stream with the provided properties.

Parameters:
  • name (str) – Name of the stream

  • stream_source (StreamSource)

created_ondatetime, optional

Date and time when the stream was created.

commentstr, optional

user comment associated to an object in the dictionary

database_namestr, optional

Database in which the stream is stored

schema_namestr, optional

Schema in which the stream is stored

ownerstr, optional

Role that owns the stream

table_namestr, optional

Table name whose changes are tracked by the stream

stalebool, optional

Specifies whether the stream is stale or not

modestr, optional

Mode of the stream. Possible values include: APPEND_ONLY, INSERT_ONLY. For streams on tables, the column displays DEFAULT.

stale_afterdatetime, optional

Timestamp when the stream became stale or may become stale if not consumed.

invalid_reasonstr, optional

Reason why the stream cannot be queried successfully. This column supports future functionality. Currently, the only value returned is N/A.

owner_role_typestr, optional

The type of role that owns the stream

typestr, optional

Type of the stream; currently DELTA only.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Methods

classmethod from_dict(obj: dict) → Stream¶

Create an instance of Stream from a dict.

classmethod from_json(json_str: str) → Stream¶

Create an instance of Stream from a JSON string

to_dict(hide_readonly_properties: bool = False) → dict[str, Any]¶

Returns the dictionary representation of the model using alias

to_dict_without_readonly_properties() → dict[str, Any]¶

Return the dictionary representation of the model without readonly properties.

to_json() → str¶

Returns the JSON representation of the model using alias.

to_str() → str¶

Returns the string representation of the model using alias.