How do Streams and Tasks support incremental data pipelines and Change Data Capture (CDC) in Snowflake?

Quick Overview

Asks how Snowflake streams and tasks work together to build incremental pipelines and change data capture. Tests how a stream reports inserts, updates and deletes, when its offset advances, how tasks schedule and chain work, and how to write a correct MERGE from a stream.

How do Streams and Tasks support incremental data pipelines and Change Data Capture (CDC) in Snowflake?

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: medium

Interview Round: Other

How do `Streams` and `Tasks` support incremental data pipelines and Change Data Capture (CDC) in Snowflake? Explain what each object does and show how they combine to keep a curated table in sync with a raw table without reprocessing it in full. ```hint Follow one update Trace what a stream shows after a single row in the source table is updated, and what your MERGE does with those rows. ``` ```hint Where the offset moves Think about when a stream considers its changes consumed, and what happens to them if a task run fails halfway. ``` ### What a Strong Answer Covers - What a stream records, how inserts, updates and deletes appear in it, and when its offset advances - What a task does: its schedule or trigger, the stream condition, its compute, and chaining with `AFTER` - The end-to-end incremental pattern from a raw table to a curated table - Operational concerns such as the initial task state, stream staleness, failed runs and several consumers ### Follow-up Questions - Two downstream tables need the same changes. Can they read from one stream? - A task was suspended for three weeks. What may have happened to its stream, and how do you recover? - When would you use an append-only stream instead of a standard one? - How do Dynamic Tables compare with streams and tasks for the same pipeline?

Overview: Asks how Snowflake streams and tasks work together to build incremental pipelines and change data capture. Tests how a stream reports inserts, updates and deletes, when its offset advances, how tasks schedule and chain work, and how to write a correct MERGE from a stream.

PracHub logo
General
Nov 25, 2026
mediumData ScientistOtherData Manipulation (SQL/Python)
0
0

How do Streams and Tasks support incremental data pipelines and Change Data Capture (CDC) in Snowflake?

Explain what each object does and show how they combine to keep a curated table in sync with a raw table without reprocessing it in full.

What a Strong Answer Covers Guidance

  • What a stream records, how inserts, updates and deletes appear in it, and when its offset advances
  • What a task does: its schedule or trigger, the stream condition, its compute, and chaining with AFTER
  • The end-to-end incremental pattern from a raw table to a curated table
  • Operational concerns such as the initial task state, stream staleness, failed runs and several consumers

Follow-up Questions Guidance

  • Two downstream tables need the same changes. Can they read from one stream?
  • A task was suspended for three weeks. What may have happened to its stream, and how do you recover?
  • When would you use an append-only stream instead of a standard one?
  • How do Dynamic Tables compare with streams and tasks for the same pipeline?