What does the query time predicate METADATA$ACTION='INSERT' do in a Snowflake query?

Master the SnowPro Advanced Architect Test with flashcards, multiple-choice questions, and detailed explanations. Prepare thoroughly for your certification!

Multiple Choice

What does the query time predicate METADATA$ACTION='INSERT' do in a Snowflake query?

Explanation:
Metdata$ACTION is a change-data-capture indicator that accompanies rows produced by a Snowflake stream. It tells you what kind of DML operation affected each row: INSERT, UPDATE, or DELETE. Filtering with METADATA$ACTION = 'INSERT' narrows the stream results to only the rows that were newly inserted, ignoring updates and deletions. This is useful for incremental loads or applying only new data from a stream. It’s not about selecting by a primary key or marking/updating rows in the base table; it’s filtering the stream’s output by the type of change.

Metdata$ACTION is a change-data-capture indicator that accompanies rows produced by a Snowflake stream. It tells you what kind of DML operation affected each row: INSERT, UPDATE, or DELETE. Filtering with METADATA$ACTION = 'INSERT' narrows the stream results to only the rows that were newly inserted, ignoring updates and deletions. This is useful for incremental loads or applying only new data from a stream. It’s not about selecting by a primary key or marking/updating rows in the base table; it’s filtering the stream’s output by the type of change.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy