nerdexam
Google

PROFESSIONAL-DATA-ENGINEER · Question #248

You are migrating a table to BigQuery and are deciding on the data model. Your table stores information related to purchases made across several store locations and includes information like the…

The correct answer is A. Partition by transaction time; cluster by state first, then city, then store ID. Explanation/Reference: https://cloud.google.com/bigquery/docs/querying-clustered-tables

Submitted by naveen.iyer· Mar 30, 2026Designing data processing systems

Question

You are migrating a table to BigQuery and are deciding on the data model. Your table stores information related to purchases made across several store locations and includes information like the time of the transaction, items purchased, the store ID, and the city and state in which the store is located. You frequently query this table to see how many of each item were sold over the past 30 days and to look at purchasing trends by state, city, and individual store. How would you model this table for the best query performance?

Options

  • APartition by transaction time; cluster by state first, then city, then store ID.
  • BPartition by transaction time; cluster by store ID first, then city, then state.
  • CTop-level cluster by state first, then city, then store ID.
  • DTop-level cluster by store ID first, then city, then state.

How the community answered

(55 responses)
  • A
    75% (41)
  • B
    15% (8)
  • C
    4% (2)
  • D
    7% (4)

Explanation

Explanation/Reference: https://cloud.google.com/bigquery/docs/querying-clustered-tables

Topics

#BigQuery clustering#partitioning#data modeling#query performance

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-DATA-ENGINEER Practice