Prepare and test your skills

Prepare and test your skills

Free sample question, answered and explained below. The Professional Data Engineer practice bank has 1,353 more like it. Try 10 free: instant score, no account.
A data engineering team is designing a multi-terabyte dataset in BigQuery to support recurring BigQuery ML model training and batch prediction workloads (ML.PREDICT).
The workloads have the following operational characteristics:
transaction_timestamp column.customer_id column within specific time windows.Which table design strategy in BigQuery should the team implement to optimize query performance and minimize data processing costs?
transactions_YYYYMMDD) without partitioning or clustering.Date-sharded tables are individual physical tables created for each day, identified by a common table prefix followed by a numeric date suffix (YYYYMMDD), queried collectively using wildcard table queries.
customer_id within specific days must perform a full scan of all columns across all matched daily tables.Working with legacy systems that cannot adopt native BigQuery partition DDL/DML statements.
Google Cloud architectural best practices strongly recommend migrating legacy date-sharded tables to native partitioned and clustered tables to optimize query performance and reduce operational overhead.
transaction_timestamp (day) and cluster the table by customer_id.Combining table partitioning and table clustering in BigQuery organizes data physically into segmented partitions and sorts the underlying storage blocks within each partition based on designated high-cardinality keys.
transaction_timestamp allows BigQuery to prune entire physical partitions when date filters are evaluated during training runs, scanning only the necessary time ranges.customer_id sorts and groups data within each date partition, enabling block pruning when querying specific customers during batch prediction jobs.This architecture optimizes both the temporal filtering inherent in time-series training pipelines and the high-cardinality lookups required during batch inference, while preserving deterministic cost governance before queries execute.
customer_id and append LIMIT clauses to all ML training queries.This approach relies entirely on single-column table clustering for data sorting and attempts to restrict data processing costs during feature engineering and model training by applying SQL LIMIT clauses.
LIMIT clauses do not control scan costs: Applying a LIMIT clause to an analytical or model training query does not limit the full column scan across unpruned blocks; BigQuery still reads all data matching query filters.LIMIT clauses only cap the result set size returned to the client, not the data scanned across full table columns.The table size was below 64 MB or if queries only filtered strictly by exact clustered key values without temporal filtering or upfront budgeting requirements.
Model training jobs in BigQuery ML require complete datasets matching the training filter condition to compute mathematical model weights; using LIMIT distorts training distribution while failing to prevent full-scan billing.
customer_id using integer range partitioning and cluster the table by transaction_timestamp.This approach segments the table physically into integer range partitions based on a numeric identifier (customer_id) and sorts storage blocks inside those partitions chronologically by transaction_timestamp.
Workloads were strictly segmented and queried by bounded customer ID ranges with secondary chronological aggregations across all customer history.
In BigQuery, partitioning is most effective on coarse-grained temporal or bounded range dimensions with large data volume per partition, while clustering is optimal for high-cardinality dimensional filtering.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated