Choose standard, append-only or insert-only streams
Stream types expose different changes and apply to different supported source objects. Choose the type from the source and required semantics.
Understand the idea
Use a standard stream when the source is a mutable table and deletes matter. Use append-only when the source contract is immutable appended records. An append-only stream is not a safe way to follow a table whose old rows are corrected in place.
| Concept | What it means |
|---|---|
| Standard | Tracks net inserts, updates and deletes on supported sources. |
| Append-only | Tracks inserts without update/delete tracking on supported sources. |
| Insert-only | Used for supported external-file-based sources; not a normal-table synonym for append-only. |
| View stream | Tracks supported view changes, subject to view/query restrictions. |
A concrete example
Expect no net row from TYPE_STANDARD and insertion 1 from TYPE_APPEND. These streams are intentionally not the main pipeline stream.
Remember: Choose a stream mode that matches both the source and the business change contract.
Explain it step by step · full theory
Understand the concept
Use a standard stream when the source is a mutable table and deletes matter. Use append-only when the source contract is immutable appended records. An append-only stream is not a safe way to follow a table whose old rows are corrected in place.
Insert-only external-source semantics reflect discovered files, not a record-by-record diff of file replacements. Availability for external and Iceberg sources depends on the specific source/catalog and current support. Check the source compatibility before choosing syntax.
Walk through the behavior
Streams can exist on supported tables, views and directory tables. View streams require compatible underlying objects and supported query operations; a SELECT with arbitrary aggregation is not automatically eligible. Source replacement and schema changes can also invalidate consumers.
This small example inserts then deletes a row before either stream is consumed. The standard stream can see no net change; the append-only stream still exposes the insertion. The type controls what downstream processing learns.
Words used in this lesson
- Standard
- Tracks net inserts, updates and deletes on supported sources.
- Append-only
- Tracks inserts without update/delete tracking on supported sources.
- Insert-only
- Used for supported external-file-based sources; not a normal-table synonym for append-only.
- View stream
- Tracks supported view changes, subject to view/query restrictions.
See how it works
Choose a step to explore the idea at your own pace.
Open the interactive explanation
Choose standard, append-only or insert-only streams
Start with the source
Stream types expose different changes and apply to different supported source objects. Choose the type from the source and required semantics.
Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.
Read the complete diagram explanation
- Start with the source
Stream types expose different changes and apply to different supported source objects. Choose the type from the source and required semantics.
- Follow the work
Use a standard stream when the source is a mutable table and deletes matter. Use append-only when the source contract is immutable appended records. An append-only stream is not a safe way to follow a table whose old rows are corrected in place.
- Explain the outcome
Choose a stream mode that matches both the source and the business change contract.
Try the SQL or command
Read → predict → run in your learning environment → compare. You can also learn by reading without an account.
New to SQL? Where to run it and how to read it
A query is a question written in SQL. Snowflake runs it and returns a result table. This website shows examples; it does not connect to your account.
- No account yet? Read and predict the output first. Follow the account and Snowsight lesson when you are ready.
- For SQL practice, use a learning account in Snowsight and select an authorized role and warehouse. A role determines permissions; a warehouse supplies processing power. Follow the example’s database/schema setup when it refers to stored objects.
- Read the entire example, including comments beginning with
--. Run the selected statement or labeled block in the stated order. Examples labeled Python, shell or HTTP belong in that client, not in a SQL editor. - Compare values and row counts with the explained result. If an example deliberately causes an error, follow its rollback and cleanup steps before continuing.
- SELECT / FROM
- Choose the values to return / identify their input.
- VALUES / COLUMN1
- VALUES supplies tiny example rows. COLUMN1 means their first column, COLUMN2 their second.
- AS / WITH
- AS gives a result a readable name. WITH names a temporary query step within one statement.
- NULL / ::
- NULL means missing or unknown. The :: notation converts a value to a named data type.
- Session
- One connection and its settings. Keep related transaction steps in the same session.
- Database.schema.table
- A full address for stored data. It is separate from the warehouse that processes queries.
Need the L2_OBJECTS_LAB setup? Open the first database-object lesson →
Help with common practice errors
- No active warehouse: select a warehouse your role can use. Do not assume you need to create a new one.
- Object missing or not authorized: check the full name, required setup and active role. Ask the account owner for access if needed.
- Object already exists: setup may already have run. Read the current state or choose a fresh lab name consistently; do not add OR REPLACE blindly.
- Different result: check whether an earlier INSERT or UPDATE changed the data. VALUES examples provide their own fresh input for each statement.
Before running this lesson
Manual learning lab; nothing runs on this website. Complete lesson 1 setup in L2_OBJECTS_LAB.M11_LAB and follow the lesson order. Use the same authorized role and warehouse for manual SQL. Task templates use <lab_warehouse>: replace it with an approved warehouse name. Do not activate several consumers against the same stream. Each task starts suspended; running or resuming it can consume compute credits.
Compare types without touching earlier examples
CREATE TABLE TYPE_SOURCE (ID NUMBER);
CREATE STREAM TYPE_STANDARD ON TABLE TYPE_SOURCE;
CREATE STREAM TYPE_APPEND ON TABLE TYPE_SOURCE APPEND_ONLY=TRUE;
INSERT INTO TYPE_SOURCE VALUES (1);
DELETE FROM TYPE_SOURCE WHERE ID=1;
SELECT * FROM TYPE_STANDARD;
SELECT * FROM TYPE_APPEND;What to expect and why
Expect no net row from TYPE_STANDARD and insertion 1 from TYPE_APPEND. These streams are intentionally not the main pipeline stream.
Inspect source-specific definitions
SHOW STREAMS IN SCHEMA L2_OBJECTS_LAB.M11_LAB;
-- Template only: requires a supported, existing external table.
-- CREATE STREAM external_changes ON EXTERNAL TABLE <external_table> INSERT_ONLY=TRUE;What to expect and why
Inspect the source and mode, rather than assuming every stream type works on every object.
Check your understanding
Choose an answer, then check your reasoning. This is practice, not a scored test.
Try it yourself
Why can replacing an external file be different from updating a normal table row?
Compare your reasoning
Insert-only tracking can expose newly discovered file records without a reliable row-level deletion diff for the old file.