PDE Ingesting and Processing the Data Practice Question
A data engineer needs to query a BigQuery table that contains an array of structs. They want to expand the array into separate rows for each element. Which SQL function should they use?
⚠ Common exam trap
The trap is confusing array construction (STRUCT, ARRAY_AGG) with array expansion (UNNEST) — candidates who see 'array of structs' sometimes reach for STRUCT or ARRAY_AGG instead of the flattening function.
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
✓
UNNEST
UNNEST is the BigQuery SQL function that flattens an array into a set of rows, one per array element. When applied to an array of structs, it expands each struct into its own row, allowing the struct fields to be selected as columns.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
STRUCT
Why it's wrong here
STRUCT constructs a struct value from fields; it neither unnests nor produces rows. It is tempting because the column contains structs, and STRUCT would be correct when building a typed record to insert into a table rather than expanding existing elements.
- ✓
UNNEST
Why this is correct
UNNEST expands an array into a set of rows, one per element, which is exactly the flattening required. Placed in the FROM clause alongside the table, it correlates each struct element into its own row for querying.
- ✗
ARRAY_AGG
Why it's wrong here
ARRAY_AGG aggregates values into an array, the opposite direction: it collapses rows rather than expanding an array into rows. It is tempting because it operates on arrays, and it would be correct when building an array column from multiple input rows.
- ✗
SPLIT
Why it's wrong here
SPLIT divides a STRING on a delimiter into an array of substrings; it cannot expand an ARRAY of STRUCTs into rows. It is tempting because it produces multiple elements from one value, and would be correct when parsing delimited text into an array.
About these practice questions
Courseiva writes every PDE question from scratch — 747 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
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 Google Cloud exam blueprint
This PDE practice question is part of Courseiva's free Google Cloud 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 PDE exam.