Courseiva

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

A data engineer is working with a table that contains a VARIANT column storing arrays of JSON objects. The engineer needs to produce a report that lists each object's attributes in separate rows. Which Snowflake function should the engineer use to transform the array into multiple rows?

⚠ Common exam trap

Watch out — candidates often confuse functions that create or aggregate semi-structured data with those that explode it, leading to incorrect transformations.

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

The FLATTEN function is specifically designed to explode semi-structured arrays and objects into multiple rows. When applied to a VARIANT column containing an array of objects, it returns one row per object, allowing the engineer to access each object's attributes. This is the correct approach for transforming nested data into a relational format for reporting. Other functions either create semi-structured data or aggregate rows, which are not appropriate here.

Answer analysis

Option-by-option breakdown

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

  • ✓

    FLATTEN

    Why this is correct

    FLATTEN is a table function that takes a VARIANT column containing an array or object and returns a row for each element in the array or each key-value pair in the object. This is exactly what is needed to transform an array of objects into multiple rows, enabling further relational processing. It is the standard tool for exploding semi-structured data.

  • ✗

    OBJECT_CONSTRUCT

    Why it's wrong here

    OBJECT_CONSTRUCT creates a new JSON object from a list of key-value pairs. It is used to build semi-structured data, not to explode arrays. This function would not help in transforming an array into rows; it would create a new object, which is the opposite of what the engineer needs.

  • ✗

    PARSE_JSON

    Why it's wrong here

    PARSE_JSON interprets a string as a JSON document and returns a VARIANT. It does not explode an array into multiple rows; it is used for parsing text into semi-structured data. This function would not help in transforming an existing array into rows; it would simply return the same array structure.

  • ✗

    ARRAY_AGG

    Why it's wrong here

    ARRAY_AGG is an aggregation function that combines values from multiple rows into a single array. It does the opposite of exploding an array into rows. This function would be used to aggregate data, not to flatten it. It is not suitable for the described transformation.

About these practice questions

One of 280 original COF-C03 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.