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_on (datetime, optional) – Date and time when the stream was created.

  • comment (str, optional) – user comment associated to an object in the dictionary

  • database_name (str, optional) – Database in which the stream is stored

  • schema_name (str, optional) – Schema in which the stream is stored

  • owner (str, optional) – Role that owns the stream

  • table_name (str, optional) – Table name whose changes are tracked by the stream

  • stale (bool, optional) – Specifies whether the stream is stale or not

  • mode (str, optional) – Mode of the stream. Possible values include: APPEND_ONLY, INSERT_ONLY. For streams on tables, the column displays DEFAULT.

  • stale_after (datetime, optional) – Timestamp when the stream became stale or may become stale if not consumed.

  • invalid_reason (str, optional) – Reason why the stream cannot be queried successfully. This column supports future functionality. Currently, the only value returned is N/A.

  • owner_role_type (str, optional) – The type of role that owns the stream

  • type (str, 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.