You have a BigQuery table inventory_vm and must prepare a cost-effective report that excludes VM rows with fewer than 8 vCPUs. What is the most cost-efficient approach?
Choose an answer
Tap an option to check your answer.
Correct answer: Create a view with a filter to drop rows with fewer than 8 vCPU, and use the UNNEST operator..
Why this is the answer
The most cost-efficient approach is to create a view with a filter and use the UNNEST operator. Views in BigQuery are logical tables, meaning they don't store data themselves, so there's no storage cost for the view. When you query a view, BigQuery only processes the data required by the query and the view's definition, making it cost-effective. The UNNEST operator is used for working with arrays, which is a common pattern in BigQuery for nested or repeated data, and it's an efficient way to flatten data for filtering. Materialized views (option B) store precomputed results, incurring storage costs and refresh costs, which is less cost-effective for a simple filter. Using a WITH common table expression (options B and C) is a good practice for readability and organizing complex queries but doesn't inherently reduce the amount of data scanned or processed compared to a direct filter in a view, and it doesn't address the array-like structure implied by UNNEST. Dataflow (option D) is an expensive and complex solution for this simple filtering task, involving additional compute resources and operational overhead.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed