Courseiva

CCNA Pde Analysis Ml Questions

75 questions · Pde Analysis Ml topic · All types, answers revealed

1
MCQmedium

You are building a binary classification model using AutoML Tables on Vertex AI. The dataset has a severe class imbalance (1% positive class). Which strategy should you use to handle the imbalance?

A.Oversample the minority class using SMOTE before training.
B.Do nothing; AutoML Tables automatically handles class imbalance.
C.Downsample the majority class to match the minority class size.
D.Use a weight column to assign higher weights to the minority class.
AnswerD

AutoML Tables allows setting class weights to address imbalance; it will adjust the loss function accordingly.

Why this answer

The correct option is D: use a weight column in AutoML Tables to assign higher weights to the minority class. In Vertex AI AutoML Tables, you can add a weight column to the training data and specify it as the weight column, so minority-class rows contribute more to the loss. This directly counteracts the 1% positive-class imbalance without changing the data distribution.

Options A and C are not supported preprocessing steps in AutoML Tables, since it manages data splitting and training internally and does not expose SMOTE or manual downsampling. Option B is incorrect because AutoML Tables does not automatically correct severe class imbalance; you must supply weights or adjust the optimization objective. Option D is therefore the appropriate, supported mechanism for this scenario.

Exam trap

Confusing scikit-learn/XGBoost-style class_weight parameters with Vertex AI AutoML Tables, which instead uses a dataset weight column to handle class imbalance.

2
MCQmedium

You are using Vertex AI Feature Store to serve features for online predictions. Your model requires features from multiple sources with low latency (<10ms). Which type of serving should you use?

A.Online serving with Cloud SQL
B.Offline serving with BigQuery
C.Online serving with Bigtable
D.Offline serving with Cloud Storage
AnswerC

Online serving with Bigtable satisfies the sub-10ms latency constraint because Bigtable provides low-latency row-key lookups for feature values at prediction time. Vertex AI Feature Store uses Bigtable as its online serving store, retrieving the latest feature values for each entity directly, rather than scanning historical data as batch serving would.

Why this answer

Vertex AI Feature Store online serving is designed for low-latency lookups at prediction time, and Bigtable is the underlying low-latency store used for online serving. Bigtable provides single-digit millisecond reads at scale, which satisfies the <10ms requirement. Offline serving (BigQuery) is optimized for batch/high-throughput reads, not sub-10ms online lookups.

Exam trap

The trap is conflating 'online serving' with any low-latency database; candidates may pick Cloud SQL, but Vertex AI Feature Store's online serving is backed by Bigtable, not Cloud SQL.

How to eliminate wrong answers

Option A is wrong because Cloud SQL is a relational database not used as the online serving backend for Vertex AI Feature Store; it cannot meet the <10ms low-latency requirement at scale and is not the supported online store. Option B is wrong because offline serving with BigQuery is for batch training and bulk feature retrieval, with latencies in seconds, not <10ms. Option D is wrong because offline serving with Cloud Storage is for batch export/import of feature data, not real-time online prediction serving.

3
MCQmedium

A company needs to predict whether a product image contains a specific defect. They have 10,000 labeled images and want to build a model quickly without writing custom code or training from scratch. Which GCP service should they use?

A.AutoML Tables
B.AutoML Vision
C.Vertex AI custom training
D.AutoML Natural Language
AnswerB

AutoML Vision trains image classification models from labelled datasets using Google's managed infrastructure, requiring no custom code or algorithm design. It accepts the 10,000 labelled images and handles training automatically, satisfying the constraint of building a defect-detection model quickly without training from scratch.

Why this answer

AutoML Vision is designed for custom image classification tasks with minimal ML expertise. It uses transfer learning and supports up to millions of images. AutoML Tables handles tabular data, not images.

Vertex AI custom training would require more effort. AutoML NLP is for text data.

4
MCQmedium

Your analytics team queries a large BigQuery table `events` that is partitioned by `event_date` and clustered by `user_id`. A new dashboard runs a query filtering on `user_id = 'abc123'` but does not include a filter on `event_date`. You want to minimize the bytes scanned by this query. What should you do?

A.Add a filter on `event_date` to the query, such as `event_date >= '2024-01-01'`.
B.Use `SELECT *` instead of selecting specific columns.
C.Add a `LIMIT` clause to the query, such as `LIMIT 1000`.
D.Create a clustered table on `user_id` instead of `event_date`.
AnswerA

Partition pruning is driven by filters on the partitioning column. Without an `event_date` predicate, BigQuery must scan all partitions, even though clustering on `user_id` helps within each partition. Adding a date filter restricts the scan to relevant partitions, dramatically reducing bytes processed and cost.

Why this answer

The table is partitioned by `event_date`; without a filter on that column, BigQuery cannot prune partitions and scans the entire table. Adding a date filter enables partition pruning, reducing bytes scanned. Clustering on `user_id` helps only within the scanned partitions, so it does not replace the need for a partition filter.

Exam trap

The trap here is assuming that clustering alone can avoid scanning all partitions when the query lacks a filter on the partitioning column.

5
MCQmedium

A company uses Looker Studio to build dashboards from BigQuery data. They notice that queries take several seconds to return. They want to improve performance without changing the schema or adding materialized views. Which option should they use?

A.Enable BigQuery BI Engine on the relevant project.
B.Move the data to Cloud SQL.
C.Switch to BigQuery Omni for cross-cloud queries.
D.Use APPROX_COUNT_DISTINCT to speed up distinct counts.
AnswerA

BI Engine provides an in-memory analysis layer that caches frequently accessed data, accelerating Looker Studio queries without schema changes or materialised views. It satisfies the stem's constraint of improving dashboard performance while leaving the underlying BigQuery tables untouched, and integrates natively with Looker Studio.

Why this answer

BI Engine accelerates sub-second query response times in Looker Studio by caching data in memory within the BigQuery region.

6
MCQeasy

You need to load a 500 GB CSV file from Cloud Storage into BigQuery. The file has a header row and uses comma delimiters. You want to load it as quickly as possible without transforming the data. Which approach should you use?

A.Create an external table pointing to the CSV and then run `CREATE TABLE AS SELECT * FROM external_table`.
B.Use `bq query` with an `EXTERNAL_QUERY` function to read the CSV from Cloud Storage.
C.Use the `gcloud storage cp` command to copy the CSV into BigQuery.
D.Use the `bq load` command with `--source_format=CSV` and `--skip_leading_rows=1`.
AnswerD

The `bq load` command with `--source_format=CSV` and `--skip_leading_rows=1` directly loads the CSV, skipping the header. This is the fastest method for bulk loading without transformation, leveraging BigQuery's native load job which can parallelize reading from Cloud Storage.

Why this answer

A direct load job using `bq load` with CSV format and skipping the header is the fastest and most straightforward way to load a large CSV into BigQuery without transformation. It uses BigQuery's native loading capabilities, which are optimized for bulk data.

Exam trap

The trap here is confusing external tables or copy commands with a direct load job, which is specifically designed for efficient bulk loading.

7
MCQmedium

An organization wants to integrate BigQuery Omni to query data stored in AWS S3. They have set up the necessary connections. What is the primary benefit of using BigQuery Omni over simply copying the data to BigQuery?

A.Ability to use BigQuery ML models on data in S3 without moving data.
B.Automatic encryption of data at rest in S3.
C.Lower latency queries due to in-memory caching.
D.Support for real-time streaming inserts into S3.
AnswerA

BigQuery Omni supports BigQuery ML, allowing you to train and run models on cross-cloud data.

Why this answer

BigQuery Omni allows you to query data across clouds without moving it, providing a unified analytics experience. It reduces data egress costs and avoids duplication.

8
MCQmedium

A data engineer is building a Looker Studio dashboard that requires a calculated field to compute the running total of sales per day per store. Which Looker Studio function should they use?

A.RANK()
B.TOTAL()
C.RUNNING_SUM()
D.PERCENTILE()
AnswerC

RUNNING_SUM computes cumulative sums.

Why this answer

Looker Studio's RUNNING_SUM function computes a running total within a group, exactly what is needed for a running total per store partitioned by date.

9
MCQeasy

Which BigQuery SQL function returns the rank of a row within a window, with gaps in the ranking for ties?

A.RANK()
B.NTILE()
C.DENSE_RANK()
D.ROW_NUMBER()
AnswerA

RANK() assigns positions ordered by the window's ORDER BY, and tied values receive the same rank, leaving gaps before the next rank. It satisfies the explicit gap requirement, unlike DENSE_RANK(), which numbers ties consecutively without gaps.

Why this answer

The RANK() function assigns a rank to each row within a window, and when there are ties, it leaves gaps in the ranking sequence. For example, if two rows tie for rank 1, the next row receives rank 3. This behavior distinguishes it from DENSE_RANK(), which does not leave gaps.

RANK() is part of BigQuery's window functions and is used with an OVER clause specifying the partitioning and ordering.

Exam trap

PDE often tests the subtle differences between RANK(), DENSE_RANK(), and ROW_NUMBER(); candidates may pick DENSE_RANK() because they forget that RANK() leaves gaps, or pick ROW_NUMBER() because they overlook the tie-handling requirement.

How to eliminate wrong answers

Option B is wrong because NTILE() divides the rows into a specified number of roughly equal buckets and assigns a bucket number, not a rank with gaps. Option C is wrong because DENSE_RANK() assigns ranks without gaps for ties — if two rows tie for rank 1, the next row gets rank 2. Option D is wrong because ROW_NUMBER() assigns a unique sequential number to each row, regardless of ties, so it never produces gaps or duplicate ranks.

10
MCQeasy

What is the primary purpose of Vertex AI Feature Store?

A.To manage and track ML experiments
B.To train machine learning models using AutoML
C.To transform raw data into features using SQL
D.To store and serve features for machine learning models at scale
AnswerD

Vertex AI Feature Store provides a centralised repository that stores feature values and serves them online at low latency or in bulk for training, keeping features consistent between training and serving. This satisfies the need to store and serve features at scale.

Why this answer

Vertex AI Feature Store is a managed service for storing, serving, and sharing ML features at scale, providing low-latency online serving and high-throughput batch serving with point-in-time correctness. It centralizes feature definitions so training and serving use consistent feature values, reducing training-serving skew.

Exam trap

PDE often tests the distinction between Feature Store (feature storage/serving) and other Vertex AI components like Experiments, AutoML, and Pipelines — candidates pick a component that sounds related but serves a different purpose.

How to eliminate wrong answers

Option A is wrong because managing and tracking ML experiments is the role of Vertex AI Experiments (and ML Metadata), not Feature Store. Option B is wrong because training models with AutoML is handled by Vertex AI AutoML (Tabular, Vision, etc.), not Feature Store. Option C is wrong because transforming raw data into features using SQL is done in BigQuery or Dataflow, not Feature Store — Feature Store ingests already-computed features.

11
MCQhard

A company uses Dataplex to manage data quality across multiple BigQuery datasets. They want to define a data quality rule that checks if a column 'email' contains a valid email format. Which Dataplex feature should they use?

A.Use Cloud DLP to classify and validate emails.
B.Use the built-in 'email' rule type in Dataplex.
C.Create a custom Data Quality rule using the 'regex' type.
D.Create a Dataflow pipeline to validate emails and write results to a separate table.
AnswerC

Dataplex data quality rules support a regex rule type, letting you define a pattern that each value in the email column must match. This satisfies the requirement to validate email format without writing custom SQL assertions.

Why this answer

Dataplex Data Quality tasks support a set of built-in rule types (range, non-null, uniqueness, set, regex, sql_assertion, row_condition), and email format validation is not one of the built-in types. The 'regex' rule type lets you supply a regular expression that each value in the 'email' column must match, so a pattern like ^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$ enforces valid email formatting. This is the intended Dataplex mechanism for pattern-based validation.

Exam trap

PDE often tests the assumption that Dataplex ships a rich library of semantic built-in rules (email, phone, SSN); in reality only generic rule types exist, so pattern validation must be expressed as a regex rule.

How to eliminate wrong answers

Option A is wrong because Cloud DLP is a data discovery, classification, and de-identification service (infoTypes, masking, tokenization) — it does not define or execute Dataplex data quality rules on BigQuery columns. Option B is wrong because Dataplex Data Quality has no built-in 'email' rule type; the built-ins are range, non-null, uniqueness, set, regex, sql_assertion, and row_condition. Option D is wrong because building a Dataflow pipeline is a custom, out-of-band solution that bypasses Dataplex's native Data Quality task framework and does not integrate with Dataplex scan results or dashboards.

12
MCQmedium

You are building a forecasting model to predict daily sales for the next 90 days using historical sales data with clear seasonality and trend. You want to use BigQuery ML with minimal manual tuning. Which model type should you choose?

A.ARIMA
B.Boosted tree (XGBoost)
C.ARIMA_PLUS
D.Linear regression
AnswerC

ARIMA_PLUS automatically handles seasonality, trend and holiday effects, and performs automatic model selection and hyperparameter tuning within BigQuery ML. This satisfies the minimal manual tuning constraint while producing accurate 90-day daily sales forecasts from historical data.

Why this answer

ARIMA_PLUS is the correct choice because it is a Google-developed, automated time-series model in BigQuery ML that handles seasonality, trend, holidays, and outliers with minimal manual tuning. It automatically performs preprocessing such as missing value imputation, holiday effect detection, and seasonality decomposition, making it ideal for forecasting daily sales over a 90-day horizon. Unlike standard ARIMA, ARIMA_PLUS requires no manual specification of p, d, q parameters or seasonal orders, aligning with the 'minimal manual tuning' requirement.

Exam trap

PDE often tests the misconception that any time-series model (like ARIMA) automatically handles seasonality and trend, but only ARIMA_PLUS in BigQuery ML offers automated preprocessing and multiple seasonality detection, so candidates may incorrectly choose standard ARIMA or a non-time-series model like XGBoost.

How to eliminate wrong answers

Option A is wrong because standard ARIMA in BigQuery ML requires manual selection of non-seasonal and seasonal parameters (p, d, q, P, D, Q) and does not automatically handle multiple seasonalities, holidays, or outliers, demanding significant tuning. Option B is wrong because boosted trees (XGBoost) are not designed for time-series forecasting; they treat data as independent observations, ignore temporal ordering, and cannot extrapolate trends beyond the training range, making them unsuitable for forecasting future values. Option D is wrong because linear regression assumes a linear relationship and cannot capture complex seasonality or non-linear trends without extensive feature engineering, and it also fails to model temporal dependencies.

13
MCQeasy

A data engineer needs to design a data pipeline that ingests streaming data from Cloud Pub/Sub, performs real-time aggregations, and loads the results into BigQuery for dashboarding. Which Google Cloud service should they use for the streaming aggregation step?

A.Cloud Functions
B.Dataflow
C.Cloud Dataproc
D.Cloud Composer
AnswerB

Dataflow provides serverless, autoscaling Apache Beam processing with exactly-once semantics, satisfying the stem's real-time aggregation requirement. Its native Pub/Sub source and BigQuery sink connectors handle windowed streaming aggregations without managing compute infrastructure, unlike Dataproc's cluster-based Spark or BigQuery's load-only ingestion.

Why this answer

Dataflow is a fully managed service for stream and batch processing that integrates with Pub/Sub and BigQuery. It supports exactly-once processing and low-latency streaming.

14
MCQhard

A company uses BigQuery and wants to reduce query costs by using BI Engine for Looker Studio dashboards. The data is stored in a BigQuery dataset with 5 TB of frequently accessed tables. The dashboards run dozens of concurrent queries. What is the recommended approach to enable BI Engine acceleration?

A.Enable BI Engine by setting the dataset option 'enable_bi_engine=TRUE' in the dataset metadata.
B.Grant all Looker Studio users the 'biengine.user' IAM role on the project.
C.Create a reservation in the Administration panel and assign it to the project.
D.Create materialized views of the tables and connect Looker Studio to the views.
AnswerC

BI Engine acceleration requires a reservation assigned to the project; the 5 TB dataset and dozens of concurrent dashboard queries exceed the free per-project capacity, so a reservation guarantees dedicated in-memory cache for Looker Studio.

Why this answer

BI Engine is a reserved capacity service that caches data in memory. You must reserve capacity (amount of memory) for a specific BigQuery region, and then BI Engine automatically accelerates queries from Looker Studio and other BI tools. It does not require you to grant specific IAM roles to users (they just need BigQuery permissions) or to create materialized views.

You do not need to enable it per dataset; it works at the project/region level.

15
MCQeasy

You want to quickly estimate the number of distinct visitors to your website from a large BigQuery table. Which function provides an approximate count with low latency?

A.APPROX_COUNT_DISTINCT
B.HyperLogLog++
C.COUNT(DISTINCT)
D.APPROX_QUANTILES
AnswerA

APPROX_COUNT_DISTINCT uses HyperLogLog++ sketches to estimate cardinality within a small, bounded memory footprint, returning results in seconds rather than the minutes an exact COUNT(DISTINCT) would need on a large table. This directly satisfies the stem's low-latency requirement for estimating distinct website visitors.

Why this answer

APPROX_COUNT_DISTINCT is a built-in BigQuery function that returns an approximate count of distinct values using a HyperLogLog++ sketch. It is designed for large-scale data, providing fast, low-latency results with a small error rate (typically <1%). This makes it ideal for quickly estimating distinct visitors without the overhead of exact counting.

Exam trap

PDE often tests the confusion between approximate and exact functions, leading candidates to choose COUNT(DISTINCT) for performance despite its high latency on large datasets.

How to eliminate wrong answers

Option B is wrong because HyperLogLog++ is the underlying algorithm that APPROX_COUNT_DISTINCT uses, not a directly callable function in BigQuery. Option C is wrong because COUNT(DISTINCT) computes an exact count, which requires shuffling all distinct values and can be very slow and resource-intensive on large tables. Option D is wrong because APPROX_QUANTILES is used to estimate quantiles (e.g., median, percentiles) of a numeric column, not to count distinct values.

16
MCQeasy

Which BigQuery function can be used to retrieve the value of a column from the previous row within a partition, ordered by a timestamp?

A.LAG()
B.FIRST_VALUE()
C.ROW_NUMBER()
D.LEAD()
AnswerA

LAG() is a navigation window function that returns a column's value from a preceding row within the same partition, evaluated by the ORDER BY timestamp. It satisfies the stem's requirement to retrieve the previous row's value, unlike LEAD(), which looks forward.

Why this answer

LAG() is a window function that returns the value of a column from a row that is a specified number of rows before the current row within the partition. LEAD() retrieves from a following row.

17
MCQmedium

Your Looker dashboard uses a BigQuery connection. You notice that some queries take over a minute. Which service can you enable to cache results in memory for sub-second Looker queries?

A.BigQuery BI Engine
B.Cloud SQL
C.Cloud Bigtable
D.Cloud Memorystore
AnswerA

BigQuery BI Engine reserves memory for sub-second query acceleration and caches frequently accessed data, so repeated Looker queries against the BigQuery connection return in under a second. It satisfies the stated requirement of in-memory caching rather than relying on disk-based results cache.

Why this answer

BigQuery BI Engine is an in-memory analysis service that caches frequently accessed BigQuery data and accelerates queries, delivering sub-second response times for Looker dashboards. It integrates natively with BigQuery and Looker, so enabling BI Engine on the relevant project or dataset is the correct fix. Other options are separate database services that do not accelerate BigQuery queries.

Exam trap

The trap is assuming any caching or in-memory service (Memorystore, Bigtable) will accelerate BigQuery — only BI Engine is purpose-built to cache BigQuery data in memory for Looker.

How to eliminate wrong answers

Option B is wrong because Cloud SQL is a managed relational database (MySQL/PostgreSQL/SQL Server) and does not cache or accelerate BigQuery query results. Option C is wrong because Cloud Bigtable is a NoSQL wide-column store for high-throughput workloads, not an in-memory accelerator for BigQuery. Option D is wrong because Cloud Memorystore is a managed Redis/Memcached service; while it can cache application data, it does not transparently accelerate BigQuery SQL executed by Looker.

18
MCQmedium

A data engineer needs to query data from BigQuery and another cloud provider's storage (AWS S3) using a single SQL query. The data must not be moved or copied to GCP. Which Google Cloud service should they use?

A.Cloud Storage Transfer Service
B.Dataplex
C.BigQuery Data Transfer Service
D.BigQuery Omni
AnswerD

BigQuery Omni runs BigQuery SQL directly against data held in AWS S3 through Anthos-hosted compute, returning results without extracting or copying the data into Google Cloud. This satisfies the constraint that the S3 data must remain in place while a single query spans both sources.

Why this answer

BigQuery Omni allows querying data across multiple clouds (AWS S3, Azure Blob Storage) using BigQuery's interface without moving data. BigQuery Omni runs compute in the other cloud's region. BigQuery Transfer Service moves data into BigQuery.

Dataplex is for data management, not cross-cloud queries. Cloud Storage Transfer Service is for moving data between clouds.

19
MCQhard

You are using BigQuery ML to train a matrix factorization model for a recommendation system. The training data consists of user-item interactions. You notice that the model is overfitting. Which of the following hyperparameter changes would most likely reduce overfitting?

A.Increase w_reg (regularization weight) from 0.1 to 0.5
B.Decrease w_reg (regularization weight) from 0.1 to 0.01
C.Increase num_factors from 10 to 20
D.Increase num_training_iterations from 10 to 20
AnswerA

w_reg controls L2 regularization strength on the learned factors. Raising it from 0.1 to 0.5 penalises large factor values more heavily, constraining model complexity and reducing overfitting on the sparse user-item interaction data described in the stem.

Why this answer

Increasing w_reg raises the L2 regularization penalty applied to the learned latent factor matrices, which shrinks factor magnitudes and constrains model complexity. In BigQuery ML's matrix factorization, w_reg directly controls how strongly the optimizer penalizes large weights, so moving from 0.1 to 0.5 tightens the fit and reduces overfitting on sparse user-item interaction data.

Exam trap

PDE often tests the misconception that adding more capacity (more factors or more iterations) improves a model, when in fact those changes worsen overfitting and only stronger regularization reduces it.

How to eliminate wrong answers

Option B is wrong because decreasing w_reg from 0.1 to 0.01 weakens regularization, allowing the model to fit training noise more aggressively and worsening overfitting. Option C is wrong because increasing num_factors from 10 to 20 expands the latent dimension, giving the model more capacity to memorize training interactions and typically increasing overfitting. Option D is wrong because increasing num_training_iterations from 10 to 20 only lets the optimizer run longer toward the same (or lower) training loss, which generally deepens overfitting rather than reducing it.

20
MCQeasy

You need to load a 2 TB CSV file from Cloud Storage into BigQuery. The CSV has a header row and uses a comma delimiter. You want to minimize cost and ensure the load completes quickly. Which method should you use?

A.Run a `bq load` command with `--source_format=CSV` and `--skip_leading_rows=1`.
B.Stream the data using the BigQuery Storage Write API.
C.Use the BigQuery web UI to upload the file directly.
D.Use the BigQuery Data Transfer Service to schedule a recurring load.
AnswerA

The `bq load` command can load large files from Cloud Storage into BigQuery. Specifying `--source_format=CSV` and `--skip_leading_rows=1` handles the header row. This method is cost-effective (no data egress) and leverages BigQuery's parallel load capabilities for fast ingestion.

Why this answer

For large files in Cloud Storage, the most efficient and cost-effective method is a batch load using the `bq load` command or a load job. It supports CSV format, handles header rows with `--skip_leading_rows`, and parallelizes ingestion. This avoids the limitations of UI uploads and the overhead of streaming or scheduled transfers.

Exam trap

The trap here is choosing streaming or the web UI for a large file; batch loading from Cloud Storage is the recommended approach for bulk data.

21
Multi-Selecteasy

A data engineer is using Vertex AI Workbench to develop a custom ML model. They want to store and version datasets, track experiments, and register models. Which three Vertex AI services should they use? (Choose THREE)

Select 3 answers
A.Vertex AI Model Registry
B.Vertex AI Dataset
C.Vertex AI Feature Store
D.Vertex AI Matching Engine
E.Vertex AI Experiments
AnswersA, B, E

Vertex AI Model Registry provides a centralised repository for managing model versions, storing artefacts, and tracking lineage. It satisfies the requirement to register models by assigning each trained model a versioned entry with metadata, enabling deployment and monitoring. Combined with Datasets and Experiments, it completes the MLOps workflow the engineer needs.

Why this answer

Vertex AI Model Registry (A) is correct because it provides a central repository to manage the lifecycle of ML models, including versioning, tracking lineage, and deploying models to endpoints, which directly satisfies the requirement to register models. Vertex AI Dataset (B) is correct because it lets the engineer create managed, versioned datasets from tabular, image, text, or video data, fulfilling the need to store and version datasets. Vertex AI Experiments (E) is correct because it records and compares experiment runs, including parameters, metrics, and artifacts, which satisfies the requirement to track experiments.

Vertex AI Feature Store (C) is not appropriate here because it is designed for serving and sharing online/offline feature values, not for dataset versioning, experiment tracking, or model registration. Vertex AI Matching Engine (D) is also not appropriate because it is a vector similarity search service for embeddings, unrelated to the requested dataset, experiment, and model management tasks.

Exam trap

PDE often tests the specific purpose of each Vertex AI service; candidates might confuse Feature Store with Dataset or Matching Engine with Model Registry.

22
MCQeasy

You are loading a CSV file into BigQuery. The file has a column `price` that contains values like `$1,234.56`. You want to load it into a NUMERIC column. What should you do?

A.Use the `--null_marker` option to treat the dollar sign as null.
B.Specify the schema with `price` as a NUMERIC and set the `--allow_quoted_newlines` option.
C.Preprocess the CSV file to remove the dollar signs and commas before loading, or use a transformation in a data pipeline.
D.Load the data as a STRING and then use a CAST to NUMERIC in a query to create a new table.
AnswerC

BigQuery's load job expects numeric columns to contain plain numbers without currency symbols or thousands separators. The safest approach is to clean the data before loading, either by editing the CSV or using a tool like Cloud Dataflow or Dataprep to transform the values. Alternatively, you can load as STRING and then transform in BigQuery, but preprocessing is often simpler. This ensures the load succeeds without errors.

Why this answer

BigQuery requires numeric columns to contain plain numeric values without formatting characters. To load a CSV with values like `$1,234.56` into a NUMERIC column, you must remove the dollar signs and commas, either by preprocessing the file or using a data transformation step. Options that suggest loading as-is or using unrelated options will fail.

Exam trap

The trap here is assuming BigQuery can automatically parse currency-formatted strings into numbers, when it requires clean numeric input.

23
MCQmedium

A machine learning engineer needs to deploy a custom TensorFlow model for online predictions with low latency. The model is already trained and saved in SavedModel format. Which Vertex AI service should they use?

A.Vertex AI Workbench
B.Vertex AI Prediction
C.Vertex AI Feature Store
D.Vertex AI AutoML
AnswerB

Vertex AI Prediction deploys the SavedModel to an endpoint serving online predictions with low latency, satisfying the stem's requirement. Unlike batch prediction, it provisions a persistent endpoint for real-time inference, and unlike custom training, it consumes the already-trained artefact directly without retraining.

Why this answer

Vertex AI Prediction allows you to deploy custom models (including TensorFlow SavedModel) to an endpoint for online predictions. It supports autoscaling and low-latency serving.

24
MCQhard

Your team uses Looker to develop a model on top of BigQuery. The data is partitioned by ingestion time, and analysts frequently query the last 7 days. However, Looker queries are scanning the entire table, causing high costs. Which change should you implement?

A.Enable BI Engine on the BigQuery table to accelerate queries.
B.Apply a LookML access_filter to dynamically filter on the partition column.
C.Create a materialized view that aggregates data daily and point Looker to that view.
D.Use clustering on the order_date column to improve query performance.
AnswerB

Access filters in LookML can be used to restrict queries to a specific partition range, reducing full table scans.

Why this answer

The single best approach is to apply a partition filter requirement in LookML and enable partition pruning in BigQuery. Other options are not directly about Looker or are suboptimal.

Exam trap

The question initially stated 'Pick two' but then contradicted itself, potentially confusing candidates. The correct answer is a single best approach.

25
Multi-Selecthard

You are designing a BigQuery table to store clickstream events. Queries will frequently filter by a user_id column and a TIMESTAMP column named event_time, and the table will grow to several petabytes. You want to minimize bytes scanned and cost for these queries. Which TWO actions should you take? (Choose two.)

Select 2 answers
A.Create a materialized view that pre-aggregates events by user_id and event_time, and query the view instead of the base table.
B.Partition the table by the DATE of event_time using time-unit partitioning, and require queries to include a filter on event_time.
C.Set the table's expiration time to 30 days so that older partitions are automatically deleted, reducing the data volume.
D.Cluster the table on the user_id column so that queries filtering on user_id scan only the relevant blocks within each partition.
E.Enable the BigQuery BI Engine reservation and route all queries through it to cache results in memory.
AnswersB, D

Partitioning by event_time allows BigQuery to prune partitions when queries filter on that column, dramatically reducing bytes scanned. Requiring a partition filter prevents accidental full-table scans. This is the primary cost-control mechanism for large time-series tables and directly addresses the frequent event_time filters.

Why this answer

For a petabyte-scale clickstream table filtered by event_time and user_id, partitioning on event_time enables partition pruning, and clustering on user_id enables block-level pruning within partitions. Together they minimize bytes scanned. Materialized views, table expiration, and BI Engine do not provide the same structural cost reduction for arbitrary filters.

Exam trap

The trap here is treating BI Engine or materialized views as general-purpose cost reducers, when they only accelerate specific cached or aggregated query patterns and do not replace partitioning and clustering.

26
MCQmedium

You need to create a time-series forecast for inventory demand using BigQuery ML. The data includes daily sales for 5 years. Which model type should you use?

A.K-means
B.Linear regression
C.ARIMA_PLUS
D.Matrix factorization
AnswerC

ARIMA_PLUS handles seasonality, trends and holiday effects automatically, which suits five years of daily sales data containing weekly and yearly patterns. It also supports forecasting directly in BigQuery ML without exporting data, satisfying the requirement to build a time-series forecast for inventory demand.

Why this answer

BigQuery ML supports ARIMA_PLUS for time-series forecasting. Linear regression, k-means, and matrix factorization are not appropriate for time-series forecasting.

27
MCQhard

Your company ingests streaming data into BigQuery using the Storage Write API. You need to ensure that duplicate records are not inserted when the streaming job retries due to transient errors. Which feature should you use?

A.Use the Storage Write API's exactly-once semantics by setting a stream name and offset.
B.Create a unique constraint on the destination table to reject duplicate rows.
C.Enable BigQuery's streaming inserts with insertId to deduplicate records.
D.Use a MERGE statement to upsert records after each streaming batch.
AnswerA

The Storage Write API provides exactly-once delivery semantics when you use a stream name and specify offsets for each record. This ensures that retried records are not duplicated. It is designed for high-throughput streaming and supports deduplication natively, making it the correct choice for preventing duplicates on retries.

Why this answer

The Storage Write API's exactly-once semantics, enabled by specifying a stream name and offsets, guarantee that records are not duplicated even if the writer retries. This is the only option that provides native deduplication for streaming inserts. Other methods either do not apply to the Storage Write API or are not supported in BigQuery.

Exam trap

The trap here is confusing the legacy streaming API's insertId deduplication with the Storage Write API's exactly-once semantics.

28
MCQmedium

You need to split a time-series dataset into training and evaluation sets for a forecasting model. The data is ordered by timestamp. Which splitting technique should you use?

A.Sequential split where training data precedes evaluation data in time.
B.Use k-fold cross-validation with random folds.
C.Stratified split based on the target variable.
D.Random split with 80% training, 20% evaluation.
AnswerA

A sequential split keeps all training observations earlier in time than evaluation observations, preserving temporal order. This satisfies the forecasting constraint, since random splitting would leak future information into training and produce misleadingly optimistic evaluation metrics.

Why this answer

For time-series forecasting, the training set must only contain data that occurs before the evaluation set to prevent data leakage from the future into the past. A sequential split preserves the temporal order, ensuring the model is trained on historical data and evaluated on subsequent, unseen future data. This mimics real-world forecasting where you predict future values based on past observations.

Random or stratified splits violate this principle by allowing future data points to influence training, leading to overly optimistic performance estimates.

Exam trap

PDE often tests the misconception that standard cross-validation techniques (like k-fold or random split) are universally applicable, but for time-series data, they cause data leakage and invalidate the evaluation.

How to eliminate wrong answers

Option B is wrong because k-fold cross-validation with random folds shuffles the data, breaking temporal dependencies and causing data leakage; it is suitable for i.i.d. data, not time series. Option C is wrong because stratified splitting based on the target variable is designed for classification tasks with imbalanced classes, not for time-series forecasting where the target is continuous and order matters. Option D is wrong because a random split ignores the temporal ordering, allowing the model to train on future data and evaluate on past data, which is invalid for forecasting.

29
MCQmedium

Your team stores raw JSON event logs in Cloud Storage. Analysts need to run ad-hoc SQL queries on this data with minimal setup and cost, but they also require the ability to join it with existing BigQuery tables. Which approach should you recommend?

A.Create an external table in BigQuery that points to the Cloud Storage JSON files, and query it using standard SQL.
B.Load the JSON files into a new BigQuery table using the bq load command with --autodetect, then query the table directly.
C.Use Cloud Dataflow to read the JSON files, transform them, and write the results to BigQuery for querying.
D.Import the JSON files into Google Sheets and use the BigQuery data connector to join with BigQuery tables.
AnswerA

BigQuery external tables allow querying data directly from Cloud Storage without loading, providing minimal setup and no storage cost in BigQuery. They support standard SQL and can be joined with native BigQuery tables. This matches the requirement for ad-hoc queries with minimal cost and setup.

Why this answer

Querying external data in Cloud Storage via BigQuery external tables provides a serverless, cost-effective way to run ad-hoc SQL without loading data. It supports joins with native BigQuery tables, fulfilling the requirement. Other options involve data movement or unsuitable tools, adding cost and complexity.

Exam trap

The trap here is assuming that data must be loaded into BigQuery before it can be joined with existing tables.

30
MCQhard

You are designing a BigQuery schema for a table that will store user profile data. The data includes a unique user ID, a list of email addresses (each with a type and address), and a timestamp of last update. You need to support efficient queries that retrieve all email addresses for a given user and also filter users by email type. Which schema design should you use?

A.Store emails as a single STRING column with a delimiter, and use SPLIT and REGEXP_CONTAINS to query.
B.Store emails as a repeated RECORD with fields 'type' and 'address' within the user table, using dot notation and UNNEST to query.
C.Store emails as a JSON STRING column and use JSON functions to extract values.
D.Create a separate table for emails with a foreign key to the user table, and join when needed.
AnswerB

A repeated RECORD allows storing multiple emails per user while preserving the nested structure. Queries can use UNNEST to flatten the array and filter by email type, and dot notation to access fields. This denormalized approach is efficient in BigQuery, avoiding joins and enabling fast retrieval of all emails for a user.

Why this answer

Using a repeated RECORD for emails allows BigQuery to store multiple emails per user with type and address fields. Queries can UNNEST the array to filter by email type and use dot notation to access fields. This denormalized design is efficient, avoids joins, and aligns with BigQuery's strengths for nested data.

Exam trap

The trap here is normalizing into separate tables, which is common in relational databases but can degrade performance in BigQuery due to joins and increased data shuffling.

31
MCQmedium

You are building a data pipeline that ingests JSON files from Cloud Storage into BigQuery. The JSON files contain deeply nested arrays and objects. You need to load these files with minimal transformation so that analysts can query individual nested fields using dot notation and also unnest arrays when needed. Which approach should you use?

A.First load the JSON files into a Cloud SQL PostgreSQL instance, then use federated queries to access the data from BigQuery.
B.Load the JSON files into BigQuery with a schema that defines nested fields as RECORD and arrays as REPEATED, allowing queries to reference nested fields with dot notation and use UNNEST for arrays.
C.Convert the JSON files to CSV using a Dataflow pipeline that flattens all arrays, then load the CSV into BigQuery.
D.Load the JSON files into BigQuery using the autodetect schema option, which will automatically flatten all nested structures into separate columns.
AnswerB

BigQuery natively supports nested and repeated fields via RECORD and REPEATED types. When JSON is loaded with such a schema, nested objects become RECORDs and arrays become REPEATED fields. Analysts can then use dot notation to access nested fields and UNNEST to flatten arrays in queries, meeting the requirement without transformation.

Why this answer

BigQuery supports semi-structured data through nested and repeated fields. Defining nested objects as RECORD and arrays as REPEATED preserves the original structure, enabling dot notation for nested fields and UNNEST for arrays. This avoids flattening during load, aligning with minimal transformation and providing flexible query capabilities.

Exam trap

The trap here is assuming that BigQuery automatically flattens nested JSON during load, when in fact it preserves nested structures as RECORD and REPEATED types if the schema is defined accordingly.

32
MCQmedium

A data scientist wants to train a custom TensorFlow model on Vertex AI using a managed Jupyter notebook. Which Vertex AI service should they use to set up a notebook environment with pre-installed deep learning frameworks?

A.Compute Engine with Deep Learning VM
B.Vertex AI Training via custom job
C.Vertex AI Workbench
D.Vertex AI Pipelines
AnswerC

Vertex AI Workbench provides managed JupyterLab notebook instances with pre-installed deep learning frameworks such as TensorFlow and PyTorch, plus optional GPU accelerators. This satisfies the requirement for a managed notebook environment ready for custom TensorFlow training without manual framework installation.

Why this answer

Vertex AI Workbench provides managed Jupyter notebooks with pre-installed deep learning frameworks (TensorFlow, PyTorch, etc.) and easy scaling options. Notebooks on Compute Engine would require manual setup. AI Platform Training is for training jobs, not interactive notebooks.

Vertex AI Pipelines is for orchestrating ML workflows.

33
MCQeasy

Which BigQuery SQL function can be used to get an approximate count of distinct values in a large column faster than COUNT(DISTINCT) with lower accuracy?

A.APPROX_QUANTILES
B.COUNT(DISTINCT)
C.APPROX_COUNT_DISTINCT
D.DISTINCT_COUNT
AnswerC

APPROX_COUNT_DISTINCT uses HyperLogLog++ sketches to estimate cardinality, scanning far less data than COUNT(DISTINCT)'s exact deduplication. This satisfies the stem's demand for faster approximate distinct counts on large columns, trading a small, bounded error rate for substantially reduced query cost and latency.

Why this answer

APPROX_COUNT_DISTINCT is a BigQuery function that returns an approximate count of distinct values using a HyperLogLog++ algorithm. It is significantly faster and uses far fewer resources than COUNT(DISTINCT) on large datasets, at the cost of a small statistical error (typically under 1%). This matches the requirement for a faster, lower-accuracy distinct count.

Exam trap

The trap is a fabricated-sounding option (DISTINCT_COUNT) that mimics the correct function name, plus the presence of the exact COUNT(DISTINCT) the question says to avoid — candidates must recognize the real BigQuery function name.

How to eliminate wrong answers

Option A is wrong because APPROX_QUANTILES returns approximate quantile boundaries (e.g., median, percentiles) for a column, not a count of distinct values. Option B is wrong because COUNT(DISTINCT) is the exact, resource-intensive method the question explicitly wants to avoid due to speed and cost. Option D is wrong because DISTINCT_COUNT is not a valid BigQuery function — it is a fabricated name that resembles the correct answer but does not exist in the BigQuery SQL reference.

34
MCQeasy

You want to train a custom TensorFlow model on Vertex AI using a managed Jupyter notebook environment. Which service should you use?

A.Vertex AI Workbench
B.Cloud Datalab
C.Vertex AI Training
D.AI Platform Notebooks
AnswerA

Vertex AI Workbench provides managed Jupyter notebook instances with native integration into Vertex AI training, letting you author and launch custom TensorFlow training jobs from the same environment. It satisfies the managed notebook constraint without provisioning or patching your own compute.

Why this answer

Vertex AI Workbench is Google Cloud's managed Jupyter notebook environment integrated with Vertex AI, allowing you to develop and train custom TensorFlow models directly. It provides pre-built containers, GPU support, and seamless integration with Vertex AI Training and Pipelines.

Exam trap

PDE often tests the rebranding of AI Platform Notebooks to Vertex AI Workbench; candidates may pick the outdated name or confuse the notebook environment with the training service.

How to eliminate wrong answers

Option B is wrong because Cloud Datalab is a deprecated, older notebook service not integrated with Vertex AI's modern training workflows. Option C is wrong because Vertex AI Training is a service for running training jobs, not a managed notebook environment for interactive development. Option D is wrong because AI Platform Notebooks was the predecessor to Vertex AI Workbench and has been rebranded/replaced; it is no longer the current service name.

35
MCQmedium

You are using Looker to model data from BigQuery. You have a dimension that should be filtered by a user attribute (e.g., user's region). Which LookML concept allows you to apply dynamic row-level security based on user attributes?

A.Custom field
B.Derived table
C.Access filter
D.Required access grant
AnswerC

An access filter applies a user attribute to a dimension or field, restricting each user's query results to rows matching their attribute value. This delivers dynamic row-level security in Looker without duplicating models per region.

Why this answer

Access filters in LookML allow you to apply row-level security by referencing user attributes, which are values passed from the Looker user's account or via SSO. By using an access filter on a dimension, you can dynamically restrict the data a user sees based on their attribute (e.g., region), ensuring they only view rows matching their assigned region. This is the standard LookML mechanism for dynamic row-level security.

Exam trap

PDE often tests the distinction between modeling constructs (derived tables, custom fields) and security constructs (access filters) — candidates pick derived tables thinking they can embed security logic, but derived tables are for data transformation, not dynamic user-based filtering.

How to eliminate wrong answers

Option A is wrong because a custom field is a user-defined dimension or measure created in the Looker UI or LookML for ad-hoc analysis, not a security mechanism for row-level filtering. Option B is wrong because a derived table is a LookML construct that defines a subquery or SQL-based table for modeling purposes, not a security feature for applying user-attribute-based filters. Option D is wrong because 'required access grant' is not a valid LookML concept — the correct term for row-level security in Looker is access filter (or access_grant in some contexts, but the standard term is access filter).

36
MCQeasy

You need to create a Looker model that defines a 'sales' view based on a BigQuery table, with a measure for total revenue. Which LookML object defines the table and dimensions?

A.explore
B.view
C.model
D.dimension
AnswerB

The view object maps a LookML view to an underlying BigQuery table and declares its dimensions and measures, including total revenue. It satisfies the requirement to define the table structure and the revenue measure in one reusable object.

Why this answer

In LookML, a view defines the underlying database table and contains its dimensions (columns) and measures (aggregations like total revenue). The view is the fundamental building block that maps a physical table to a logical set of fields, and it is referenced by explores to make those fields queryable.

Exam trap

PDE often tests the confusion between view and explore — candidates who think the explore defines the table pick A, not realizing the view is where sql_table_name and dimensions live.

How to eliminate wrong answers

Option A is wrong because an explore defines the queryable join graph and the user-facing interface, not the table mapping or field definitions. Option C is wrong because a model is a container that groups explores and defines connection and access settings, not the table or its dimensions. Option D is wrong because a dimension defines a single column or derived field within a view — it is a component of a view, not the object that defines the table itself.

37
MCQhard

You are designing a Dataflow pipeline that reads from a Cloud Storage bucket containing thousands of small JSON files, transforms the data, and writes to BigQuery. The pipeline is slow and expensive because of the large number of small files. You want to improve throughput and reduce cost. What should you do?

A.Use the FileIO transform with a match pattern and enable the `withHintMatchesManyFiles` option to optimize reading many small files.
B.Increase the number of Dataflow workers and set the autoscaling algorithm to THROUGHPUT_BASED to handle the small files in parallel.
C.Preprocess the data outside Dataflow to combine the small files into larger files (e.g., 100-500 MB each) in Cloud Storage, then run the Dataflow pipeline on the consolidated files.
D.Switch the pipeline to use the BigQuery Storage Read API to read the JSON files directly, bypassing Cloud Storage.
AnswerC

Consolidating small files into larger ones reduces the number of read operations and metadata overhead, which is the primary cause of slowness. Dataflow can then read each large file efficiently, improving throughput and lowering cost. This is the recommended pattern for many small files.

Why this answer

The bottleneck with thousands of small files is the per-file read and metadata overhead. Combining them into larger files before the Dataflow run reduces the number of reads and improves throughput. Increasing workers or using FileIO hints does not address the root cause, and the Storage Read API is for BigQuery tables, not Cloud Storage files.

Exam trap

The trap here is assuming that adding workers or using FileIO hints will fix small-file inefficiency, when the real fix is reducing the number of files by compaction.

38
MCQeasy

You need to track the lineage of data in BigQuery, showing how tables are derived from other tables via queries. Which service provides this capability?

A.BigQuery Lineage API
B.Cloud Composer
C.Cloud Data Catalog
D.Dataflow
AnswerA

The BigQuery Lineage API exposes column- and table-level lineage captured from query jobs, tracing how each table is derived from upstream tables. This directly satisfies the requirement to track derivation lineage, unlike Dataplex or Data Catalog, which handle discovery and governance metadata.

Why this answer

The BigQuery Lineage API provides programmatic access to lineage information, showing how tables are derived from other tables through queries, including column-level lineage. It captures dependencies from SQL queries, scheduled queries, and other BigQuery operations.

Exam trap

PDE often tests the confusion between Data Catalog (metadata discovery) and the Lineage API (derivation tracking) — candidates who equate 'catalog' with 'lineage' pick C.

How to eliminate wrong answers

Option B is wrong because Cloud Composer is a managed Apache Airflow service for workflow orchestration — it schedules jobs but does not track data lineage between BigQuery tables. Option C is wrong because Cloud Data Catalog (now Dataplex Universal Catalog) is a metadata management service for discovery and tagging, not a lineage tracking API for table derivation. Option D is wrong because Dataflow is a stream and batch processing service for building pipelines, not a lineage tracking system.

39
MCQhard

You have a BigQuery table `sales` with columns `order_id`, `customer_id`, `order_date` (DATE), and `amount` (NUMERIC). You need to create a new table that contains, for each customer, the total sales amount and the date of their most recent order. The result should include `customer_id`, `total_amount`, and `last_order_date`. Which SQL query achieves this correctly?

A.SELECT customer_id, SUM(amount) AS total_amount, order_date AS last_order_date FROM `project.dataset.sales` GROUP BY customer_id, order_date
B.SELECT customer_id, SUM(amount) AS total_amount, MAX(order_date) AS last_order_date FROM `project.dataset.sales` GROUP BY customer_id
C.SELECT customer_id, SUM(amount) AS total_amount, LAST_VALUE(order_date) AS last_order_date FROM `project.dataset.sales` GROUP BY customer_id
D.SELECT customer_id, SUM(amount) AS total_amount, MAX(order_date) OVER (PARTITION BY customer_id) AS last_order_date FROM `project.dataset.sales`
AnswerB

This query groups by `customer_id` and uses SUM to aggregate total sales and MAX to find the most recent order date. It correctly produces one row per customer with the desired columns. The GROUP BY clause ensures aggregation per customer, and the aggregate functions operate on the appropriate columns. This is the standard and efficient way to compute such per-customer metrics in BigQuery.

Why this answer

To compute per-customer aggregates, you use GROUP BY on `customer_id` and aggregate functions SUM and MAX. The SUM function totals the amounts, and MAX retrieves the latest order date. Other approaches using window functions or incorrect grouping do not produce the required single-row-per-customer result.

The correct query is straightforward and uses standard SQL aggregation.

Exam trap

The trap here is confusing window functions like LAST_VALUE with aggregate functions, or incorrectly grouping by order_date and producing multiple rows per customer.

40
MCQeasy

You are ingesting streaming data into BigQuery using the Storage Write API. The data arrives with occasional duplicate records due to at-least-once delivery semantics from the source system. You need to ensure that the final BigQuery table contains no duplicates based on a unique event_id column. Which approach should you use?

A.Use the Storage Write API with application-created streams and specify a unique offset for each record to enable exactly-once semantics.
B.Enable the exactly-once delivery semantics in the Storage Write API by using the default stream and specifying a unique offset for each record.
C.Use BigQuery's MERGE statement to upsert records into the table based on event_id, running it periodically to deduplicate.
D.Create a unique constraint on the event_id column in the BigQuery table to automatically reject duplicates.
AnswerA

The Storage Write API supports exactly-once semantics when using application-created streams. By assigning a unique offset to each record within a stream, BigQuery can deduplicate records on write. This ensures that even if the client retries, duplicates are not inserted. This is the recommended approach for streaming ingestion with deduplication requirements. It provides low-latency, exactly-once delivery without additional batch processing.

Why this answer

To achieve exactly-once semantics with the Storage Write API, you must use application-created streams and assign a unique offset to each record. This allows BigQuery to deduplicate records on write, ensuring no duplicates even with retries. The default stream does not provide exactly-once semantics, and BigQuery lacks unique constraints.

MERGE is a batch alternative but not ideal for streaming.

Exam trap

The trap here is assuming that the Storage Write API's default stream or a unique constraint can provide deduplication, when in fact exactly-once requires application-created streams with offsets.

41
MCQeasy

A financial services firm stores customer transaction data in a BigQuery table. The table contains a column `customer_id` that is frequently used in WHERE clauses, but the table is not partitioned. Queries filtering on a specific `customer_id` scan the entire table, which is large and costly. The data engineer wants to reduce the bytes scanned for these queries without changing the table's partitioning scheme. What should the engineer do?

A.Enable the `require_partition_filter` option on the table and add a partition on a date column.
B.Create a materialized view that selects all columns and filters on `customer_id`.
C.Add a partition on `customer_id` using a CREATE TABLE ... PARTITION BY customer_id statement.
D.Create a clustered table on `customer_id` by using a CREATE TABLE ... CLUSTER BY customer_id statement and loading the data into it.
AnswerD

Clustering sorts the data by the specified column and stores it in blocks, allowing BigQuery to prune unnecessary blocks when a query filters on that column. This reduces the bytes scanned and improves performance for queries that filter on `customer_id`. Since the table is not partitioned, clustering is the appropriate technique to achieve the goal without altering the partitioning scheme.

Why this answer

Clustering on `customer_id` organizes the table data so that BigQuery can skip blocks that do not contain the requested customer ID, thereby reducing bytes scanned and improving query performance. Partitioning is not suitable for a high-cardinality identifier like `customer_id`, and materialized views or partition filters do not address the specific need. Clustering is the correct technique for optimizing filters on a non-partitioned table.

Exam trap

The trap here is confusing clustering with partitioning, and assuming that any column can be used as a partition key, when in fact partitioning is limited to date/timestamp or integer range columns and high-cardinality columns like customer_id are best suited for clustering.

42
MCQhard

You are preparing data in BigQuery for analysis. You have a table `orders` with columns `order_id`, `customer_id`, `order_date`, and `amount`. You need to create a new table that includes all orders, plus a column `prev_order_amount` that contains the amount of the customer's previous order by `order_date`. If there is no previous order, the value should be NULL. Which SQL feature should you use?

A.Use the LAG window function partitioned by `customer_id` and ordered by `order_date`.
B.Use the LEAD window function partitioned by `customer_id` and ordered by `order_date`.
C.Use a self-join on `customer_id` where the previous order date is the maximum order date less than the current order date.
D.Use the FIRST_VALUE window function partitioned by `customer_id` and ordered by `order_date`.
AnswerA

The LAG window function accesses data from a previous row in the same result set without the need for a self-join. Partitioning by `customer_id` ensures that the previous order is for the same customer, and ordering by `order_date` defines the sequence. LAG(amount) OVER (PARTITION BY customer_id ORDER BY order_date) returns the amount of the previous order, or NULL if there is no previous row. This is the most efficient and readable solution.

Why this answer

The LAG window function is designed to access a previous row's value within a partition. By partitioning by customer and ordering by order date, it returns the amount of the customer's previous order. This is efficient and avoids self-joins.

Other window functions like LEAD look forward, and FIRST_VALUE returns the first value in the partition, not the previous row.

Exam trap

The trap here is confusing LAG with LEAD, or thinking a self-join is necessary for previous-row access, when window functions are the intended solution.

43
MCQhard

You are migrating a large on-premises data warehouse to BigQuery. The data includes sensitive PII columns that must be masked for certain users. Which BigQuery feature can automatically redact PII in query results based on user roles?

A.IAM conditions on tables
B.Authorized views
C.Column-level security with data masking
D.Cloud DLP API
AnswerC

Column-level security with data masking attaches policy tags to sensitive PII columns, so BigQuery automatically redacts or hashes those values in query results for users lacking the required role, satisfying the masking requirement without rewriting queries.

Why this answer

BigQuery column-level security with data masking (also called dynamic data masking) lets you attach policy tags to specific columns and define masking rules that automatically redact values in query results based on the querying user's IAM roles. Users without the fine-grained reader role see masked values (e.g., hashed or null), while authorized users see the real data — all without changing the query. This is the native BigQuery feature designed for exactly this PII-redaction use case.

Exam trap

The trap is confusing Cloud DLP (a data discovery and de-identification service) with BigQuery's native column-level security and dynamic data masking, which is the feature that redacts query results based on user roles at query time.

How to eliminate wrong answers

Option A is wrong because IAM conditions on tables control who can access the table at all, not how individual columns are masked in results — they are coarse-grained access control. Option B is wrong because authorized views require you to create and maintain separate views for each access pattern and do not automatically redact PII based on roles. Option D is wrong because Cloud DLP API is a separate service for discovering, classifying, and de-identifying sensitive data (e.g., during ETL or via DLP jobs), but it does not automatically redact query results based on user roles at query time.

44
Multi-Selectmedium

A data scientist wants to use Vertex AI Workbench for exploratory data analysis. Which TWO statements are true about Vertex AI Workbench?

Select 2 answers
A.It is a serverless service that scales to zero when not in use.
B.It supports custom container images for the notebook environment.
C.It can only be used with TensorFlow.
D.It provides a managed JupyterLab environment with pre-installed ML libraries.
E.It includes a built-in SQL query editor for BigQuery.
AnswersB, D

Custom container images let the notebook instance run with bespoke dependencies, frameworks or system packages beyond the default image. This satisfies reproducibility and version-pinning needs during exploratory data analysis when specific library builds are required.

Why this answer

Option B is correct because Vertex AI Workbench instances let you specify a custom container image for the notebook environment, so you can bring your own dependencies and tooling rather than being limited to the default image. Option D is correct because Vertex AI Workbench provides a managed JupyterLab environment with pre-installed ML libraries (such as TensorFlow, PyTorch, and scikit-learn), which is exactly what a data scientist needs for exploratory data analysis. Option A is incorrect because Workbench instances are user-managed VMs that do not scale to zero; they keep running (and incurring cost) until stopped.

Option C is incorrect because Workbench supports multiple frameworks and languages, not only TensorFlow. Option E is incorrect because a built-in SQL query editor for BigQuery is a feature of BigQuery and other tools, not a defining capability of Vertex AI Workbench.

Exam trap

PDE often tests the distinction between serverless and managed services, so the trap is assuming Workbench scales to zero like Cloud Functions, when it actually runs on persistent VMs.

45
Multi-Selecthard

A data analyst wants to compute the rank of sales per region and also the difference in sales between consecutive months for each region. Which BigQuery analytic functions should they use? (Select TWO)

Select 2 answers
A.RANK()
B.ROW_NUMBER()
C.LAG()
D.LEAD()
E.NTILE()
AnswersA, C

RANK() is a navigation function that assigns a rank to each row within a partition, ordered by a specified expression. Partitioning by region and ordering by sales yields per-region sales rankings, satisfying the ranking half of the requirement; a separate function handles consecutive-month differences.

Why this answer

RANK() (option A) is correct because it assigns a rank to each row within a partition ordered by sales, with tied sales values receiving the same rank and subsequent ranks skipped, which directly satisfies the requirement to compute the rank of sales per region. LAG() (option C) is correct because it accesses the value of sales from the preceding row within the same region partition ordered by month, allowing the analyst to compute the difference in sales between consecutive months. ROW_NUMBER() (option B) is not appropriate here because it assigns unique sequential numbers even for tied sales values, which does not produce a true rank.

LEAD() (option D) looks forward to the next row rather than backward, so it would not give the previous month's sales for a consecutive-month difference. NTILE() (option E) divides rows into a specified number of buckets, which is unrelated to ranking sales or computing month-over-month differences.

46
MCQeasy

You need to load a large CSV file from Cloud Storage into BigQuery. The file contains a header row and is comma-delimited. You want to ensure that the header row is skipped and that the schema is automatically detected. Which BigQuery load option should you use?

A.Set skip_leading_rows to 1 and autodetect to true.
B.Set allow_jagged_rows to true and ignore_unknown_values to true.
C.Set field_delimiter to '\t' and skip_leading_rows to 0.
D.Set max_bad_records to 1 and autodetect to false.
AnswerA

Setting skip_leading_rows to 1 tells BigQuery to ignore the first row (the header). Enabling autodetect allows BigQuery to infer the schema from the data. This combination is ideal for CSV files with headers when you don't want to manually define the schema. It is a common practice for loading external data efficiently.

Why this answer

To load a CSV with a header row and automatically detect the schema, you should use skip_leading_rows=1 to skip the header and autodetect=true to infer the schema. These options are part of the load job configuration in BigQuery. They streamline the loading process and reduce manual schema definition.

Exam trap

The trap here is confusing options that handle malformed data with those that manage headers and schema detection.

47
MCQmedium

A financial analytics team uses Looker to explore BigQuery data. They need to allow business users to filter by a custom date range that is not tied to an existing dimension. The date range must be user-input at query time. What is the best approach in Looker?

A.Create an explore with a custom filter field in the Looker UI
B.Use a filter parameter directly on the date dimension
C.Add a dimension with a yesno filter that toggles the date range
D.Create a parameter in LookML using Liquid templating
AnswerD

A LookML parameter with Liquid templating injects a user-supplied value into the generated SQL at query time, letting business users enter an arbitrary date range not bound to any existing dimension. This satisfies the stem's user-input-at-query-time constraint.

Why this answer

Creating a parameter in LookML using Liquid templating allows business users to input a custom date range at query time. Parameters are user-input fields that can be referenced in SQL queries via Liquid, enabling dynamic filtering. This is the most flexible approach for ad-hoc date ranges not tied to existing dimensions.

Exam trap

PDE often tests Looker customization, and candidates might think UI-based filters suffice, but for arbitrary user input, LookML parameters with Liquid are required.

How to eliminate wrong answers

Option A is wrong because a custom filter field in the Looker UI is typically based on existing dimensions and cannot easily accept arbitrary date ranges without a parameter. Option B is wrong because a filter parameter directly on a date dimension is not a standard Looker feature; parameters are defined in LookML. Option C is wrong because a yesno filter toggles a predefined condition, not a custom date range.

48
MCQhard

A data scientist is training a binary classification model on an imbalanced dataset (95% negative, 5% positive) using AutoML Tables. Which strategy should they use to handle the class imbalance?

A.Set the budget to a higher value to allow more training on minority class.
B.Use SMOTE in a Dataflow pipeline before importing the data to AutoML Tables.
C.Specify a weight column with higher weights for positive examples in the dataset.
D.Create duplicate copies of the positive class rows to balance the dataset.
AnswerC

A weight column lets AutoML Tables apply per-row loss multipliers, so positive examples at 5% prevalence can contribute proportionally more during training. This directly addresses the stem's imbalance constraint without resampling, preserving all 95% negative rows while preventing the model from defaulting to the majority class.

Why this answer

AutoML Tables supports a weight column that lets you assign higher importance to specific rows during training. By giving positive examples (the 5% minority class) higher weights, the model's loss function penalizes misclassification of the minority class more heavily, effectively rebalancing the learning signal without altering the dataset. This is the native, supported mechanism in AutoML Tables for handling class imbalance.

Exam trap

PDE often tests whether candidates know that AutoML Tables has a built-in weight column for class imbalance, rather than assuming external techniques like SMOTE or duplication are required.

How to eliminate wrong answers

Option A is wrong because increasing the training budget only extends training time and does not change how the model weights errors across classes, so the imbalance remains unaddressed. Option B is wrong because SMOTE must be applied outside AutoML Tables (e.g., in a Dataflow pipeline), but AutoML Tables does not natively integrate SMOTE and the recommended approach is to use the built-in weight column rather than synthetic oversampling. Option D is wrong because duplicating positive rows is a manual oversampling technique that inflates the dataset, risks overfitting to duplicated examples, and is unnecessary when the weight column provides the same effect more cleanly.

49
MCQmedium

A company uses Looker Studio to create dashboards from BigQuery data. They notice that dashboard queries take several seconds to load. They want to improve performance without changing the underlying data or creating materialized views. Which option should they use?

A.Enable BigQuery BI Engine for the project
B.Increase the number of BigQuery slots
C.Switch to Looker instead of Looker Studio
D.Replicate the data to Cloud SQL for faster queries
AnswerA

BI Engine is an in-memory analysis layer that caches BigQuery data and accelerates dashboard queries, requiring no changes to the underlying tables or materialised views. Enabling it for the project directly reduces the several-second load times observed in Looker Studio.

Why this answer

BigQuery BI Engine is an in-memory analysis service that accelerates queries from Looker Studio (and other BI tools) by caching data in memory, significantly reducing latency. Replicating data to Cloud SQL would add complexity and may not handle the volume. Using Looker instead of Looker Studio doesn't inherently speed up queries.

Increasing BigQuery slots would help but is more expensive and not as targeted for BI tools.

50
MCQmedium

Your team uses Cloud Dataflow to stream events from Pub/Sub into BigQuery. Some events arrive late, up to 10 minutes after their event timestamp. You need the pipeline to produce correct aggregations per 5-minute window, including late data, while keeping latency low for on-time events. What should you do?

A.Set the pipeline's default expansion service to use the BigQuery Storage Write API and enable exactly-once semantics for the sink.
B.Set the windowing strategy to fixed windows of 5 minutes and configure allowed lateness to 10 minutes with a trigger that emits early results and updates them on late arrivals.
C.Configure the Pub/Sub subscription to have a 10-minute acknowledgment deadline and increase the Dataflow worker count to handle the backlog.
D.Use a global window with a repeating trigger every 5 minutes and set the accumulation mode to DISCARDING.
AnswerB

Allowed lateness tells Dataflow to keep window state for 10 minutes after the watermark passes, so late events are included. Using early triggers provides low-latency partial results, and late triggers update them. This satisfies both correctness for late data and low latency for on-time events.

Why this answer

To correctly aggregate late events in Dataflow, you must use event-time windows with allowed lateness so state is retained for late arrivals, and triggers to emit early and updated results. Sink configuration and subscription settings do not affect windowing semantics.

Exam trap

The trap here is confusing Pub/Sub acknowledgment deadlines or sink exactly-once settings with Dataflow windowing semantics, which are separate concerns.

51
MCQhard

You have a BigQuery table 'logs' with a column 'timestamp' of type TIMESTAMP. You need to create a new table that contains only the logs from the last 7 days, partitioned by day on the 'timestamp' column. Which SQL statement should you use?

A.CREATE TABLE new_logs PARTITION BY DATE(timestamp) AS SELECT * FROM logs WHERE DATE(timestamp) >= DATE_SUB(CURRENT_DATE(), INTERVAL 7 DAY)
B.CREATE TABLE new_logs PARTITION BY timestamp AS SELECT * FROM logs WHERE timestamp >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 7 DAY)
C.CREATE TABLE new_logs AS SELECT * FROM logs WHERE timestamp >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 7 DAY)
D.CREATE TABLE new_logs PARTITION BY DATE(timestamp) AS SELECT * FROM logs WHERE timestamp >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 7 DAY)
AnswerD

This statement creates a new table partitioned by day on the 'timestamp' column and populates it with data from the last 7 days. The PARTITION BY DATE(timestamp) clause ensures that the table is partitioned by day, which improves query performance and reduces cost. The WHERE clause filters the data appropriately. This is the correct syntax for creating a partitioned table from a query.

Why this answer

To create a partitioned table from a query, you must use the CREATE TABLE ... PARTITION BY clause followed by the partitioning expression and then AS SELECT. Partitioning by DATE(timestamp) is correct for daily partitions.

The WHERE clause should filter on the timestamp column using TIMESTAMP_SUB to include all records from the last 7 days, not just those from the last 7 calendar days.

Exam trap

The trap here is using DATE(timestamp) in the filter instead of TIMESTAMP_SUB, which can exclude events from the beginning of the 7-day window due to time-of-day truncation.

52
MCQmedium

A data engineer needs to query data across BigQuery (in Google Cloud) and Snowflake (in AWS) without moving the data. Which service should they use?

A.Dataflow
B.Cloud SQL
C.Vertex AI Feature Store
D.BigQuery Omni
AnswerD

BigQuery Omni supports multi-cloud analytics without data movement.

Why this answer

BigQuery Omni allows querying data across multiple clouds using BigQuery's interface, with compute running in the respective cloud. Data stays in place.

53
MCQmedium

A company wants to use AutoML Tables to build a classification model on a dataset with 100 features and 500,000 rows. They need to deploy the model for online predictions with low latency (<100 ms). Which deployment option should they choose?

A.Export the model as a TF SavedModel and deploy on Cloud Run
B.Deploy the model on AI Platform Prediction
C.Deploy the model to an endpoint in Vertex AI using the AutoML endpoint service
D.Use batch prediction in Vertex AI
AnswerC

Deploying to a Vertex AI endpoint serves AutoML Tables models for online prediction with the low-latency response the stem requires. Batch prediction cannot meet sub-100 ms per-request latency, and BigQuery ML export does not provide managed online serving.

Why this answer

AutoML Tables models are natively served through Vertex AI endpoints, which provide a managed, low-latency online prediction service. Deploying to a Vertex AI endpoint using the AutoML endpoint service preserves the AutoML model format and gives the sub-100 ms latency required for online predictions.

Exam trap

The trap is assuming AutoML models can be exported and self-hosted like custom-trained models — AutoML Tables models are only servable through Vertex AI endpoints, not Cloud Run or legacy AI Platform Prediction.

How to eliminate wrong answers

Option A is wrong because AutoML Tables models cannot be exported as TF SavedModels for arbitrary serving on Cloud Run — the export path is not supported for AutoML Tables. Option B is wrong because AI Platform Prediction is the legacy service and does not host AutoML Tables models in the current Vertex AI workflow. Option D is wrong because batch prediction is asynchronous and designed for bulk scoring, not sub-100 ms online requests.

54
MCQmedium

You have a BigQuery table `orders` with columns `order_id` (STRING), `customer_id` (STRING), `order_date` (DATE), and `amount` (NUMERIC). You need to create a view that shows, for each order, the cumulative sum of `amount` for that customer, ordered by `order_date` ascending. Which SQL window function or clause should you use?

A.SUM(amount) OVER (PARTITION BY customer_id ORDER BY order_date ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)
B.SUM(amount) OVER (PARTITION BY customer_id ORDER BY order_date RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)
C.SUM(amount) OVER (ORDER BY order_date PARTITION BY customer_id)
D.SUM(amount) OVER (PARTITION BY customer_id ORDER BY order_date) WITH TIES
AnswerA

This window function correctly partitions by customer_id, orders by order_date, and defines the frame from the start of the partition to the current row, producing a running total per customer. The ROWS clause ensures cumulative sum includes all previous rows and the current row, which is exactly what is needed for each order.

Why this answer

To compute a cumulative sum per customer ordered by date, you need a window function with PARTITION BY customer_id and ORDER BY order_date, and an explicit frame that includes all preceding rows up to the current row. The ROWS frame ensures that each row's sum includes only rows up to that point, avoiding grouping of same-date orders. This yields a true running total for each order.

Exam trap

The trap here is confusing ROWS and RANGE frames; RANGE includes peers with the same ORDER BY value, which can inflate the running total when multiple orders share the same date.

55
MCQmedium

You are building a multi-cloud analytics solution to join data from Google Cloud and AWS S3. You need to query the S3 data using BigQuery without moving it. Which Google Cloud service should you use?

A.Looker
B.Dataproc
C.BigQuery Data Transfer Service
D.BigQuery Omni
AnswerD

BigQuery Omni runs BigQuery queries directly against AWS S3 and Azure Blob Storage via Anthos-hosted compute, returning results without extracting or duplicating the data. This satisfies the stem's requirement to join Google Cloud and S3 data while querying S3 in place, avoiding egress and movement costs.

Why this answer

BigQuery Omni is the service that allows querying data in AWS S3 directly from BigQuery without moving it. It deploys BigQuery compute in AWS to process the data locally, returning results to Google Cloud.

Exam trap

The trap is confusing data transfer services with query-in-place services, leading to picking BigQuery Data Transfer Service.

How to eliminate wrong answers

Option A is wrong because Looker is a BI and analytics platform, not a query engine for external data. Option B is wrong because Dataproc is a managed Spark/Hadoop service, which would require moving or processing data, not direct querying. Option C is wrong because BigQuery Data Transfer Service moves data into BigQuery, not query in place.

56
MCQeasy

You have a BigQuery table with sales data and want to pivot product categories into columns. Which SQL clause should you use?

A.UNPIVOT
B.PIVOT
C.ARRAY_AGG with CROSS JOIN
D.STRUCT
AnswerB

PIVOT rotates rows into columns, directly satisfying the requirement to turn product categories into separate columns. BigQuery supports the PIVOT operator, which aggregates values using an aggregate function alongside a FOR clause naming the category column and an IN list of the values to become column headers.

Why this answer

BigQuery supports the PIVOT operator, which rotates rows into columns by aggregating values for each distinct pivot key. It is used in the FROM clause after the source table or subquery, with an aggregate function and a list of pivot values. This is the standard SQL way to turn product categories into columns in a sales table.

Exam trap

PDE often tests the confusion between PIVOT and UNPIVOT — candidates must remember PIVOT turns rows into columns, while UNPIVOT turns columns into rows.

How to eliminate wrong answers

Option A is wrong because UNPIVOT does the opposite — it rotates columns into rows, not rows into columns. Option C is wrong because ARRAY_AGG with CROSS JOIN is a manual workaround that produces arrays rather than true pivoted columns and is far less readable than the native PIVOT operator. Option D is wrong because STRUCT is a data type for nested records, not a clause for reshaping rows into columns.

57
MCQhard

You are using Cloud Dataflow to stream data from Pub/Sub into BigQuery. The incoming messages are JSON strings with a field `event_time` in ISO 8601 format (e.g., "2024-03-15T14:30:00Z"). You need to write the data to a BigQuery table with a column `event_timestamp` of type TIMESTAMP. Which transformation should you apply in your Dataflow pipeline?

A.Use a SQL query in BigQuery to convert the string to TIMESTAMP after the data is loaded into a staging table.
B.Use a ParDo to parse the JSON and convert `event_time` to a BigQuery TIMESTAMP using the appropriate library for your pipeline language (e.g., Instant.parse in Java or datetime.fromisoformat in Python).
C.Configure BigQueryIO to write the `event_time` field as a STRING and rely on BigQuery's automatic schema detection to convert it to TIMESTAMP.
D.In the Dataflow pipeline, use a WithTimestamps transform to assign the event time as the element timestamp, and then write the original string to BigQuery.
AnswerB

Parsing the JSON and converting the ISO 8601 string to a native timestamp type ensures that BigQuery receives a proper TIMESTAMP value. Dataflow's BigQueryIO can then write it correctly. This approach handles time zones and formatting consistently, and is the standard way to transform string timestamps in a pipeline.

Why this answer

The correct approach is to parse the JSON and convert the ISO 8601 string to a native timestamp type within the Dataflow pipeline. This ensures that the data written to BigQuery matches the TIMESTAMP column type. BigQueryIO expects the input PCollection to contain TableRow objects with fields matching the destination schema, so converting the string to a timestamp before writing is necessary.

Exam trap

The trap here is assuming that BigQuery can automatically convert string timestamps during streaming inserts, which it cannot without explicit transformation.

58
MCQhard

A company uses Dataplex to manage data lakes on Google Cloud. They want to enforce data quality rules on a BigQuery table, such as ensuring that a 'email' column is not null and matches a regex pattern. Which Dataplex feature should they use?

A.Dataplex Universal Catalog
B.Dataplex Lake
C.Dataplex Data Quality
D.Dataplex Data Lineage
AnswerC

Dataplex Data Quality enforces row-level and column-level rules directly on BigQuery tables, supporting not-null checks and regex pattern matching through its built-in rule types. This satisfies the stem's requirement to validate the 'email' column's nullability and format, with results surfaced as data quality scores and scan reports.

Why this answer

Dataplex Data Quality is the feature specifically designed to define and enforce data quality rules on BigQuery tables, including checks for null values and regex pattern matching. It allows you to create data quality rules that can be scheduled or run on-demand, and it provides results that can be used for monitoring and alerting. The other options are Dataplex components for metadata management, lake organization, and lineage tracking, not for enforcing data quality rules.

Exam trap

PDE often tests the distinction between Dataplex features, and candidates may confuse Data Quality with Data Lineage or Universal Catalog, assuming that metadata management includes quality checks.

How to eliminate wrong answers

Option A is wrong because Dataplex Universal Catalog is a metadata management service that provides a unified view of data assets, not a tool for defining or enforcing data quality rules. Option B is wrong because Dataplex Lake is a logical container for organizing data assets across storage and analytics services, but it does not itself enforce data quality rules. Option D is wrong because Dataplex Data Lineage tracks data movement and transformation across systems, providing visibility into data provenance, but it does not validate data quality.

59
MCQhard

A data scientist wants to import a pre-trained TensorFlow model into BigQuery ML for batch predictions. The model is stored in a Cloud Storage bucket. Which statement is correct?

A.Use CREATE MODEL with model_type='tensorflow' and model_path='gs://bucket/model'.
B.Use CREATE MODEL with model_type='imported_tensorflow' and model_path='gs://bucket/model'.
C.First upload the model to Vertex AI Model Registry, then reference it in BigQuery ML.
D.Use the ML.IMPORT_MODEL function to load the model into BigQuery.
AnswerA

`CREATE MODEL` with `model_type='tensorflow'` and a `gs://` `model_path` is the supported import path for TensorFlow SavedModels into BigQuery ML, satisfying the stem's requirement to load a pre-trained model from Cloud Storage for batch prediction via `ML.PREDICT`.

Why this answer

BigQuery ML supports importing TensorFlow models via CREATE MODEL with model_type='tensorflow' and a model_path pointing to a Cloud Storage location containing the SavedModel. This allows batch prediction using ML.PREDICT directly in BigQuery without moving data to Vertex AI.

Exam trap

The trap is inventing plausible-sounding model_type strings like 'imported_tensorflow' or fake functions like ML.IMPORT_MODEL — candidates who haven't memorized the exact DDL syntax fall for these.

How to eliminate wrong answers

Option B is wrong because 'imported_tensorflow' is not a valid model_type value — the correct type string is 'tensorflow'. Option C is wrong because BigQuery ML can import TensorFlow models directly from GCS; routing through Vertex AI Model Registry is unnecessary and not how BQML imports work. Option D is wrong because ML.IMPORT_MODEL is not a real BigQuery ML function — model creation uses the CREATE MODEL DDL statement.

60
MCQmedium

Your team stores IoT sensor readings in a BigQuery table `project.sensors.readings` with columns `sensor_id` (STRING), `reading_time` (TIMESTAMP), and `temperature` (FLOAT64). You need to create a new table that adds a column `avg_temp_7d` containing, for each row, the average temperature of that sensor over the preceding 7 days (including the current row). Which SQL feature should you use to compute this efficiently?

A.A GROUP BY on sensor_id and a date truncation to week, then joining back to the original table
B.A user-defined function (UDF) that loops over the previous 7 days and accumulates temperatures
C.A correlated subquery that selects the average temperature where reading_time is between the current row's time minus 7 days and the current row's time
D.A window function with a RANGE-based frame between 7 days preceding and CURRENT ROW
AnswerD

RANGE BETWEEN INTERVAL 7 DAY PRECEDING AND CURRENT ROW defines a dynamic window based on the timestamp value, so each row's average includes all readings from the same sensor within the preceding 7 days. This is the correct approach for time-based rolling aggregates in BigQuery and avoids self-joins or manual date arithmetic.

Why this answer

A window function with a RANGE frame based on the timestamp column correctly computes a rolling 7-day average per sensor. It is efficient because BigQuery processes the window in a single pass, and the RANGE clause dynamically adjusts the window based on the actual time values, not row counts. This meets the requirement of including the current row and the preceding 7 days.

Exam trap

The trap here is assuming that a ROWS-based window frame (e.g., 7 PRECEDING) works for time-based rolling averages; it would instead include the previous 7 rows regardless of time gaps.

61
MCQhard

A data engineer needs to split time-series data for training a forecasting model. The data is sorted by timestamp. The engineer wants to avoid leakage where future data influences training. Which data splitting approach should they use?

A.Use k-fold cross-validation with random assignment
B.Use stratified splitting on the target variable
C.Perform a random 80/20 split on the entire dataset
D.Use a time-series aware split: first 80% of data by timestamp for training, last 20% for testing
AnswerD

Splitting chronologically by timestamp keeps all training observations earlier than every test observation, so the model never learns from future values. Random splitting would leak future information backwards into training, violating the no-leakage constraint for forecasting time-series data.

Why this answer

Time-series data has a temporal order, so training must only use data that precedes the test data to prevent future information from leaking into the model. Option D holds out the last 20% of records by timestamp for testing and trains on the earlier 80%, which mirrors real forecasting conditions where the model predicts unseen future values. This preserves causality and gives a realistic estimate of out-of-sample performance.

Exam trap

The trap here is that candidates reflexively choose k-fold cross-validation because it is the default best practice for i.i.d. data, forgetting that temporal ordering invalidates random shuffling.

How to eliminate wrong answers

Option A is wrong because k-fold cross-validation with random assignment shuffles observations across folds, so the model can be trained on future timestamps and tested on past ones, directly causing temporal leakage. Option B is wrong because stratified splitting on the target variable preserves class proportions but ignores timestamp ordering, so future data can still end up in the training set. Option C is wrong because a random 80/20 split also ignores the temporal order and allows future observations into training, producing optimistically biased metrics.

62
MCQhard

You have a BigQuery table 'events' with a TIMESTAMP column 'event_time'. You need to compute, for each event, the difference in seconds from the previous event of the same user. Which window function should you use?

A.FIRST_VALUE(event_time) OVER (PARTITION BY user_id ORDER BY event_time)
B.LEAD(event_time) OVER (PARTITION BY user_id ORDER BY event_time)
C.LAG(event_time) OVER (PARTITION BY user_id ORDER BY event_time)
D.ROW_NUMBER() OVER (PARTITION BY user_id ORDER BY event_time)
AnswerC

LAG(event_time) OVER (PARTITION BY user_id ORDER BY event_time) retrieves the preceding row's timestamp within each user's partition, satisfying the per-user sequential comparison the stem requires. Subtracting it from the current event_time yields the seconds elapsed since that user's previous event, without collapsing rows as aggregation would.

Why this answer

LAG(event_time) OVER (PARTITION BY user_id ORDER BY event_time) returns the event_time value from the previous row within the same user_id partition, ordered chronologically. Subtracting that returned timestamp from the current row's event_time (e.g., TIMESTAMP_DIFF(event_time, LAG(...), SECOND)) yields the seconds elapsed since the user's prior event. This is the canonical pattern for gap/delta calculations in BigQuery analytic functions.

Exam trap

The trap here is confusing LAG with LEAD — candidates often pick LEAD because they think 'previous' maps to the next row, but LAG looks backward and LEAD looks forward.

How to eliminate wrong answers

Option A is wrong because FIRST_VALUE returns the earliest event_time in the partition for every row, not the immediately preceding event, so it cannot produce a per-event delta. Option B is wrong because LEAD looks forward to the next row, which would compute time-to-next-event rather than time-since-previous-event. Option D is wrong because ROW_NUMBER only assigns a sequential integer rank; it carries no timestamp value and therefore cannot be subtracted to produce a time difference.

63
MCQhard

A company wants to use BigQuery's PIVOT operator to transform their sales data. They have a table with columns: 'year', 'quarter', 'revenue'. They want to create a report where each row is a year and each column is a quarter (Q1, Q2, Q3, Q4) showing revenue. Which SQL statement is correct?

A.SELECT * FROM sales PIVOT(SUM(revenue) FOR quarter IN ('Q1','Q2','Q3','Q4'))
B.SELECT * FROM sales PIVOT(revenue FOR quarter IN (Q1, Q2, Q3, Q4))
C.PIVOT sales ON quarter USING SUM(revenue)
D.SELECT * FROM (SELECT year, quarter, revenue FROM sales) PIVOT(SUM(revenue) FOR quarter IN (Q1, Q2, Q3, Q4))
AnswerA

PIVOT aggregates revenue with SUM, grouping by the remaining column (year) and spreading quarter values into Q1–Q4 columns, exactly matching the required year-per-row, quarter-per-column report. The IN list supplies the literal quarter values to become column headers, so no explicit GROUP BY is needed.

Why this answer

BigQuery's PIVOT operator requires an aggregate function applied to the value column, followed by FOR <pivot_column> IN (<list of values>). Option A correctly uses SUM(revenue) as the aggregate, FOR quarter to specify the pivot column, and IN ('Q1','Q2','Q3','Q4') with quoted string literals. The remaining columns (year) automatically become the grouping keys, producing one row per year with Q1–Q4 as columns.

Exam trap

PDE often tests whether candidates remember that BigQuery PIVOT requires an aggregate function and quoted string literals in the IN list — many candidates pick the option that looks like Oracle/SQL Server PIVOT syntax (ON/USING) or forgets the aggregate entirely.

How to eliminate wrong answers

Option B is wrong because it omits the aggregate function — PIVOT requires an aggregate like SUM, AVG, or COUNT around the value column, and it also uses unquoted identifiers (Q1, Q2) instead of string literals. Option C is wrong because 'PIVOT sales ON quarter USING SUM(revenue)' is not valid BigQuery SQL syntax — it resembles Oracle/SQL Server PIVOT syntax and BigQuery does not support the ON/USING clause form. Option D is wrong because wrapping the source in a subquery is unnecessary and, more importantly, the subquery selects only year, quarter, and revenue but the outer PIVOT still requires the same aggregate syntax — the extra subquery adds no value and the statement is functionally redundant rather than the canonical correct form.

64
MCQmedium

You have a BigQuery table `logs` with a column `message` that contains JSON strings. You need to extract the value of the `user_id` field from each JSON string and return it as a separate column. Which function should you use?

A.JSON_EXTRACT_SCALAR(message, '$.user_id')
B.JSON_EXTRACT(message, '$.user_id')
C.REGEXP_EXTRACT(message, r'"user_id":\s*"([^"]+)"')
D.PARSE_JSON(message).user_id
AnswerA

JSON_EXTRACT_SCALAR extracts a scalar value from a JSON string using a JSONPath expression. It returns the value as a STRING, which is suitable for extracting user_id. This is the correct function for this scenario because it handles JSON parsing and returns a scalar, not a JSON object.

Why this answer

The JSON_EXTRACT_SCALAR function is designed to extract scalar values from JSON strings using JSONPath. It returns the value as a STRING, which is ideal for extracting user_id. Other functions either return JSON-formatted strings, rely on brittle regex, or use invalid syntax.

For robust JSON parsing in BigQuery, JSON_EXTRACT_SCALAR is the correct choice.

Exam trap

The trap here is choosing JSON_EXTRACT, which returns a JSON string with quotes, instead of JSON_EXTRACT_SCALAR, which returns the unquoted scalar value.

65
Multi-Selectmedium

You are using BigQuery to analyze a dataset. You need to create a new table that contains only rows from `sales` where the `region` is 'North America' and the `sale_date` is in the year 2023. You also want to add a column `sale_month` that extracts the month from `sale_date`. Which two actions should you take? (Choose two.)

Select 2 answers
A.Use the FORMAT_DATE function to create the `sale_month` column.
B.Use the EXTRACT function in the SELECT list to create the `sale_month` column.
C.Use a LIMIT clause to restrict the number of rows to only those in 2023.
D.Use a HAVING clause to filter on `region` and `sale_date`.
E.Use a WHERE clause with conditions on `region` and `sale_date`.
AnswersB, E

To add a column that extracts the month from a date, you use the EXTRACT function: `EXTRACT(MONTH FROM sale_date) AS sale_month`. This returns an integer representing the month. You can include this expression in the SELECT list of your query, and when you create a table from the query, the new column will be included. This is the correct way to derive the month from a date column.

Why this answer

To filter rows by region and date, a WHERE clause is required. To add a new column with the month, use the EXTRACT function in the SELECT list. HAVING is for aggregated groups, FORMAT_DATE returns a string, and LIMIT does not filter conditionally.

Thus, the correct actions are using a WHERE clause and using EXTRACT.

Exam trap

The trap here is confusing row filtering with aggregation filtering, or using formatting functions instead of extraction functions for date parts.

66
MCQeasy

To enable data lineage tracking in BigQuery, which feature should be activated?

A.BigQuery Audit Logs
B.Data Catalog
C.Dataplex Lineage
D.BigQuery Lineage API
AnswerC

Correct. Dataplex Lineage provides comprehensive data lineage for BigQuery and other Google Cloud data services.

Why this answer

The correct feature for data lineage tracking in BigQuery is Dataplex Lineage. Dataplex provides end-to-end lineage tracking across data assets, including BigQuery tables and views. BigQuery Lineage API is not a distinct feature; lineage capabilities are integrated into Dataplex.

BigQuery Audit Logs capture metadata changes but are not lineage-specific, and Data Catalog is for metadata management, not lineage.

Exam trap

Candidates may assume that BigQuery Lineage API is a separate service, but lineage for BigQuery is actually provided through Dataplex. Selecting D (BigQuery Lineage API) is incorrect because it is not a standalone feature.

67
MCQeasy

You need to load a large CSV file from Cloud Storage into BigQuery. The file has a header row and contains a column with date values in the format 'YYYY-MM-DD'. You want to ensure the date column is correctly recognized as a DATE type. Which method should you use?

A.Define an explicit schema in JSON or inline that specifies the date column as DATE, and provide it during the load job.
B.Use the bq load command with the --autodetect flag and no schema definition.
C.Load the file as a string column, then use a SQL query to cast the string to DATE after loading.
D.Convert the CSV to a newline-delimited JSON file with date values as strings, then load with autodetect.
AnswerA

Providing an explicit schema ensures BigQuery interprets the date column as DATE regardless of the string format. This is the most reliable method, especially when the format matches the expected DATE literal. It avoids ambiguity and guarantees correct type recognition, which is essential for subsequent date functions.

Why this answer

Defining an explicit schema that specifies the date column as DATE ensures BigQuery correctly interprets the values during load. This method is reliable and avoids the uncertainty of autodetect or post-load casting, making it the best practice for date columns with a known format.

Exam trap

The trap here is relying on autodetect to infer DATE types, but autodetect can be inconsistent and may default to STRING if the format is not perfectly recognized.

68
MCQmedium

You train a BigQuery ML linear regression model to predict house prices. The model has high bias during evaluation. Which action BEST reduces bias?

A.Decrease the learning rate in the training options
B.Add more features like number of bedrooms and square footage
C.Remove features that have low correlation with the label
D.Increase L2 regularization
AnswerB

High bias means the model underfits because its hypothesis space is too simple for the underlying relationship. Adding predictive features such as bedrooms and square footage increases model capacity, satisfying the stem's requirement to reduce bias rather than variance.

Why this answer

High bias indicates underfitting, meaning the model is too simple to capture the underlying patterns in the data. Adding more features, such as number of bedrooms and square footage, increases the model's complexity and its ability to fit the training data, thereby reducing bias. This is a standard approach to address underfitting in linear regression.

Exam trap

The PDE exam often tests the confusion between bias and variance, leading candidates to choose regularization or learning rate adjustments when the problem is underfitting due to insufficient features.

How to eliminate wrong answers

Option A is wrong because decreasing the learning rate affects the optimization process but does not directly reduce bias; it may slow convergence but won't help the model fit better if it's too simple. Option C is wrong because removing features would further simplify the model, likely increasing bias. Option D is wrong because increasing L2 regularization adds a penalty for large coefficients, which can increase bias by shrinking coefficients, making the model even simpler.

69
Multi-Selecthard

You are designing a data pipeline for ML training with Vertex AI. You need to split time-series data into train/validation/test sets without leaking future data. Which THREE practices should you follow?

Select 3 answers
A.Use a sliding window validation approach for hyperparameter tuning.
B.Ensure that all data points for a given time period are in the same split.
C.Use Looker to generate the splits automatically.
D.Randomly assign rows to each split to ensure statistical distribution.
E.Use a date column to define the split boundaries.
AnswersA, B, E

Sliding-window validation trains on an expanding or rolling past window and validates on the immediately following period, so every fold respects chronological order. This directly prevents future leakage during hyperparameter tuning, satisfying the stem's requirement to split time-series data without exposing the model to later observations.

Why this answer

Option A is correct because a sliding-window (rolling-origin) validation scheme trains on past data and validates on the immediately following window, which respects temporal order and prevents future leakage during hyperparameter tuning. Option B is correct because keeping all data points from the same time period (e.g., same day or timestamp bucket) in a single split avoids boundary leakage, where records from one period appear in both train and test. Option E is correct because using an explicit date column to define split boundaries (for example, train on data before 2024-01-01, validate on Q1 2024, test on Q2 2024) enforces a strict chronological cutoff.

Option C is not appropriate because Looker is a BI/analytics and dashboarding tool, not a mechanism for producing leakage-safe ML dataset splits. Option D is wrong because random row assignment mixes past and future observations across splits, which is exactly the temporal leakage the scenario must avoid.

70
MCQhard

A retail company uses BigQuery to store sales data and wants to forecast weekly demand for the next 8 weeks using historical data from the past 2 years. They need to account for seasonality and holidays. Which BigQuery ML model type and configuration is most appropriate?

A.ARIMA_PLUS with holiday_region parameter
B.Boosted tree classifier
C.Linear regression with engineered time features
D.Time-series DECOMPOSE model
AnswerA

ARIMA_PLUS decomposes the time series into trend, seasonal and holiday components, automatically detecting weekly and yearly seasonality across the two years of history. Setting holiday_region incorporates retail holiday effects into the forecast, directly satisfying the requirement to account for seasonality and holidays over the eight-week horizon.

Why this answer

ARIMA_PLUS with the holiday_region parameter is the most appropriate BigQuery ML model for forecasting weekly demand with seasonality and holidays. ARIMA_PLUS is specifically designed for time-series forecasting, automatically handles seasonality, trend, and holidays when the holiday_region is specified. It also provides explainability and handles missing data.

Exam trap

PDE often tests the choice of BigQuery ML model for time-series forecasting; candidates may overlook ARIMA_PLUS's built-in holiday and seasonality handling and opt for manual feature engineering with linear regression.

How to eliminate wrong answers

Option B is wrong because a boosted tree classifier is for classification problems, not time-series forecasting. Option C is wrong because linear regression with engineered time features requires manual feature engineering and may not capture complex seasonality and holiday effects as effectively as ARIMA_PLUS. Option D is wrong because 'Time-series DECOMPOSE model' is not a valid BigQuery ML model type; BigQuery ML offers ARIMA_PLUS and ARIMA_PLUS_XREG for time-series forecasting.

71
MCQmedium

A data team uses Looker Studio to create a report that combines data from two different BigQuery tables: one with sales transactions and another with customer demographics. They need to join these tables in the report without writing SQL. Which feature should they use?

A.Data blending
B.Creating a report with multiple charts
C.Custom query in BigQuery connector
D.Calculated fields
AnswerA

Data blending lets Looker Studio combine two BigQuery data sources by matching a shared dimension, producing a joined result inside the report. This satisfies the requirement to join sales transactions with customer demographics without writing SQL or pre-joining the tables in BigQuery.

Why this answer

Looker Studio's data blending feature allows combining data from multiple sources (including BigQuery tables) using a common key, without writing SQL. It provides a graphical interface to define joins. Creating a custom query requires SQL.

Looker Studio reports support multiple charts, but blending is the specific feature for joining data. Calculated fields transform data within a single source.

72
MCQeasy

Which Google Cloud service would you use to create a unified data catalog that automatically captures lineage from BigQuery, Cloud Storage, and other sources?

A.Cloud Composer
B.Dataflow
C.Data Catalog
D.Dataplex
AnswerD

Dataplex provides a unified data catalogue with automatic metadata discovery and lineage tracking across BigQuery, Cloud Storage and other sources, satisfying the requirement for automatic lineage capture. Its built-in Data Catalog integration and lineage API record transformations without manual annotation, which is precisely the unified, cross-source lineage capability the scenario demands.

Why this answer

Dataplex is Google Cloud's unified data governance and catalog service that automatically discovers, catalogs, and captures lineage across BigQuery, Cloud Storage, and other sources. It provides a unified data catalog with automatic metadata extraction and lineage tracking, which is exactly what the question describes.

Exam trap

The trap is picking Data Catalog because it sounds like the obvious catalog service — but the question emphasizes unified catalog with automatic lineage across multiple sources, which is Dataplex's differentiator.

How to eliminate wrong answers

Option A is wrong because Cloud Composer is a managed Apache Airflow workflow orchestration service, not a data catalog or lineage tool. Option B is wrong because Dataflow is a managed Apache Beam stream/batch processing service, not a catalog. Option C is wrong because Data Catalog is the older standalone metadata service that has been folded into Dataplex — it does not provide the unified, automatic lineage across sources that Dataplex does.

73
MCQmedium

Your team maintains a BigQuery dataset where a partitioned table 'transactions' is partitioned by DATE(transaction_time) and clustered by customer_id. Analysts frequently run queries filtering on a specific customer_id and a date range of the last 7 days. They report that these queries scan more data than expected, and you notice that the table was created without a partition filter requirement but with a clustering column. Which action should you take to optimize query performance and reduce bytes scanned?

A.Add a partition filter requirement to the table using ALTER TABLE SET OPTIONS(require_partition_filter = true).
B.Recreate the table with clustering on both customer_id and transaction_time to improve filter effectiveness.
C.Change the table to use ingestion-time partitioning instead of column-based partitioning to reduce overhead.
D.Ensure that queries filter on the clustering column customer_id and use the partition column in the WHERE clause to allow partition pruning and cluster pruning.
AnswerD

BigQuery uses partition pruning when the query filters on the partition column, and cluster pruning when it filters on the clustering columns. If analysts are not filtering on customer_id, or if the filter is not applied correctly (e.g., using a function on the column), clustering benefits are lost. By ensuring queries filter directly on customer_id and the partition column, BigQuery can scan only relevant partitions and blocks, reducing bytes scanned and improving performance. This is the correct approach to optimize the query.

Why this answer

The table is partitioned by DATE(transaction_time) and clustered by customer_id. To optimize queries that filter on customer_id and a date range, analysts must ensure their WHERE clause includes both the partition column and the clustering column without transformations. This enables partition pruning and cluster pruning, minimizing data scanned.

Requiring a partition filter or changing clustering does not fix the root cause if queries are not written to leverage the existing schema.

Exam trap

The trap here is assuming that adding a partition filter requirement or additional clustering will automatically improve performance, when the real issue is that queries must filter directly on the existing partition and clustering columns to enable pruning.

74
Multi-Selectmedium

A data team wants to use Approximate Aggregation Functions in BigQuery to get faster query results. Which two functions can they use? (Choose 2)

Select 2 answers
A.APPROX_SUM
B.APPROX_AVG
C.APPROX_QUANTILES
D.APPROX_COUNT_DISTINCT
E.APPROX_MEDIAN
AnswersC, D

APPROX_QUANTILES returns approximate quantile boundaries from a sample, satisfying the stem's demand for faster results on large datasets. It computes quantiles in a single pass with bounded memory, unlike exact PERCENTILE_CONT which requires full sorting. This makes it a valid Approximate Aggregation Function alongside APPROX_COUNT_DISTINCT.

Why this answer

APPROX_QUANTILES [CORRECT] is a valid BigQuery approximate aggregation function that returns approximate quantile boundaries for a dataset, letting the team trade a small amount of accuracy for much faster results on large data. APPROX_COUNT_DISTINCT [CORRECT] is also a real BigQuery approximate aggregation function that estimates the number of distinct values using HyperLogLog++ sketches, providing fast, scalable cardinality estimates. The other options are not BigQuery functions: APPROX_SUM, APPROX_AVG, and APPROX_MEDIAN do not exist in BigQuery's function library, so they cannot be used for approximate aggregation.

Exam trap

PDE often tests whether candidates know which approximate functions actually exist in BigQuery — the trap is plausible-sounding names like APPROX_SUM, APPROX_AVG, and APPROX_MEDIAN that are not real functions.

75
Multi-Selectmedium

A data scientist needs to perform feature engineering for a machine learning model using Vertex AI. They want to preprocess data using a pipeline that includes scaling, one-hot encoding, and handling missing values. Which TWO services can they use to define and execute this preprocessing pipeline? (Choose 2.)

Select 2 answers
A.Cloud Dataproc
B.Vertex AI Pipelines
C.BigQuery SQL with ML.TRANSFORM
D.Cloud Dataflow
E.Cloud Functions
AnswersB, C

Allows you to build and run end-to-end ML pipelines, including preprocessing.

Why this answer

Vertex AI Pipelines is the recommended service for building and running ML pipelines, including preprocessing steps. Alternatively, you can use BigQuery SQL for feature engineering directly on the data, then export the processed data for training. Cloud Dataflow is an option for batch/streaming data processing but is not specific to ML pipelines.

Cloud Functions and Dataproc are less suitable for this purpose.

Ready to test yourself?

Try a timed practice session using only Pde Analysis Ml questions.