Commands
AS CHANGELOG
Use the AS CHANGELOG
clause to convert a changelog operation in a stream into a column.
This can be used to create materialized views and sinks. See the practice in Sink data with upsert in Snowflake.
Syntax
This is done using the CTE syntax. It converts the source_table
change record to a column of table_name
.
Example
Create MV
Changelog operation
Query MV
Was this page helpful?