> For the complete documentation index, see [llms.txt](https://docs.snowddl.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.snowddl.com/basic/yaml-configs/stream.md).

# STREAM

Config path: `/<database>/<schema>/stream/<name>.yaml`

Example:

```yaml
object_type: TABLE
object_name: test_table_1
append_only: true
show_initial_rows: true
```

## Schema

* **object\_type** (str) - object type for stream (e.g. `TABLE`, `EXTERNAL_TABLE`)
* **object\_name** (ident) - object name for stream
* **append\_only** (bool) - is stream `APPEND_ONLY` mode
* **insert\_only** (bool) - is stream `INSERT_ONLY` mode (for `EXTERNAL_TABLE`)
* **show\_initial\_rows** (bool) - return existing rows when stream is consumed for the first time
* **comment** (str)

## Usage notes

1. Stream on top of `TABLE`, `EVENT_TABLE` or `VIEW` requires change tracking to be enabled explicitly for this object.
2. SnowDDL detects "stale" streams and suggests REPLACE command.

## Links

* [CREATE STREAM](https://docs.snowflake.com/en/sql-reference/sql/create-stream.html)
* [ALTER STREAM](https://docs.snowflake.com/en/sql-reference/sql/alter-stream.html)
* [SHOW STREAMS](https://docs.snowflake.com/en/sql-reference/sql/show-streams.html)
* [DESC STREAM](https://docs.snowflake.com/en/sql-reference/sql/desc-stream.html)
* [Parser & JSON Schema (GitHub)](https://github.com/littleK0i/SnowDDL/blob/master/snowddl/parser/stream.py)
