Skip to Content

Snowflake SnowPro Core: What Are the Possible METADATA$ACTION Values in Snowflake Stream?

Learn about the two possible values found in the METADATA$ACTION column of a Snowflake stream – INSERT and DELETE. Understand how these values help track changes in source tables.

Table of Contents

Question

What are the possible values within a METADATA$ACTION column in a Snowflake stream? (Choose two.)

A. INSERT
B. UPDATE
C. DELETE
D. TRUNCATE
E. UPSERT

Answer

A. INSERT
C. DELETE

Explanation

In a Snowflake stream, the METADATA$ACTION column captures the type of DML operation performed on the source table that triggered a change in the stream. The two possible values for this column are:

  1. INSERT: This value indicates that a new row was inserted into the source table.
  2. DELETE: This value indicates that an existing row was deleted from the source table.

When a row is updated in the source table, Snowflake treats it as a DELETE followed by an INSERT. Therefore, you will see two separate entries in the stream for an updated row – one with METADATA$ACTION = ‘DELETE’ for the old version of the row, and another with METADATA$ACTION = ‘INSERT’ for the new version of the row after the update.

The other options listed – UPDATE, TRUNCATE, and UPSERT – are not valid values for the METADATA$ACTION column in a Snowflake stream.

Snowflake SnowPro Core certification exam assessment practice question and answer (Q&A) dump including multiple choice questions (MCQ) and objective type questions, with detail explanation and reference available free, helpful to pass the Snowflake SnowPro Core exam and earn Snowflake SnowPro Core certification.