Courseiva

COF-C03 Practice Question: Performance Optimization, Querying, and Transformation

A data engineer needs to transform semi-structured data stored in a VARIANT column that contains an array of JSON objects into a relational table with one row per object. The engineer wants to use a Snowflake function that can expand the array into multiple rows. Which function should be used?

⚠ Common exam trap

A common mix-up: candidates confuse functions that manipulate semi-structured data with the one that specifically expands arrays into rows.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

FLATTEN

FLATTEN is the correct function to expand an array of objects into multiple rows. It is typically used in the FROM clause with LATERAL, allowing each element of the array to become a separate row while preserving access to the original row's columns. The other functions either create VARIANT values or aggregate rows, not expand arrays.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    PARSE_JSON

    Why it's wrong here

    PARSE_JSON converts a string containing JSON into a VARIANT value. It does not expand arrays or create multiple rows. In this scenario, the data is already in VARIANT format, so PARSE_JSON would not help transform the array into rows; it would only reinterpret a string as VARIANT.

  • ✓

    FLATTEN

    Why this is correct

    FLATTEN is a table function that takes a VARIANT column and expands arrays or objects into multiple rows. It is designed exactly for this purpose, producing one row per element in the array. Using LATERAL FLATTEN allows the engineer to join the expanded rows back to the original table, achieving the desired relational format.

  • ✗

    OBJECT_CONSTRUCT

    Why it's wrong here

    OBJECT_CONSTRUCT creates a JSON object from key-value pairs. It is used for building objects, not for expanding an existing array into rows. Applying it here would not produce one row per array element and would not achieve the required relational transformation.

  • ✗

    ARRAY_AGG

    Why it's wrong here

    ARRAY_AGG is an aggregation function that collects values into an array. It performs the opposite operation of what is needed: it groups rows into an array rather than expanding an array into rows. Using it would not transform the semi-structured array into a relational format.

About these practice questions

This COF-C03 question is part of Courseiva's 280-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Snowflake exam blueprint

This COF-C03 practice question is part of Courseiva's free Snowflake certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the COF-C03 exam.