Exploring the concept of streams to capture table-level changes
In this recipe, we will explore the concept of streams, configure a stream on a table, and capture the changes that occur at the table level. Streams are Snowflake's way of performing change data capture on Snowflake tables and can be useful in data pipeline implementation.
Getting ready
The steps for this recipe can be run either in the Snowflake web UI or the SnowSQL command-line client.
How to do it…
The steps for this recipe are as follows:
- Let's start by creating a database and a staging table on which we will create our stream object. We create a staging table to simulate data arriving from outside Snowflake and being processed further through a stream object:
CREATE DATABASE stream_demo; USE DATABASE stream_demo; CREATE TABLE customer_staging ( Â Â ID INTEGER, Â Â Name STRING, Â Â State STRING, Â Â Country STRING );
- The process of creating...