Courseiva

Google Professional Data Engineer (PDE) — Questions 301375

890 questions total · 12pages · All types, answers revealed

Page 4

Page 5 of 12

Page 6
301
MCQmedium

Your company uses Kafka for event streaming. You want to run Kafka on Google Cloud with the ability to auto-scale clusters and use managed infrastructure. Which service should you choose?

A.Cloud Pub/Sub
B.Confluent Cloud on GCP
C.Cloud Dataflow
D.Dataproc
AnswerD

Dataproc supports running Kafka as an optional component on managed clusters, giving you control and scalability.

Why this answer

Dataproc is the correct choice because it is a managed Spark and Hadoop service on Google Cloud that supports running Kafka clusters via initialization actions. It allows auto-scaling of worker nodes and integrates with GCP storage and networking, providing the managed infrastructure required for Kafka event streaming. Note that Confluent Cloud is a third-party managed Kafka service, not a GCP-native service, and Cloud Pub/Sub is a messaging service, not a Kafka replacement.

Cloud Dataflow is for data processing pipelines, not for running Kafka itself.

Exam trap

The trap is that candidates may confuse third-party managed Kafka services (like Confluent Cloud) with GCP-native managed infrastructure, or assume Cloud Pub/Sub is equivalent to Kafka for event streaming, when Dataproc is the correct GCP-native service for running Kafka itself with auto-scaling and managed resources.

How to eliminate wrong answers

Option A is wrong because Cloud Pub/Sub is a fully managed messaging service, not a Kafka-compatible platform; it does not run Kafka clusters or support auto-scaling of Kafka-specific infrastructure. Option B is wrong because Confluent Cloud on GCP is a third-party managed Kafka service, not a native GCP service, and while it offers auto-scaling, the question asks for a service you choose to run Kafka on Google Cloud with managed infrastructure, implying a GCP-native solution; Confluent Cloud is a separate platform, not a GCP service. Option C is wrong because Cloud Dataflow is a stream and batch processing service based on Apache Beam, not a Kafka cluster management service; it can consume from Kafka but does not host or auto-scale Kafka clusters.

302
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

Correct: Vertex AI Prediction provides model serving endpoints.

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.

303
MCQhard

A financial services company runs a batch Dataflow pipeline daily to process transaction data. The pipeline reads from Cloud Storage, performs complex transformations, and writes to BigQuery. Recently, the pipeline has been failing intermittently with the error: 'Workflow failed. Causes: (9c3f7a2b1d4e): The worker missed 2000 data samples in the last 30 seconds. This can be caused by a variety of factors, including slow work items, network issues, or resource contention.' The team has already increased the number of workers and tried using e2-standard-8 machine types, but the issue persists. The pipeline processes approximately 500 GB of data per run and uses approximately 200 workers. The team suspects that the issue might be related to shuffle operations. What should the team do next to resolve the issue?

A.Enable Streaming Engine for the pipeline.
B.Increase the persistent disk size per worker to 100 GB.
C.Reduce the number of workers to 100 to decrease shuffle overhead.
D.Use Cloud Storage as a shuffle sink.
AnswerB

Provides more space for shuffle data, reducing disk contention.

Why this answer

The error indicates that workers are missing data samples due to slow shuffle operations, often caused by insufficient disk I/O. Increasing the persistent disk size per worker to 100 GB provides more local scratch space for Dataflow's shuffle, reducing disk contention and allowing the shuffle to complete within the 30-second window. This directly addresses the root cause without changing the worker count or machine type.

Exam trap

Google Cloud often tests the misconception that increasing workers or machine type always solves performance issues, when in fact shuffle-bound pipelines require adequate local disk I/O, not just more CPU or memory.

How to eliminate wrong answers

Option A is wrong because Streaming Engine is designed for streaming pipelines, not batch pipelines, and enabling it would not resolve shuffle disk I/O issues in a batch Dataflow job. Option C is wrong because reducing the number of workers from 200 to 100 would increase the data volume each worker must shuffle, worsening the disk contention and likely increasing the number of missed samples. Option D is wrong because Cloud Storage as a shuffle sink is not a supported configuration in Dataflow; Dataflow uses persistent disk for shuffle by default, and switching to an external sink would introduce network latency and not fix the local disk bottleneck.

304
MCQmedium

Your team uses dbt to transform data in BigQuery. You need to schedule dbt runs to refresh materialized tables and views every hour. The transformations include both full refreshes and incremental models. What is the most efficient way to orchestrate these dbt runs on Google Cloud?

A.Use Cloud Composer (Airflow) to schedule and run dbt commands.
B.Use Cloud Build with a trigger to run dbt every hour.
C.Use Cloud Scheduler to trigger a Cloud Function that runs dbt.
D.Set up a cron job on a Compute Engine instance to run dbt.
AnswerA

Cloud Composer is managed Airflow, ideal for scheduling and orchestrating dbt runs with dependencies.

Why this answer

Cloud Composer (Airflow) is the recommended orchestration tool for complex workflows like dbt runs, supporting dependencies, retries, and scheduling. Cloud Scheduler alone cannot run dbt directly; it can trigger a Cloud Function to run dbt, but that is less maintainable. Cloud Build is CI/CD, not scheduling.

Using a cron job on Compute Engine is possible but not managed.

305
MCQeasy

A mobile app needs a NoSQL database that supports offline synchronization when the device goes offline and later reconnects. Which Google Cloud database should be used?

A.Firestore
B.Cloud Bigtable
C.Cloud Spanner
D.Cloud SQL
AnswerA

Document NoSQL with offline sync.

Why this answer

Firestore provides offline persistence for mobile and web apps. It caches data locally and syncs when online. Cloud SQL and Spanner are relational; Bigtable does not have offline sync.

306
Multi-Selectmedium

Which THREE of the following are best practices when designing a Cloud Dataflow pipeline for batch processing? (Choose three.)

Select 3 answers
A.Use mutable state within ParDo to track running totals.
B.Use side inputs to hold a large lookup table that is read in every element.
C.Always insert a Reshuffle transform after every GroupByKey to redistribute data.
D.Create separate pipelines for independent jobs to allow independent scaling.
E.Tune the batch size in Write transforms to optimize BigQuery streaming inserts.
AnswersB, D, E

Side inputs enable efficient broadcast of static data to all workers.

Why this answer

Side inputs in Cloud Dataflow are designed to efficiently broadcast a read-only dataset (like a lookup table) to all parallel workers. When the side input is a large but static dataset, Dataflow can cache it in memory or on disk across workers, avoiding repeated external lookups and reducing per-element processing overhead. This pattern is especially effective for batch processing where the side input is read once and reused across all elements.

Exam trap

Google Cloud often tests the misconception that mutable state is acceptable in Dataflow's ParDo for batch processing, but the correct understanding is that Dataflow's execution model requires stateless transforms to ensure fault tolerance and exactly-once processing.

307
Multi-Selecthard

A data engineer is building a Cloud Workflows workflow that orchestrates multiple Cloud Functions and API calls. The workflow should handle transient failures with retries and send a notification to a Pub/Sub topic if the workflow ultimately fails. Which THREE steps should the engineer include in the workflow definition?

Select 3 answers
A.Use a 'for' loop to iterate over retries.
B.Use the 'googleapis.pubsub.v1.projects.topics.publish' connector to send a failure notification.
C.Use a 'try' / 'catch' block to handle exceptions and route to a failure step.
D.Use a 'switch' step to check the status of previous steps and conditionally execute next steps.
E.Use a 'retry' block with a max retries and backoff configuration on each API call step.
AnswersB, D, E

Workflows can call Pub/Sub via the connector to publish messages, e.g., a failure alert.

Why this answer

Workflows supports retry policies via 'retry' blocks, conditional steps using 'switch', and Pub/Sub publishing via the 'googleapis.pubsub.v1.projects.topics.publish' connector. The 'try/catch' is not a Workflows construct; instead, use 'step' with 'retry' and 'on_error' for failure handling. 'for' loops are for iteration, not error handling.

308
Multi-Selectmedium

A company uses Cloud Composer (Airflow) to orchestrate pipelines. They want to implement a pattern where a task polls for a file arrival in Cloud Storage and then triggers subsequent tasks. Which THREE Airflow concepts are essential? (Choose 3)

Select 3 answers
A.Sensors (e.g., GCSObjectExistenceSensor)
B.XComs to pass file path between tasks
C.Operators (e.g., PythonOperator)
D.SubDAGs for grouping tasks
E.Task dependencies (bitshift operators)
AnswersA, B, E

Sensors poll for conditions like file existence.

Why this answer

A is correct because Sensors are a specialized type of operator designed to wait for a specific condition, such as file arrival in Cloud Storage. The `GCSObjectExistenceSensor` in Cloud Composer (Airflow) polls Google Cloud Storage at a configurable interval until the target file exists, making it the precise tool for this file-arrival polling pattern.

Exam trap

In the Google Professional Data Engineer exam, candidates often confuse general-purpose Operators (like PythonOperator) with Sensors, leading them to pick Operators for polling tasks when Sensors are the correct, purpose-built solution.

309
MCQhard

A company runs a Dataflow streaming pipeline that reads from Pub/Sub and writes to BigQuery. They experience a sudden spike in data volume causing BigQuery write throughput to be exceeded, resulting in errors. Which strategy should they implement to handle this gracefully?

A.Use a BigQuery sink with 'FAIL_FAST' error handling and set a dead-letter queue for failed writes.
B.Use a BigQuery sink with 'WRITE_APPEND' mode and set 'writeDisposition' to 'WRITE_APPEND'.
C.Use a BigQuery sink with 'WRITE_TRUNCATE' mode.
D.Use a BigQuery sink with 'CREATE_NEVER' write method.
AnswerB

Correct. WRITE_APPEND mode ensures data is appended, and the BigQuery sink's default retry and backpressure mechanisms handle spikes gracefully without requiring special error handling.

Why this answer

Setting 'WRITE_APPEND' mode and 'writeDisposition' to 'WRITE_APPEND' configures the BigQuery sink to append data to the existing table. The default error handling in the BigQuery sink includes automatic retries and backpressure, which gracefully handle spikes in data volume. Options A, C, and D are incorrect because: A uses FAIL_FAST error handling, which fails the pipeline on write errors and does not route to a dead-letter queue; C truncates the table; D prevents table creation.

Exam trap

FAIL_FAST error handling does not send failed writes to a dead-letter queue; it terminates the pipeline. Always use WriteResult to capture failures for dead-letter processing.

310
MCQmedium

You are designing a near-real-time CDC pipeline to replicate changes from an on-premises PostgreSQL database to BigQuery for analytics. The source database has high transaction volume and you must ensure minimal impact on the source. Which Google Cloud service should you use to ingest the change data?

A.Pub/Sub with a custom connector that polls the database every minute.
B.Use BigQuery Data Transfer Service for PostgreSQL.
C.Use Dataflow with a JDBC IO connector to read from PostgreSQL.
D.Datastream to stream changes to GCS, then load into BigQuery.
AnswerD

Datastream captures changes from the database logs and streams them to GCS or BigQuery directly, with low impact.

Why this answer

Datastream is purpose-built for CDC from MySQL, PostgreSQL, and Oracle to BigQuery or GCS. It reads the database logs (e.g., WAL) to capture changes with low latency and minimal impact on the source.

311
Multi-Selectmedium

A data engineer needs to migrate a schema from BigQuery where a column is currently REQUIRED and needs to become NULLABLE. Which TWO statements are correct? (Choose 2)

Select 2 answers
A.Use ALTER TABLE RENAME COLUMN and then add new column
B.Drop the column and add it again as NULLABLE
C.Use bq update --schema to change the mode
D.Create a new table with the desired schema and use a query to populate it
E.Use ALTER TABLE ALTER COLUMN SET DATA TYPE to change to NULLABLE
AnswersB, D

Dropping and adding the column changes its mode to NULLABLE.

Why this answer

BigQuery does not allow changing a column from REQUIRED to NULLABLE directly. One must either drop and recreate the column or use a query to create a new table.

312
MCQmedium

A data engineer needs to move 500 TB of archival data from an on-premises Hadoop cluster to Cloud Storage. The network bandwidth is limited to 100 Mbps, and the transfer must complete within 30 days. Which method is most cost-effective and reliable?

A.Use Dataproc to copy data in parallel
B.Use a VPN and gsutil rsync
C.Use Storage Transfer Service over the internet
D.Use Transfer Appliance to ship the data offline
AnswerD

Transfer Appliance allows offline shipping of large data volumes, bypassing bandwidth limits.

Why this answer

With 100 Mbps, transferring 500 TB over the network would take > 500 days, exceeding the 30-day window. Transfer Appliance is designed for petabyte-scale offline transfers, making it the only feasible option.

313
Multi-Selecthard

Your company is building a data processing system that ingests sensor data from millions of devices, processes it in near real-time to detect anomalies, and stores raw and processed data for long-term analytics. The system must meet a 99.9% uptime SLA and minimize data loss. Which THREE design choices are best? (Choose three.)

Select 3 answers
A.Use Cloud Pub/Sub as the ingestion layer with a dead-letter topic to capture unprocessed messages.
B.Store raw data in Cloud Bigtable and processed data in Cloud Storage.
C.Use Dataflow with at-least-once processing guarantees and perform deduplication downstream.
D.Use Cloud Storage for raw data archival and BigQuery for processed analytics data.
E.Use a global Cloud Load Balancer in front of the Dataflow workers.
AnswersA, C, D

Dead-letter topics prevent data loss by storing messages that cannot be processed after retries.

Why this answer

Cloud Pub/Sub with a dead-letter topic ensures that messages that cannot be processed are captured and not lost, directly supporting the requirement to minimize data loss. The dead-letter topic allows for later reprocessing or analysis of failed messages, which is critical for meeting a 99.9% uptime SLA by preventing message backlogs from blocking the ingestion pipeline.

Exam trap

Google Cloud often tests the misconception that a load balancer is needed to scale Dataflow workers, when in fact Dataflow auto-scales its own workers and uses Pub/Sub's pull subscriptions to distribute messages evenly across workers without a separate load balancer.

314
MCQmedium

A data engineer deploys a TensorFlow model on Vertex AI using a custom container. After deployment, online prediction requests sometimes fail with a 500 error and the message 'Out of memory'. The model requires significant memory during inference. Which action should the engineer take to resolve this issue?

A.Reduce the batch size of prediction requests sent to the endpoint.
B.Increase the memory limit in the Vertex AI endpoint configuration.
C.Optimize the model by quantizing weights to reduce model size.
D.Use a machine type with higher CPU performance.
AnswerB

Configuring a higher memory machine type or increasing the memory limit in the container spec provides the needed resources.

Why this answer

Vertex AI endpoints allow you to configure a machine type with a specific memory limit. When a custom container runs out of memory during inference, increasing the memory allocation (e.g., by selecting a machine type with more RAM, such as n1-highmem-8) directly addresses the 'Out of memory' error. This ensures the container has sufficient resources to handle the model's inference workload without crashing.

Exam trap

Google Cloud often tests the misconception that reducing batch size or optimizing the model (quantization) is the first step to fix runtime OOM errors, when in fact the immediate operational fix is to allocate more memory to the deployment.

How to eliminate wrong answers

Option A is wrong because reducing the batch size may reduce per-request memory usage, but the error occurs during inference of a single request or a small batch; the root cause is insufficient memory for the model itself, not request batching. Option C is wrong because quantizing weights reduces model size on disk and may lower memory footprint, but it is a model optimization technique that requires retraining or conversion and does not immediately resolve a runtime OOM error in a deployed container. Option D is wrong because higher CPU performance (e.g., more vCPUs) does not increase available memory; the OOM error is a memory issue, not a CPU bottleneck, and Vertex AI machine types with higher CPU often have the same or lower memory ratios.

315
MCQeasy

Your company deploys a classification model on Vertex AI for online predictions. The model is an XGBoost model trained on tabular data with 500 features. The endpoint uses a single n1-standard-4 node. After deployment, users report that predictions take 8-10 seconds on average, while the required SLA is under 2 seconds. You have already verified that the model is not large (under 100 MB) and the input data size is small. The endpoint does not scale automatically. Which action should you take to reduce latency to meet the SLA? A) Change the machine type to n1-highcpu-4 to prioritize compute over memory. B) Enable autoscaling by setting min replicas to 2 and max replicas to 5. C) Switch to a custom container that preloads the model into memory. D) Reduce the number of features by half.

A.Change the machine type to n1-highcpu-4 to prioritize compute over memory.
B.Reduce the number of features by half.
C.Switch to a custom container that preloads the model into memory.
D.Enable autoscaling by setting min replicas to 2 and max replicas to 5.
AnswerD

Adding replicas offloads requests, reducing wait time and average latency.

Why this answer

(Enable autoscaling) is correct because the current single-node endpoint is experiencing high latency due to request queuing or concurrency limits. Autoscaling with a minimum of 2 replicas distributes the load, reducing per-request latency. Option A (changing machine type) does not address concurrency; the n1-standard-4 already provides sufficient resources for the small model.

Option B (reducing features) may degrade accuracy without guaranteed latency improvement. Option C (custom container) is unnecessary because Vertex AI already preloads models into memory by default.

316
MCQmedium

A company uses BigQuery for analytics and needs to ensure that certain columns containing PII are encrypted at query time so that only authorized users can decrypt. What should they use?

A.BigQuery AEAD encryption functions
B.VPC Service Controls
C.Customer-managed encryption keys (CMEK)
D.Fine-grained IAM roles
AnswerA

AEAD encrypts columns; access control via key access.

Why this answer

BigQuery AEAD encryption functions allow you to encrypt sensitive columns (e.g., PII) at query time using a user-managed key, so that only authorized users who possess the key can decrypt the data. This is the correct approach because it provides column-level, application-layer encryption that is transparent to the query engine and ensures that unauthorized users see only ciphertext.

Exam trap

In Google Cloud exams, a common trap is to assume that Customer-managed encryption keys (CMEK) provide column-level, application-layer encryption or query-time decryption control. CMEK only protects data at rest at the storage level, not at query time. The correct approach for column-level query-time encryption is to use BigQuery AEAD encryption functions.

How to eliminate wrong answers

Option B is wrong because VPC Service Controls provide network-level security boundaries to prevent data exfiltration, not column-level encryption at query time. Option C is wrong because Customer-managed encryption keys (CMEK) encrypt data at rest (storage layer), not at query time, and do not control per-user decryption access. Option D is wrong because Fine-grained IAM roles control access to tables or rows via row-level security, but they do not encrypt the data itself; authorized users still see plaintext PII.

317
MCQmedium

A company is migrating its on-premises Apache Spark jobs to Dataproc. The jobs read from and write to Cloud Storage. After migration, the jobs are slower than expected. The Dataproc cluster uses standard worker machines with local SSDs. What is the most likely cause of the performance degradation?

A.The Spark shuffle service is not enabled on the cluster.
B.The local SSDs are not mounted or are misconfigured.
C.The Cloud Storage connector is not using the gRPC protocol.
D.The jobs use the Cloud Storage connector instead of HDFS, causing network latency.
AnswerD

Reading from Cloud Storage over network is slower than local HDFS reads.

Why this answer

D is correct because the performance degradation is most likely due to network latency when using the Cloud Storage connector instead of HDFS. Cloud Storage is an object store accessed over the network, while HDFS leverages local SSDs for data locality and faster I/O. In Dataproc, jobs that read/write to Cloud Storage incur higher latency compared to using HDFS on local SSDs, especially for shuffle-heavy Spark workloads.

Exam trap

Google Cloud often tests the misconception that local SSDs or connector protocols are the bottleneck, when the real issue is the inherent latency of using a remote object store (Cloud Storage) versus a distributed filesystem (HDFS) with data locality.

How to eliminate wrong answers

Option A is wrong because the Spark shuffle service is enabled by default on Dataproc clusters and is not related to Cloud Storage I/O performance. Option B is wrong because local SSDs are automatically mounted and configured by Dataproc; misconfiguration would cause failures, not just slower performance. Option C is wrong because the Cloud Storage connector uses HTTP/HTTPS by default, and while gRPC can improve performance, it is not the primary cause of degradation compared to the fundamental latency difference between object storage and HDFS.

318
MCQmedium

A gaming company uses Cloud Pub/Sub to ingest player activity events. A Dataflow streaming pipeline consumes these events, performs stateful processing to compute session metrics, and writes results to Cloud Bigtable for low-latency queries. Recently, the pipeline's processing latency increased, and the Bigtable write throughput dropped. Monitoring shows that the pipeline is experiencing a high rate of 'out-of-order' messages and 'duplicate' events. The Pub/Sub subscription is configured with exactly-once delivery. The Dataflow job uses a GlobalWindow with a trigger that fires every 10 seconds. What is the most likely cause and solution?

A.The Bigtable instance is under-provisioned; add more nodes to increase write throughput.
B.Change the Pub/Sub subscription from exactly-once to at-least-once delivery to avoid redelivery overhead.
C.The pipeline's trigger is too frequent; increase the trigger interval to 30 seconds and set allowed lateness to 1 minute to handle out-of-order events.
D.The streaming engine is disabled; enable Streaming Engine to reduce worker memory pressure.
AnswerC

A longer trigger allows more events to be processed before firing, reducing duplicates and correcting out-of-order handling.

Why this answer

The high rate of out-of-order and duplicate events indicates that the pipeline's trigger is firing too frequently, causing the stateful processing to attempt to commit partial windows before all events arrive. Increasing the trigger interval to 30 seconds and setting allowed lateness to 1 minute allows the pipeline to buffer more events, reduce the number of speculative triggers, and handle late-arriving data within the lateness bound, which directly reduces processing latency and Bigtable write contention.

Exam trap

Google Cloud often tests the misconception that increasing Bigtable nodes or changing Pub/Sub delivery mode will fix pipeline latency, when the real issue is the trigger configuration causing excessive speculative windowing and state churn.

How to eliminate wrong answers

Option A is wrong because the root cause is not Bigtable provisioning; the symptom of low write throughput is a downstream effect of the pipeline's trigger behavior, not a capacity issue. Option B is wrong because changing from exactly-once to at-least-once delivery would increase duplicates, not reduce them, and the subscription's exactly-once mode is not causing the redelivery overhead—the problem is the trigger frequency. Option D is wrong because disabling Streaming Engine would increase worker memory pressure, not reduce it; the described symptoms are not related to Streaming Engine being disabled, and enabling it would not fix the trigger-induced out-of-order and duplicate events.

319
MCQmedium

An organization needs to transfer 50 TB of historical data from an on-premises Hadoop cluster to Google Cloud Storage. The network bandwidth is limited to 100 Mbps. Which transfer method is MOST cost-effective and time-efficient?

A.Transfer Appliance
B.Storage Transfer Service over the network
C.BigQuery Data Transfer Service for Hadoop
D.gsutil cp with parallel composite uploads
AnswerA

Transfer Appliance allows shipping data physically, bypassing network bandwidth limitations for large datasets.

Why this answer

Transfer Appliance is designed for petabyte-scale offline transfers, shipping physical devices to Google for upload, which is much faster than using limited network bandwidth for 50 TB.

320
MCQeasy

A company has deployed a classification model on Vertex AI. They want to detect data drift in real-time for the model's input features. Which service should they use?

A.Cloud Monitoring
B.Cloud Data Loss Prevention
C.Cloud Logging
D.Vertex AI Model Monitoring
AnswerD

Vertex AI Model Monitoring continuously monitors feature distributions and alerts on drift.

Why this answer

Vertex AI Model Monitoring is the correct service because it is specifically designed to detect data drift and feature skew for models deployed on Vertex AI. It continuously monitors input features against a baseline distribution and alerts when drift exceeds a configured threshold, enabling real-time detection without requiring custom code.

Exam trap

The trap here is that candidates confuse general monitoring (Cloud Monitoring) with ML-specific drift detection, assuming any monitoring tool can detect data drift, when in fact Vertex AI Model Monitoring is the only service that performs statistical distribution comparison for model inputs.

How to eliminate wrong answers

Option A is wrong because Cloud Monitoring is a general-purpose observability service for metrics, uptime checks, and dashboards; it lacks built-in statistical drift detection for ML model features. Option B is wrong because Cloud Data Loss Prevention (DLP) is used for inspecting, classifying, and masking sensitive data, not for monitoring feature distributions or drift. Option C is wrong because Cloud Logging captures and stores log entries from services but does not perform statistical analysis or drift detection on model inputs.

321
MCQeasy

A startup is building a mobile app that needs to sync user data across devices in real time. They expect millions of concurrent users and need a NoSQL database with offline support and automatic multi-region replication. Which Google Cloud service meets these requirements?

A.Cloud Bigtable
B.Cloud Spanner
C.Firestore
D.Cloud SQL
AnswerC

Firestore offers real-time listeners, offline persistence, and automatic multi-region replication, ideal for mobile sync.

Why this answer

Firestore is a NoSQL, serverless document database that provides real-time synchronization, offline support via local persistence, and automatic multi-region replication. It is designed for mobile and web apps with millions of concurrent users, making it the ideal choice for this use case.

Exam trap

The trap here is that candidates often confuse Cloud Spanner's global SQL capabilities with NoSQL requirements, or assume Cloud Bigtable's NoSQL label fits all NoSQL workloads, ignoring the specific need for real-time sync and offline support.

How to eliminate wrong answers

Option A is wrong because Cloud Bigtable is a wide-column NoSQL database optimized for high-throughput analytical workloads (e.g., time-series, IoT), not for real-time sync or offline mobile app support, and it lacks built-in multi-region replication. Option B is wrong because Cloud Spanner is a globally distributed, strongly consistent relational SQL database, not a NoSQL database, and while it supports multi-region replication, it does not provide offline support for mobile clients. Option D is wrong because Cloud SQL is a managed relational SQL database (MySQL, PostgreSQL, SQL Server) that is not NoSQL, does not support offline mobile sync, and requires manual configuration for multi-region replication.

322
MCQeasy

A data analyst needs to transform nested and repeated fields in BigQuery. They have a table with a column of type ARRAY<STRUCT<...>>. Which SQL function should they use to flatten the array into individual rows for analysis?

A.STRUCT
B.CAST
C.UNNEST
D.REPLACE
AnswerC

UNNEST converts array elements into rows, allowing analysis of nested data.

Why this answer

UNNEST is used to flatten arrays into rows. STRUCT is used to group fields. CAST is for type conversion.

REPLACE is for string replacement.

323
Multi-Selecteasy

A data engineering team is operationalizing a machine learning model for real-time inference. They need to monitor the model's performance in production. Which THREE types of monitoring should they implement? (Choose three.)

Select 3 answers
A.Model accuracy decay
B.Model re-training frequency
C.Training pipeline failures
D.Prediction latency
E.Input feature drift
AnswersA, D, E

Measures decline in prediction quality over time.

Why this answer

Model accuracy decay (A) is critical because in production, the model's predictive performance can degrade over time due to changes in the underlying data distribution or business logic. Monitoring accuracy decay allows the team to detect when the model no longer meets its performance baseline, triggering retraining or rollback. This is a standard practice in MLOps for maintaining model reliability.

Exam trap

Google Cloud often tests the distinction between monitoring the model's operational health (latency, drift, accuracy) versus managing the training lifecycle (retraining frequency, pipeline failures), leading candidates to confuse infrastructure monitoring with model performance monitoring.

324
MCQmedium

You are designing a BigQuery data warehouse for a retail company. Queries frequently filter on order_date and customer_id. To optimize query performance and cost, which table design should you use?

A.Cluster by order_date and partition by customer_id
B.Partition by ingestion_time and cluster by order_date
C.Use a clustered table without partitioning
D.Partition by order_date and cluster by customer_id
AnswerD

This combination reduces scanned data and improves performance for filters on both columns.

Why this answer

Partitioning on order_date limits scans to relevant date ranges. Clustering on customer_id further organizes data within partitions, improving filter and aggregation queries on customer_id.

325
MCQeasy

A company wants to monitor the performance of a deployed model in production. Which metric indicates that the model's predictions are degrading?

A.Increase in prediction error rate
B.Increase in prediction latency
C.Decrease in throughput
D.Increase in number of requests
AnswerA

Error rate reflects model accuracy.

Why this answer

An increase in prediction error rate directly indicates that the model's outputs are deviating from the expected or ground-truth values, signaling degradation in predictive performance. This metric captures the core concept of model drift, where the statistical properties of the input data or the relationship between features and labels change over time, leading to less accurate predictions. In production ML monitoring, tracking error rate (e.g., classification accuracy, RMSE) is the primary method to detect when a model needs retraining or updating.

Exam trap

Google Cloud often tests the distinction between operational metrics (latency, throughput) and model performance metrics (error rate), trapping candidates who confuse system health with prediction quality.

How to eliminate wrong answers

Option B is wrong because prediction latency measures the time taken for the model to return a prediction, which reflects infrastructure or model complexity issues, not the accuracy or degradation of the predictions themselves. Option C is wrong because throughput (requests per second) is a measure of system capacity and scalability, not a direct indicator of prediction quality or model drift. Option D is wrong because an increase in the number of requests indicates higher demand or usage, which does not imply that the model's predictions are becoming less accurate or degrading.

326
MCQhard

You need to process a large volume of event data from Cloud Storage, apply complex transformations using Apache Spark, and then load the results into BigQuery. The data arrives in batches every hour. You want to minimize costs by using preemptible VMs. Which service should you use?

A.Cloud Composer
B.BigQuery
C.Dataproc
D.Dataflow
AnswerC

Dataproc clusters can use preemptible VMs for cost-efficient batch processing with Spark.

Why this answer

Dataproc supports preemptible (now called spot) VMs for cost savings. Dataflow does not support preemptible VMs for workers; it uses standard VMs. Cloud Composer is orchestration only.

BigQuery is not for running Spark.

327
MCQmedium

A company uses dbt on BigQuery to transform data. They want to run dbt models on a schedule and manage environments (dev, prod). Which GCP service should they use to run dbt jobs?

A.Dataflow
B.Cloud Composer
C.Cloud Scheduler
D.Cloud Build
AnswerB

Managed Airflow with DAGs, scheduling, and environment separation.

Why this answer

Cloud Composer is an Apache Airflow managed service that can schedule dbt runs.

328
Multi-Selectmedium

A data engineer is designing a streaming pipeline using Dataflow with Apache Beam. The pipeline reads from Pub/Sub, performs a stateful transformation (e.g., session windowing), and writes to BigQuery. The pipeline must handle late data and ensure exactly-once semantics. Which THREE configurations are required?

Select 3 answers
A.Use the File Loads write method for BigQuery
B.Set allowed lateness on the window to accommodate late data
C.Configure an appropriate trigger to control output frequency
D.Use a custom watermark estimation function for Pub/Sub source
E.Enable exactly-once processing on the Dataflow pipeline
AnswersB, C, E

Allowed lateness specifies how long the window should wait for late data, ensuring completeness.

Why this answer

Exactly-once sink (BigQuery) ensures no duplicates. Idempotent writes are built into Dataflow's BigQuery sink when using exactly-once mode. Setting allowed lateness handles late data.

Watermark estimation is automatic; custom is not required. Triggers are optional; default trigger works. Windowing is inherent.

329
MCQeasy

A company wants to transfer 500 TB of data from an on-premises Hadoop cluster to Google Cloud Storage (GCS) for processing with Dataproc. The on-premises network has a 1 Gbps dedicated link to Google Cloud. The data must be transferred as quickly as possible, minimizing network usage. Which transfer method should they use?

A.Use Storage Transfer Service over the 1 Gbps link.
B.Use gsutil cp in parallel with multiple threads.
C.Use Transfer Appliance to physically ship the data.
D.Use BigQuery Data Transfer Service for Hadoop.
AnswerC

Transfer Appliance can handle 500 TB in a single appliance, transferring the data offline within days.

Why this answer

Transfer Appliance is the correct method because the dataset is 500 TB and the network link is only 1 Gbps. At 1 Gbps, the theoretical maximum transfer time is over 46 days, and real-world throughput (due to overhead, congestion, and Hadoop data characteristics) would be even longer. Transfer Appliance physically ships the data, bypassing the network bottleneck entirely and minimizing network usage, which is the stated requirement.

Exam trap

The trap here is that candidates assume parallel transfers (gsutil cp) or managed services (Storage Transfer Service) can overcome bandwidth limitations, but they ignore the fundamental physics of a 1 Gbps link and the sheer size of 500 TB.

How to eliminate wrong answers

Option A is wrong because Storage Transfer Service still uses the 1 Gbps network link, which would take weeks to transfer 500 TB, failing the 'as quickly as possible' and 'minimizing network usage' requirements. Option B is wrong because gsutil cp with parallel threads still operates over the same 1 Gbps link and cannot exceed its bandwidth; it also does not minimize network usage. Option D is wrong because BigQuery Data Transfer Service for Hadoop is designed for scheduled, incremental loads from Hadoop to BigQuery, not for bulk initial transfer to GCS, and it still uses the network link.

330
MCQmedium

A company runs a real-time anomaly detection system on Google Cloud. Streaming data from IoT devices is ingested via Pub/Sub, processed by Dataflow (Apache Beam), and results are written to Bigtable for low-latency serving. Recently, the system has been experiencing increased latency and occasional data loss. The Dataflow pipeline shows high system lag and backlog in Pub/Sub. The Bigtable cluster has 3 nodes and is reporting high CPU utilization (over 90%). The team suspects the issue is with the pipeline configuration. They have already verified that there are no errors in the pipeline code and no network issues. Which action should they take to resolve the issue?

A.Increase the number of Bigtable nodes to handle the write throughput.
B.Change the Dataflow worker machine type to n2-standard-8.
C.Decrease the batch size in the Dataflow pipeline to reduce latency.
D.Increase the number of Dataflow workers to process messages faster.
AnswerA

High CPU utilization suggests Bigtable is overwhelmed; adding nodes increases capacity.

Why this answer

The high CPU utilization on Bigtable (over 90%) indicates that the cluster is saturated and cannot keep up with the write throughput from Dataflow. This causes backpressure in the pipeline, leading to increased system lag and backlog in Pub/Sub, and eventually data loss when Pub/Sub messages expire. Increasing the number of Bigtable nodes directly addresses the bottleneck by distributing the write load and reducing CPU pressure, which allows the pipeline to drain the backlog and reduce latency.

Exam trap

Google Cloud often tests the misconception that scaling Dataflow workers or changing machine types always resolves pipeline latency, but the trap here is that the bottleneck is at the sink (Bigtable), so you must scale the sink first to relieve backpressure.

How to eliminate wrong answers

Option B is wrong because changing the Dataflow worker machine type to n2-standard-8 would increase compute capacity for processing, but the bottleneck is at the Bigtable sink, not the Dataflow workers; the pipeline is already experiencing backpressure from Bigtable, so more worker CPU would not resolve the write throughput limitation. Option C is wrong because decreasing the batch size in Dataflow would increase the number of smaller writes to Bigtable, which actually increases overhead and CPU usage on Bigtable, worsening the latency and backlog issue. Option D is wrong because increasing the number of Dataflow workers would increase the parallelism of writes to Bigtable, further amplifying the write pressure on the already saturated Bigtable cluster, making the high CPU utilization and backlog worse.

331
MCQeasy

A company deploys a scikit-learn model on Vertex AI for online predictions. The model is packaged in a custom container with all dependencies. Users report high latency (over 5 seconds) for predictions. The model size is 2 GB. What is the most likely cause of the high latency?

A.Using online predictions instead of batch prediction
B.Not enabling GPU acceleration
C.Using a custom container with a large unoptimized model
D.Using a small machine type (e.g., n1-standard-2)
AnswerC

Large models in custom containers cause slow loading and inference; using a prebuilt container or optimizing the model would reduce latency.

Why this answer

A 2 GB model loaded into a custom container without optimization (e.g., quantization, pruning, or ONNX conversion) will cause significant cold-start latency and per-request loading overhead. Vertex AI online predictions require the model to be loaded into memory for each request or container instance; a large, unoptimized model increases both loading time and inference time, easily exceeding 5 seconds.

Exam trap

Google Cloud often tests the misconception that latency is always due to compute resources (CPU/GPU) or prediction type, when in fact the model's size and lack of optimization are the primary culprits in custom container deployments.

How to eliminate wrong answers

Option A is wrong because online predictions are designed for low-latency, real-time inference, and switching to batch prediction would not reduce latency for individual requests—batch prediction is for high-throughput, asynchronous jobs. Option B is wrong because GPU acceleration primarily speeds up matrix operations during inference, but the main bottleneck here is model size and loading overhead, not compute speed; a 2 GB model on CPU can still be fast if optimized. Option D is wrong because while a small machine type (e.g., n1-standard-2 with 2 vCPUs and 7.5 GB RAM) could contribute to latency, the most likely cause is the unoptimized model size; even a larger machine would still suffer from the same loading and inference delays if the model is not optimized.

332
MCQeasy

A company uses Cloud Dataproc to run Spark ML jobs. The jobs are memory-intensive and often fail with OutOfMemory errors. Which action would most effectively reduce memory pressure without changing the Spark code?

A.Increase the number of worker nodes and reduce the number of cores per worker.
B.Increase the master node's memory.
C.Increase the number of Spark partitions.
D.Use preemptible VMs for workers.
AnswerA

More workers spread memory load.

Why this answer

Increasing the number of worker nodes while reducing the number of cores per worker reduces memory pressure by distributing the workload across more JVMs, each with a smaller heap. This lowers the per-executor memory requirement and reduces the risk of OutOfMemory errors without modifying Spark code. In Cloud Dataproc, this approach directly addresses memory contention by giving each executor fewer tasks to process concurrently.

Exam trap

Google Cloud often tests the misconception that adding more partitions or increasing master memory solves executor-level memory issues, when the real solution is to reduce per-executor task concurrency by adjusting the worker-to-core ratio.

How to eliminate wrong answers

Option B is wrong because increasing the master node's memory does not help with executor memory pressure; the master node handles cluster coordination and driver tasks, not the memory-intensive worker processing. Option C is wrong because increasing the number of Spark partitions can reduce the data size per task but does not directly reduce per-executor memory pressure and may increase scheduling overhead without addressing the root cause. Option D is wrong because using preemptible VMs for workers reduces cost but does not change memory allocation per worker; preemptible VMs can be reclaimed at any time, potentially causing job instability and not solving OutOfMemory errors.

333
MCQhard

A company is building a data lake on Cloud Storage with data from multiple sources. They need to apply schema-on-read and support ad-hoc SQL queries. Which architecture is most suitable?

A.Ingest to Cloud Spanner, query directly.
B.Ingest to Cloud SQL, then export to Cloud Storage for queries.
C.Ingest to Cloud Storage, create BigQuery external tables.
D.Ingest to Cloud Storage, load into Dataproc for queries.
AnswerC

Schema-on-read and SQL.

Why this answer

BigQuery external tables allow schema-on-read by defining the schema at query time over data stored in Cloud Storage, enabling ad-hoc SQL queries without loading data into a separate system. This architecture directly supports the requirement for schema-on-read and SQL-based analysis, as BigQuery provides a serverless, scalable SQL engine.

Exam trap

Google Cloud often tests the distinction between schema-on-read (BigQuery external tables) and schema-on-write (traditional databases like Cloud Spanner or Cloud SQL), where candidates mistakenly choose a transactional database for analytical workloads.

How to eliminate wrong answers

Option A is wrong because Cloud Spanner is a globally distributed, strongly consistent relational database designed for transactional workloads, not for schema-on-read or ad-hoc SQL queries over raw data in a data lake. Option B is wrong because Cloud SQL is a managed relational database for OLTP workloads, and exporting to Cloud Storage for queries adds unnecessary latency and complexity, failing to leverage schema-on-read directly. Option D is wrong because Dataproc is a managed Spark/Hadoop service that requires data loading and cluster management, which is not as efficient or serverless as BigQuery external tables for ad-hoc SQL queries on a data lake.

334
MCQhard

A financial services company uses Cloud Composer to orchestrate a daily workflow that includes a Dataproc job for risk analysis. The workflow sometimes fails because the Dataproc cluster creation times out. The cluster creation typically takes 3 minutes, but occasionally takes over 10 minutes. What is the most effective way to handle this variability?

A.Create a long-running Dataproc cluster that remains idle and reuse it for each workflow.
B.Implement a retry loop with exponential backoff in the DAG.
C.Use preemptible VMs for the cluster to reduce cost and improve creation speed.
D.Increase the cluster creation timeout in the Airflow configuration.
AnswerA

Reusing an existing cluster eliminates the creation step and associated timeout.

Why this answer

Creating a long-running Dataproc cluster and reusing it eliminates the variable cluster creation time that causes timeouts. Cloud Composer (Airflow) can manage cluster lifecycle separately from the workflow, ensuring the cluster is always available when the Dataproc job runs. This approach decouples cluster provisioning from job execution, making the workflow resilient to creation delays.

Exam trap

The trap here is that candidates often assume retries or timeout adjustments are sufficient for infrastructure variability, but the most effective solution is to eliminate the variable step entirely by reusing a persistent cluster.

How to eliminate wrong answers

Option B is wrong because retry loops with exponential backoff only handle transient failures after a timeout occurs, but they do not address the root cause—the variable cluster creation time—and can lead to long delays or eventual failure if creation consistently exceeds the timeout. Option C is wrong because preemptible VMs are designed to reduce cost, not improve creation speed; they are actually more likely to be reclaimed and can cause cluster creation to fail or take longer due to availability constraints. Option D is wrong because increasing the cluster creation timeout in Airflow configuration merely extends the wait time without solving the underlying variability; it can mask the problem and lead to longer workflow execution times without guaranteeing success.

335
MCQeasy

An engineer needs to create a reusable Dataflow pipeline that can be executed with different parameters without modifying code. Which Dataflow feature should they use?

A.Dataflow Shuffle
B.Dataflow Flex Templates
C.Dataflow SQL
D.Dataflow Classic Templates
AnswerB

Flex Templates use Docker containers and support any pipeline dependency, allowing parameterization.

Why this answer

Flex Templates allow packaging a pipeline into a Docker image with parameterization, enabling reuse across different environments.

336
MCQhard

Refer to the exhibit. A Dataflow pipeline writes to BigQuery table employee_records. The pipeline was working yesterday but fails today. What is the most likely cause?

A.The pipeline dropped the last_name field entirely.
B.The pipeline code was changed to send an integer for the last_name field.
C.The BigQuery table quota was exceeded.
D.The BigQuery table schema was changed from STRING to INTEGER for last_name.
AnswerB

The error clearly states that an integer was provided for a string field.

Why this answer

If the pipeline code was changed to send an integer for the last_name field, BigQuery will reject the write due to a schema mismatch. BigQuery enforces strict type checking at ingestion time; an integer value cannot be written into a STRING column unless the schema explicitly allows coercion. Since the pipeline was working yesterday, the most likely change is in the data type being sent, not the schema itself.

Exam trap

Google Cloud often tests the misconception that schema changes in BigQuery are the primary cause of pipeline failures, when in fact the most common cause is a code change that alters the data type of a field being written, especially in streaming or batch pipelines where schema enforcement is strict.

How to eliminate wrong answers

Option A is wrong because dropping the last_name field entirely would cause a 'Required field missing' error, but the question states the pipeline fails today, and dropping a field is less likely than a type mismatch if the code was unchanged. Option C is wrong because BigQuery table quota exceeded would affect all writes, not just this pipeline, and would typically produce a 'quota exceeded' error message, not a schema mismatch failure. Option D is wrong because if the BigQuery table schema was changed from STRING to INTEGER for last_name, the pipeline sending a string would also fail, but the question states the pipeline code was changed to send an integer, making the schema change less likely as the cause; moreover, schema changes are typically controlled and would be noticed, whereas a code change is a common oversight.

337
MCQhard

You are designing a BigQuery data warehouse for a multi-tenant SaaS application. Each tenant's data must be isolated and queried only by that tenant. You need to minimise management overhead and allow tenants to be added dynamically. Which approach should you use?

A.Use Cloud IAM conditions on the dataset to filter by tenant_id
B.Use a single dataset with authorized views that filter by tenant_id, granting each tenant access to their view
C.Create a separate dataset for each tenant and grant the tenant access to their dataset
D.Use a single table with a tenant_id column and enable column-level security to restrict access
AnswerB

Authorized views provide row-level security without duplicating data. Easy to add new tenants.

Why this answer

Authorized views in a shared dataset allow you to create row-level security. By creating a view per tenant that filters by tenant_id, you can grant each tenant access only to its view. This avoids managing multiple datasets and is scalable.

338
Multi-Selectmedium

Your team is running a Dataflow streaming pipeline that reads from Pub/Sub, transforms data, and writes to BigQuery. You notice that the pipeline's backlog is growing and the processing latency has increased from seconds to minutes. You need to diagnose and resolve the issue. Which TWO actions should you take? (Choose two.)

Select 2 answers
A.Stop the pipeline, increase the number of workers in the streaming engine configuration, and restart it.
B.Increase the batch size in the WriteToBigQuery transform to reduce I/O operations.
C.Configure a dead-letter queue in Cloud Storage for failed messages to reduce reprocessing load.
D.Increase the maximum number of workers in the pipeline's autoscaling configuration to allow more compute resources.
E.Examine the Dataflow monitoring dashboard for metrics like system lag, data freshness, and worker throughput.
AnswersD, E

Allowing more workers can reduce backlog if the pipeline is CPU-bound.

Why this answer

Increasing the maximum number of workers in the autoscaling configuration allows Dataflow to scale out horizontally, adding more compute resources to handle the increased backlog and reduce processing latency. Dataflow's autoscaling algorithm uses metrics like backlog bytes and CPU utilization to decide when to add workers, but it is capped by the max workers setting. Raising this cap enables the pipeline to allocate more VMs, thus processing more messages per second and reducing the backlog.

Exam trap

Google Cloud often tests the misconception that you must stop a streaming pipeline to change worker count or that increasing batch size always improves throughput, when in fact Dataflow supports live autoscaling and larger batches can worsen latency.

339
MCQmedium

A data engineer wants to train a linear regression model in BigQuery ML to predict sales. The training data includes a categorical feature with 1000+ unique values. Which method is most appropriate to handle this feature in the CREATE MODEL statement?

A.Set max_categorical_features=100 in the model options.
B.Use TRANSFORM clause with ML.FEATURE_CROSS or manual hashing.
C.Use the OPTIONS(ENCODE='ONE_HOT_ENCODING') parameter in the model options.
D.The model automatically handles high-cardinality features without any additional steps.
AnswerB

TRANSFORM allows custom feature engineering including hashing for high-cardinality features.

Why this answer

BigQuery ML automatically one-hot encodes categorical features with fewer than a threshold of unique values. For high-cardinality features, you can use TRANSFORM to apply feature engineering like hashing or bucketizing.

340
MCQhard

You are a data engineer at a global e-commerce company. Your team manages a real-time recommendation system that ingests user clickstream events from a Pub/Sub topic (topic-clickstream). The pipeline uses Dataflow to read events, join with user profile data from Cloud Bigtable, compute recommendations using a machine learning model hosted on Cloud Run, and write results to a BigQuery table for analytics. The pipeline has been running smoothly for months, but recently the Dataflow job started failing with the error: "Workflow failed. Causes: S01:ReadPubSub/Read+Transform/ParDo(ExtractUserID)+ ... (5a3b2c1d) The job failed because a worker encountered an out-of-memory error." The Dataflow job uses the Streaming Engine feature with a worker type of n2-standard-8 (8 vCPU, 32 GB memory) and autoscaling from 2 to 20 workers. The clickstream event rate has increased from 500 events/second to 5000 events/second over the past week. The user profile data in Bigtable has also grown, with average row size increasing from 1 KB to 10 KB due to additional fields. You need to resolve the out-of-memory errors without completely redesigning the pipeline. What should you do?

A.Increase the maximum number of workers in autoscaling from 20 to 50.
B.Change the worker machine type to n2-highmem-8 (8 vCPU, 64 GB memory) in the Dataflow job configuration.
C.Reduce the batch size in the Dataflow pipeline by setting the `max_batch_size` parameter to a lower value.
D.Increase the number of Bigtable nodes to improve read throughput.
AnswerB

Increasing memory per worker directly addresses OOM without major pipeline changes.

Why this answer

The out-of-memory error is caused by the increased per-worker memory load from larger Bigtable rows (1 KB to 10 KB) and higher event throughput (500 to 5000 events/sec). Switching to n2-highmem-8 doubles the memory from 32 GB to 64 GB, giving each worker more headroom to cache user profiles and process larger batches without OOM. This directly addresses the root cause without redesigning the pipeline.

Exam trap

Google Cloud often tests the misconception that scaling out (more workers) solves memory issues, when in fact the per-worker memory limit is the bottleneck and must be increased via a higher-memory machine type.

How to eliminate wrong answers

Option A is wrong because increasing the maximum number of workers spreads the load across more machines but does not increase the memory per worker; each worker still has only 32 GB, so the same OOM condition persists on individual workers. Option C is wrong because reducing batch size lowers memory per batch but increases the number of batches and overhead, which can worsen performance and still not prevent OOM if the per-row memory footprint (10 KB) is the dominant factor. Option D is wrong because Bigtable node count affects read throughput and latency, not the memory consumed by the Dataflow worker when caching or processing rows; the OOM is on the Dataflow side, not Bigtable.

341
Multi-Selecthard

A company is migrating ML workflows to Vertex AI Pipelines. They want to ensure best practices for pipeline reproducibility and debugging. Which THREE actions should they take? (Choose three.)

Select 3 answers
A.Set a random seed for all training components
B.Store all artifacts in Cloud Storage with versioned prefixes
C.Pin all dependencies in training images
D.Use dynamic pipeline parameters for each run
E.Use conditional execution based on previous component outputs
AnswersA, B, C

Random seeds ensure deterministic training results.

Why this answer

Setting a random seed for all training components ensures deterministic behavior, meaning that the same inputs will produce the same outputs across multiple runs. This is critical for debugging and reproducibility in Vertex AI Pipelines, as it eliminates stochastic variability that can mask bugs or make results irreproducible. Without a fixed seed, even identical code and data can yield different model weights or metrics, complicating root cause analysis.

Exam trap

Google Cloud often tests the distinction between features that improve workflow flexibility (like dynamic parameters or conditional execution) and those that enforce reproducibility and debuggability, leading candidates to confuse operational convenience with best practices for deterministic pipelines.

342
Multi-Selectmedium

A data engineer is designing a batch processing system using Cloud Dataproc. Which TWO practices improve performance and reduce costs? (Choose TWO.)

Select 2 answers
A.Always use persistent disks for all nodes.
B.Set autoscaling policies based on YARN memory.
C.Store intermediate data in HDFS.
D.Use preemptible VMs for worker nodes.
E.Use the largest machine types for master nodes.
AnswersB, D

Optimizes resource utilization.

Why this answer

Autoscaling policies based on YARN memory allow the cluster to dynamically add or remove worker nodes in response to actual resource demand from running jobs. This prevents over-provisioning (reducing costs) and ensures sufficient resources for job completion (improving performance), as Cloud Dataproc directly monitors YARN memory metrics to trigger scaling actions.

Exam trap

The trap here is that candidates often confuse HDFS with Cloud Storage, assuming intermediate data must be stored locally for performance, but Cloud Storage is actually faster and cheaper for transient data in Dataproc due to its native integration and lack of replication overhead.

343
Multi-Selecthard

A company uses AutoML Tables to train a classification model. They want to improve model performance by engineering new features from existing timestamp columns. Which three techniques can they apply within AutoML Tables? (Choose 3)

Select 3 answers
A.Manually add a column with a boolean indicating if the timestamp falls on a weekend.
B.Create a new column with the difference between two timestamps.
C.Use the 'feature engineering' option to add polynomial features.
D.Apply a SQL UDF in the AutoML Tables training configuration.
E.Extract day of week from timestamp using the AutoML Tables UI.
AnswersB, C, E

You can precompute this in the source data and include it as a feature.

Why this answer

AutoML Tables automatically extracts features from timestamp columns, such as day of week, month, hour, etc. Users can also manually create new columns via the UI or by preprocessing data before import. However, manual SQL functions cannot be used directly within AutoML Tables.

344
MCQeasy

Refer to the exhibit. A Cloud Build step fails when pushing a Docker image to Artifact Registry. What is the missing IAM role for the Cloud Build service account?

A.roles/artifactregistry.writer
B.roles/containerregistry.admin
C.roles/storage.objectCreator
D.roles/cloudbuild.builds.editor
AnswerA

This role allows pushing images to Artifact Registry.

Why this answer

The Cloud Build service account needs the `roles/artifactregistry.writer` role to push Docker images to Artifact Registry. This role grants the necessary permissions to upload artifacts, including images, to the registry. Without it, the build step fails with an authorization error.

Exam trap

Google Cloud often tests the distinction between Artifact Registry and Container Registry roles, and the trap here is that candidates confuse `roles/containerregistry.admin` (for Container Registry) with the correct Artifact Registry role, or assume that Cloud Build's own editor role includes artifact push permissions.

How to eliminate wrong answers

Option B is wrong because `roles/containerregistry.admin` is for Container Registry (gcr.io), not Artifact Registry, and the question specifies Artifact Registry. Option C is wrong because `roles/storage.objectCreator` applies to Cloud Storage buckets, not Artifact Registry repositories. Option D is wrong because `roles/cloudbuild.builds.editor` allows managing Cloud Build builds but does not grant permissions to push artifacts to Artifact Registry.

345
MCQmedium

A data pipeline using Cloud Pub/Sub and Cloud Dataflow is experiencing duplicate messages. The source system publishes messages at least once. What Dataflow technique ensures exactly-once processing?

A.Use idempotent sinks
B.Use GlobalWindows
C.Set watermark threshold
D.Enable streaming engine
AnswerA

Idempotent sinks allow safe duplicate writes, achieving exactly-once.

Why this answer

Idempotent sinks ensure that even if Cloud Pub/Sub delivers the same message multiple times (due to its at-least-once delivery semantics), the Dataflow pipeline can deduplicate or safely reapply the same data without causing duplicates in the output. This is achieved by designing the sink (e.g., BigQuery with insertId, Cloud Storage with unique filenames) to recognize and ignore repeated writes, effectively providing exactly-once processing semantics downstream.

Exam trap

The trap here is that candidates confuse 'exactly-once processing' with 'exactly-once delivery' from the source, but Pub/Sub only guarantees at-least-once delivery, so the responsibility for deduplication falls on the Dataflow pipeline and its sink design, not on windowing or engine settings.

How to eliminate wrong answers

Option B is wrong because GlobalWindows groups all elements into a single window for batch-like processing, but it does not address message duplication; it only changes how data is windowed, not how duplicates are handled. Option C is wrong because setting a watermark threshold controls how long the pipeline waits for late data, which affects completeness and latency but does not prevent duplicate messages from being processed. Option D is wrong because enabling Streaming Engine improves scalability and reduces checkpoint latency in Dataflow, but it does not provide deduplication or exactly-once guarantees; duplicates can still occur from Pub/Sub's at-least-once delivery.

346
Multi-Selectmedium

A data engineer needs to build a feature engineering pipeline using Vertex AI Pipelines. The pipeline should preprocess data, train a model, and deploy it. Which two components are required to define the pipeline? (Choose 2)

Select 2 answers
A.Kubeflow Pipelines SDK
B.TensorFlow Extended (TFX)
C.Vertex AI Feature Store
D.Dataflow
E.Cloud Composer
AnswersA, B

The SDK is used to define pipeline components and the pipeline graph.

Why this answer

Vertex AI Pipelines uses the Kubeflow Pipelines SDK (or TFX) to define components and compile them into a pipeline. The pipeline is then run on Vertex AI Pipelines.

347
MCQmedium

A data engineer is creating a Dataflow Flex Template for a batch pipeline that reads from BigQuery and writes to Cloud Storage. They need to pass a runtime parameter for the output bucket. How should they define this parameter?

A.Set an environment variable in Cloud Shell
B.Use the --parameters flag with the pipeline options
C.Hardcode the bucket name in the template
D.Define the parameter in the pipeline's code and use ValueProvider
AnswerD

Why this answer

Dataflow Flex Templates require runtime parameters to be defined as `ValueProvider` objects in the pipeline code. This allows the parameter value to be supplied at job submission time via the `--parameters` flag, enabling the same template to be reused with different output buckets without recompilation.

Exam trap

Google often tests the distinction between defining a parameter (using `ValueProvider` in code) and supplying its value (using `--parameters` at submission), leading candidates to mistakenly choose Option B as the complete solution.

How to eliminate wrong answers

Option A is wrong because environment variables in Cloud Shell are not accessible to the Dataflow service at runtime; they are only available in the shell session and cannot be passed into a Flex Template job. Option B is wrong because the `--parameters` flag is used to supply values to `ValueProvider` parameters at job submission, but it does not define the parameter itself — the parameter must first be declared as a `ValueProvider` in the pipeline code. Option C is wrong because hardcoding the bucket name defeats the purpose of using a Flex Template, which is designed to be parameterized and reusable across different environments and runs.

348
MCQhard

A company runs a Dataproc cluster for nightly batch jobs. The cluster uses preemptible workers for cost savings. Recently, the jobs have been failing intermittently with 'Disk quota exceeded' errors on the persistent disks attached to the preemptible workers. The cluster is configured with a master node and 10 worker nodes, each with a 100 GB persistent disk. The preemptible workers are dynamically added and removed. What is the most likely cause and the best long-term solution?

A.The persistent disks of the preemptible workers are too small. Resize the persistent disks to 200 GB each.
B.The preemptible workers are using local SSDs that are not recreated on reclaim. Use non-preemptible workers with local SSDs instead.
C.The preemptible workers are exceeding the project's persistent disk quota in the region because every time a preempted worker restarts, it tries to attach a new disk. Increase the disk quota.
D.The preemptible workers do not have enough persistent disk space to store intermediate shuffle data. Switch to standard workers to avoid this issue.
AnswerC

This is correct because preemptible workers when reclaimed leave behind unattached disks that still count against the regional persistent disk quota. The cluster tries to attach new disks for replacement workers, causing quota exhaustion.

Why this answer

The intermittent 'Disk quota exceeded' errors on preemptible workers are caused by the project's regional persistent disk quota being exhausted. When a preemptible worker is reclaimed, the cluster attempts to attach a new persistent disk to the replacement worker, but the old disk is not immediately deleted, leading to a buildup of unattached disks that consume quota. The best long-term solution is to increase the persistent disk quota in the region to accommodate the temporary disks from preempted workers.

Exam trap

The trap here is that candidates mistakenly attribute the error to insufficient disk size or shuffle data capacity, rather than recognizing it as a regional quota exhaustion issue caused by orphaned disks from preempted workers.

How to eliminate wrong answers

Option A is wrong because resizing disks to 200 GB does not address the quota exhaustion issue; the error is about quota, not disk size, and increasing disk size would actually consume more quota per disk. Option B is wrong because local SSDs are ephemeral and not recommended for preemptible workers, as they are lost on preemption, and the error is about persistent disk quota, not local SSD recreation. Option D is wrong because the error is not about insufficient disk space for shuffle data; it is a quota limit error, and switching to standard workers would increase costs without fixing the underlying quota issue.

349
MCQhard

You are building a real-time fraud detection system using Dataflow. Events from Pub/Sub need to be grouped by user_id within a 5-minute window to detect suspicious patterns. Some events may be delayed by up to 2 minutes. How should you configure the window and trigger to balance accuracy and latency?

A.Sliding window of 5 minutes with a 1-minute period and no allowed lateness
B.Session window with a gap duration of 5 minutes
C.Fixed window of 5 minutes with no allowed lateness and default trigger
D.Fixed window of 5 minutes with allowed lateness of 2 minutes and early trigger every 1 minute
AnswerD

Early triggers provide low-latency results, and allowed lateness captures delayed events.

Why this answer

A fixed 5-minute window with allowed lateness of 2 minutes and a trigger that fires early every minute provides early results and captures late data within the allowed window.

350
MCQhard

A large e-commerce company is migrating its on-premise Hadoop cluster to Google Cloud using Dataproc for batch processing. The cluster processes daily sales data from multiple sources, generates aggregated reports, and performs ad-hoc analysis. The migration is complete, but users report that jobs are running 30% slower than on-premise. The data is stored in Cloud Storage as Parquet files partitioned by date. The Dataproc cluster uses preemptible VMs for worker nodes, and the master node uses a standard VM. The jobs heavily rely on shuffling data between stages. The cluster's autoscaling is enabled with a minimum of 10 and a maximum of 50 workers. During job execution, CPU utilization on workers is low, but disk I/O is high, especially on local SSDs. The network utilization is moderate. The team suspects that the shuffle operation is causing the slowdown. Which action should the team take to improve job performance?

A.Attach additional local SSDs to each worker to increase local disk capacity and I/O throughput.
B.Enable Cloud Storage as a shuffle destination by setting the property `dataproc:dataproc.shuffle.direct` to `true` and ensure the cluster has appropriate IAM permissions.
C.Change all worker VMs from preemptible to standard VMs to avoid preemption and improve reliability.
D.Increase the maximum number of preemptible workers to 100 to provide more parallelism.
AnswerB

Cloud Storage shuffle can offload intermediate shuffle data to Cloud Storage, reducing local disk I/O and potentially improving overall shuffle performance, especially when local disks are saturated.

Why this answer

B is correct because the high disk I/O on local SSDs during shuffling indicates that the shuffle data is being written to local disk, which is a bottleneck. By enabling Cloud Storage as a shuffle destination via `dataproc:dataproc.shuffle.direct`, shuffle data is written directly to Cloud Storage, bypassing local disks and leveraging Google Cloud's high-throughput object storage. This reduces disk I/O contention and improves shuffle performance, especially when preemptible VMs are used, as shuffle data is not lost on VM preemption.

Exam trap

The trap here is that candidates often assume adding more local SSDs or increasing worker count will solve shuffle bottlenecks, but the real issue is the I/O bottleneck of local disks, and Cloud Storage shuffle is the specific Dataproc feature designed to offload shuffle data to a scalable, high-throughput object store.

How to eliminate wrong answers

Option A is wrong because attaching additional local SSDs increases capacity but does not address the root cause of high disk I/O during shuffling; the bottleneck is the local disk I/O itself, not capacity, and Cloud Storage shuffle provides better throughput. Option C is wrong because changing preemptible VMs to standard VMs improves reliability but does not directly address the shuffle I/O bottleneck; the performance issue is disk I/O, not VM preemption. Option D is wrong because increasing the maximum number of preemptible workers to 100 increases parallelism but does not reduce the disk I/O bottleneck during shuffling; more workers can actually increase shuffle traffic and exacerbate the problem.

351
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 is designed for time-series forecasting in BQML.

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.

352
MCQmedium

A company needs to grant analysts access to a BigQuery table that contains sensitive PII columns. The analysts should be able to run aggregate queries on the entire dataset but must not see individual PII values. Which approach should the team use?

A.Create a user-defined function (UDF) that aggregates the data and grant analysts permission to call the UDF.
B.Use BigQuery row-level security to restrict access to non-PII rows only.
C.Create an authorized view that does not include the PII columns and grant analysts access to the view.
D.Use BigQuery column-level security with data masking to mask the PII columns for the analysts' role.
AnswerD

BigQuery column-level security with data masking allows you to define masking policies on specific PII columns (e.g., using `DEFAULT_MASKING_RULE` or custom policies) that automatically transform the data for analysts' roles while still permitting aggregate queries over the entire dataset. This approach ensures analysts never see individual PII values, yet they can run `COUNT`, `SUM`, `AVG`, etc., on the masked columns, meeting both requirements precisely.

Why this answer

BigQuery column-level security with data masking allows you to define masking policies on specific PII columns (e.g., using `DEFAULT_MASKING_RULE` or custom policies) that automatically transform the data for analysts' roles while still permitting aggregate queries over the entire dataset. This approach ensures analysts never see individual PII values, yet they can run `COUNT`, `SUM`, `AVG`, etc., on the masked columns, meeting both requirements precisely.

Exam trap

Google Cloud often tests the distinction between row-level security (filtering rows) and column-level security (masking or hiding columns), and candidates mistakenly choose row-level security when the requirement is to hide specific column values across all rows.

How to eliminate wrong answers

Option A is wrong because a UDF that aggregates data would still require analysts to have access to the underlying table to call the UDF, and the UDF cannot prevent analysts from querying the raw table directly if they have table-level permissions. Option B is wrong because row-level security filters entire rows based on a condition (e.g., `user_email = SESSION_USER()`), but here the requirement is to hide specific columns (PII) across all rows, not to exclude entire rows. Option C is wrong because an authorized view that omits PII columns would prevent analysts from seeing those columns, but it also prevents them from running aggregate queries that include PII columns (e.g., `AVG(salary)`), which the requirement explicitly allows as long as individual values are hidden.

353
MCQeasy

A streaming Dataflow pipeline needs to be updated without draining the existing pipeline. Which update strategy should be used?

A.Drain the pipeline first, then start a new one
B.Replace the job with a new job using the same pipeline name
C.Use a different pipeline name and cancel the old one
D.Stop the job, update the code, and restart
AnswerB

Dataflow supports updating an existing streaming job if the pipeline name matches and the graph is compatible.

Why this answer

Dataflow Streaming Engine allows updates without draining by using the same pipeline name and enabling Streaming Engine.

354
MCQmedium

You have a batch prediction job on Vertex AI that processes millions of records. The job is failing with an out-of-memory error. What is the best way to resolve this?

A.Increase the minNodes and maxNodes for the batch prediction job
B.Split the input data into smaller files and run multiple batch prediction jobs
C.Enable autoscaling on the batch prediction job
D.Use a machine type with more memory for the batch prediction job
AnswerD

Increasing memory directly solves OOM.

Why this answer

A batch prediction job on Vertex AI runs on a single machine (or a cluster of machines) and an out-of-memory (OOM) error indicates that the model or data processing exceeds the available RAM of the chosen machine type. Increasing the machine's memory directly addresses the root cause by providing more heap space for loading the model and processing large batches of predictions, without altering the job's parallelism or data partitioning.

Exam trap

The trap here is that candidates confuse scaling out (increasing nodes or autoscaling) with scaling up (increasing per-node resources), and assume that more nodes or splitting data will fix a memory exhaustion issue that is actually caused by insufficient RAM on each individual machine.

How to eliminate wrong answers

Option A is wrong because minNodes and maxNodes control the number of replicas for distributed prediction, not the memory per machine; increasing nodes spreads the workload but does not increase per-node memory, so OOM errors can still occur on each node. Option B is wrong because splitting input data into smaller files and running multiple jobs addresses data size but not the per-instance memory limit; if the model itself is large or each prediction requires significant memory, even smaller files can cause OOM on the same machine type. Option C is wrong because autoscaling adjusts the number of nodes based on load, not the memory capacity of each node; it can help with throughput but does not resolve a fundamental memory shortage on individual machines.

355
MCQmedium

A data engineer needs to build a LookML model in Looker to define business logic and relationships for a new dataset. They want to create an 'explore' that joins an 'orders' view with a 'customers' view. Where should they define this join?

A.In the Looker admin panel, under 'Joins', create a new join.
B.In the model file, within the 'explore' definition, add a 'join' parameter.
C.In the 'orders.view.lkml' file, add a 'join' parameter.
D.In the 'customers.view.lkml' file, add a 'join' parameter.
AnswerB

Correct. The explore definition in the model file (or an explore file) contains the join logic linking views.

Why this answer

In LookML, the explore file (or the explore definition within a model file) is where you define which views to include and how they join together. The view files (*.view.lkml) define the dimension and measure logic for a single table or derived table. The model file (*.model.lkml) ties everything together and defines explores.

356
MCQmedium

A BigQuery query fails with the error shown in the exhibit. What is the most likely cause?

A.The query scans too many partitions or data without efficient pruning
B.The table has too many partitions
C.The user does not have permission to query the table
D.Insufficient slot capacity in the project
AnswerA

SELECT * on a large table can exceed resource limits; partition pruning might help.

Why this answer

The error indicates that the query attempted to scan too many partitions or a large amount of data without effective partition pruning. BigQuery charges based on the amount of data processed, and queries that scan all partitions of a large table can hit limits or incur high costs. The most likely cause is that the query's WHERE clause does not filter on the partitioning column, forcing a full table scan across all partitions.

Exam trap

Google Cloud often tests the distinction between 'too many partitions' (a table design issue) and 'scanning too many partitions' (a query design issue), leading candidates to mistakenly choose the option about partition count rather than the lack of pruning.

How to eliminate wrong answers

Option B is wrong because having too many partitions does not directly cause a query failure; BigQuery supports up to 4,000 partitions per table, and the error is about scanning too many partitions, not the count itself. Option C is wrong because permission errors produce a distinct 'Access Denied' or 'Permission denied' message, not a partition scanning error. Option D is wrong because insufficient slot capacity results in 'Resources exceeded' or 'Query execution timed out' errors, not a partition scanning limit error.

357
MCQmedium

A retailer wants to use machine learning to predict customer churn based on transaction history and demographic data. The dataset has 500 features, many of which are correlated. The data is highly imbalanced: only 2% churn. They need to deploy a model that provides feature importance and is interpretable. Which model type should they use in BigQuery ML?

A.Logistic regression
B.AutoML Tables model
C.Deep Neural Network (DNN) classifier
D.Boosted tree classifier
AnswerD

Boosted trees handle imbalanced data, provide feature importance, and are reasonably interpretable.

Why this answer

Boosted tree models (like XGBoost) handle imbalanced data well, provide feature importance, and offer interpretability. Deep Neural Networks are less interpretable. Logistic regression is interpretable but may not capture complex patterns.

AutoML Tables is powerful but less interpretable and may cost more.

358
Multi-Selectmedium

A data engineering team is building a CI/CD pipeline for machine learning models using Cloud Build and AI Platform. Which TWO practices are essential for ensuring reproducible and safe model deployments?

Select 2 answers
A.Use Cloud Functions to trigger retraining on new data arrival.
B.Tag each model version with the Git commit hash of the training code.
C.Run integration tests against the model on a staging endpoint before promoting to production.
D.Use the same environment for training and serving, possibly via custom containers.
E.Directly deploy from the development environment using gcloud commands.
AnswersB, C

Links model to exact code version for reproducibility.

Why this answer

Tagging each model version with the Git commit hash of the training code (Option B) ensures full traceability from code to deployed model. This practice allows the team to exactly reproduce the training environment and code state, which is critical for debugging, auditing, and rolling back to a known-good version. Without this link, the model becomes a black box, and any attempt to recreate it relies on undocumented assumptions.

Exam trap

A common trap in this question is confusing best practices for consistency (such as using the same environment for training and serving) with essential practices for reproducibility and safety (such as version tagging and staged testing) in Google Cloud's AI Platform CI/CD pipelines. Candidates often select Option D because it is a good practice, but it is not explicitly required for reproducibility and safety as defined by the question.

359
MCQeasy

A company stores raw data files in Cloud Storage in a bucket named 'raw-data'. After processing, the files are moved to a 'processed' bucket. To reduce costs, they want to automatically delete raw data older than 30 days. What should they do?

A.Enable object versioning on the 'raw-data' bucket and configure a lifecycle rule to delete noncurrent versions.
B.Configure a lifecycle rule on the 'raw-data' bucket to delete objects older than 30 days.
C.Set a retention policy on the 'raw-data' bucket to expire objects after 30 days.
D.Use a bucket policy that denies read access to objects older than 30 days.
AnswerB

A lifecycle rule on the bucket can be configured to delete objects after a specified number of days. This directly implements the requirement to delete raw data older than 30 days, reducing costs automatically.

Why this answer

Cloud Storage lifecycle management allows you to set a rule that automatically deletes objects after a specified number of days from their creation time. By configuring a lifecycle rule on the 'raw-data' bucket to delete objects older than 30 days, the company can achieve cost reduction without manual intervention. This directly addresses the requirement to remove raw data files that have been processed and are no longer needed.

Exam trap

The trap here is confusing lifecycle deletion rules with retention policies or versioning: candidates often think retention policies delete data after a period, but they actually prevent deletion, while versioning with noncurrent deletion only removes old versions, not the current object.

How to eliminate wrong answers

Option A is wrong because enabling object versioning and deleting noncurrent versions does not delete the current (original) objects; it only removes older versions, so raw data files would remain in the bucket indefinitely. Option C is wrong because a retention policy (e.g., using Object Hold or Retention Policy) prevents deletion or modification of objects for a specified duration, which would keep the data for at least 30 days, not delete it after 30 days. Option D is wrong because a bucket policy that denies read access does not delete the objects; the files would still exist and incur storage costs, failing to meet the cost-reduction goal.

360
MCQhard

A company uses Vertex AI to serve a model that requires GPU for inference. They want to minimize cost while handling variable traffic. Which strategy should they use?

A.Deploy the model to Cloud Functions with GPU
B.Use a Vertex AI Endpoint with GPU and configure auto-scaling to zero when idle
C.Use Vertex AI Batch Prediction with GPU
D.Use a Vertex AI Endpoint with GPU with a fixed number of replicas
AnswerB

Scales to zero reduces cost.

Why this answer

Vertex AI Endpoints support GPU-accelerated inference with autoscaling, including the ability to scale down to zero replicas when there is no traffic. This minimizes cost by only incurring GPU charges during active inference, while still handling variable traffic through dynamic scaling.

Exam trap

Google Cloud often tests the misconception that serverless services like Cloud Functions can support GPU acceleration, when in reality GPU compute requires dedicated infrastructure like Vertex AI Endpoints or GKE.

How to eliminate wrong answers

Option A is wrong because Cloud Functions do not support GPU attachments; they are designed for lightweight, event-driven compute and cannot run GPU-accelerated inference. Option C is wrong because Vertex AI Batch Prediction is intended for offline, asynchronous processing of large datasets, not for serving real-time variable traffic with low latency. Option D is wrong because using a fixed number of replicas with GPU does not minimize cost; it keeps GPU instances running continuously regardless of traffic, leading to higher costs during idle periods.

361
Multi-Selecthard

A company uses BigQuery for analytics on petabyte-scale data. They want to improve query performance by denormalizing schemas and reducing joins. Which TWO BigQuery features should they use? (Choose 2)

Select 2 answers
A.Clustering on frequently filtered columns
B.Using subqueries instead of JOINs
C.External tables reading from Cloud Storage
D.Table partitioning by date
E.Nested and repeated fields (ARRAY<STRUCT<...>>)
AnswersA, E

Clustering organizes data based on column values, improving filter performance and reducing scanned data. While it does not directly denormalize, it is essential for efficient queries on denormalized schemas.

Why this answer

For denormalizing schemas and reducing joins, BigQuery offers nested and repeated fields (ARRAY<STRUCT<...>>) to embed related data in a single row. Additionally, clustering on frequently filtered columns optimizes physical data layout, speeding up queries on denormalized tables. Together, these features improve query performance by minimizing data shuffling and enabling efficient filtering.

Exam trap

A common mistake is to think that only clustering or partitioning can replace denormalization, but nested/repeated fields are needed for schema denormalization. Clustering is a complementary physical optimization.

362
Multi-Selecthard

A company wants to use BigQuery ML to train a time-series forecasting model on historical sales data. The data is recorded daily for 3 years. They need to evaluate model accuracy using time-series aware cross-validation. Which two options should they configure in the CREATE MODEL statement? (Choose TWO)

Select 2 answers
A.Set the data_frequency parameter to 'daily'
B.Use the 'num_trials' parameter for hyperparameter tuning
C.Specify a time_series_timestamp_col and time_series_data_col
D.Set the 'split_method' to 'time_series'
E.Set the model_type to 'ARIMA_PLUS'
AnswersC, E

These are required columns for time-series.

Why this answer

For ARIMA+ models, you can set 'horizon' (forecast length) and 'data_frequency' (auto-detect or set). Cross-validation is not built-in for ARIMA; instead, you evaluate on held-out periods.

363
MCQeasy

A data engineer needs to create a BigQuery ML model for predicting customer churn using a dataset with 10 million rows and 50 features. The dataset is highly imbalanced (5% churn). Which approach should the engineer use to handle class imbalance during model training?

A.Undersample the majority class before training
B.Use the CREATE MODEL statement with CLASS_WEIGHTS = {'0': 0.2, '1': 0.8}
C.Use SMOTE via TRANSFORM clause in BigQuery ML
D.Oversample the minority class by duplicating rows
AnswerB

BigQuery ML supports class weights to handle imbalance by assigning higher weights to the minority class.

Why this answer

BigQuery ML supports class weights for imbalanced datasets via the CLASS_WEIGHTS option in CREATE MODEL. This assigns higher weight to the minority class without generating synthetic data. SMOTE is not available in BigQuery ML.

Undersampling the majority class would lose data, and oversampling with duplication could introduce bias.

364
MCQmedium

Your company uses Vertex AI Pipelines to automate model retraining. The pipeline has three steps: data extraction from BigQuery, feature engineering using Dataflow, and model training using a custom container on Vertex AI Training. Recently, the pipeline has been failing intermittently at the Dataflow step with a 'The job encountered a transient error. Please retry.' message. You have enabled pipeline retries with 3 attempts. However, the pipeline still fails after 3 retries. You check the logs and find that the Dataflow job requires more resources than the default worker configuration provides. Which change should you make to reduce the failure rate?

A.Increase the number of Dataflow workers to improve parallelism
B.Increase the number of retries in the pipeline to 5
C.Replace Dataflow with Dataproc to run the feature engineering step
D.Increase the Dataflow worker machine type to have more memory and CPU in the pipeline step configuration
AnswerD

More resources prevent the transient resource exhaustion errors.

Why this answer

The pipeline fails due to insufficient resources (memory and CPU) in the default Dataflow worker configuration. By increasing the worker machine type (e.g., using a custom machine type with more vCPUs and memory), the Dataflow job can handle the feature engineering workload without hitting resource limits, reducing transient failures. This directly addresses the root cause identified in the logs, unlike retries or parallelism changes.

Exam trap

Google Cloud often tests the misconception that increasing parallelism (more workers) or retries will fix resource exhaustion errors, when the actual fix is to increase per-worker resources by selecting a larger machine type.

How to eliminate wrong answers

Option A is wrong because increasing the number of workers improves parallelism but does not address the root cause of insufficient per-worker resources (memory/CPU); it may even increase resource contention. Option B is wrong because increasing retries from 3 to 5 does not fix the underlying resource constraint; the job will continue to fail on each retry if the worker configuration remains inadequate. Option C is wrong because replacing Dataflow with Dataproc is an unnecessary architectural change that introduces new operational complexity and does not solve the specific resource issue; the problem is with worker sizing, not the service itself.

365
MCQeasy

A data science team has built a model using scikit-learn. They want to operationalize it on Google Cloud without rewriting the code. Which approach should they take?

A.Export the model as a PMML file and use BigQuery ML
B.Use AI Platform Training to host the model directly
C.Package the model in a custom container and deploy to Vertex AI Endpoints
D.Convert the scikit-learn model to TensorFlow SavedModel format
AnswerC

Custom containers allow any framework without code changes.

Why this answer

Vertex AI Endpoints support custom containers, allowing you to package your scikit-learn model with its dependencies (e.g., a Flask or FastAPI inference server) and deploy it without rewriting any code. This approach directly meets the requirement to operationalize the existing model on Google Cloud without modification.

Exam trap

Google Cloud often tests the misconception that AI Platform Training can host models directly, but it is strictly for training jobs, not serving endpoints; candidates confuse the training service with the prediction service.

How to eliminate wrong answers

Option A is wrong because PMML (Predictive Model Markup Language) is not natively supported by BigQuery ML; BigQuery ML uses SQL-based model creation and does not import PMML files for inference. Option B is wrong because AI Platform Training is designed for training jobs, not for hosting models as endpoints; hosting is done via AI Platform Prediction (now part of Vertex AI), but even then, scikit-learn models require a custom prediction routine or container, not direct hosting. Option D is wrong because converting a scikit-learn model to TensorFlow SavedModel format would require rewriting the model's inference logic and dependencies, contradicting the requirement to avoid code changes.

366
MCQhard

You have deployed a TensorFlow model on Vertex AI Endpoints with autoscaling. The model receives high traffic during peak hours, but you notice that inference latency increases significantly during cold starts. Which strategy would best minimize cold-start latency without incurring unnecessary cost?

A.Set minNodes to a value that handles baseline traffic, and use traffic splitting to gradually shift traffic to new replicas
B.Set minNodes to 0 and enable node auto-scaling
C.Increase maxNodes to allow more replicas during peak, and rely on Kubernetes Horizontal Pod Autoscaler
D.Use Cloud Functions with Cloud Run for the model inference to leverage serverless cold-start mitigation
AnswerA

Keeps baseline replicas warm; gradual traffic shift avoids sudden load.

Why this answer

Setting minNodes to a value that handles baseline traffic ensures that a minimum number of replicas are always warm, eliminating cold starts for baseline requests. Traffic splitting gradually shifts new traffic to newly created replicas, allowing them to warm up before receiving full load, which minimizes latency spikes without over-provisioning resources.

Exam trap

Google Cloud often tests the misconception that increasing maxNodes or relying on generic autoscaling (like HPA) solves cold starts, but the key is keeping a baseline of warm replicas via minNodes and using traffic splitting to warm new replicas gradually.

How to eliminate wrong answers

Option B is wrong because setting minNodes to 0 means no replicas are kept warm, so every scale-up event will trigger a cold start, increasing latency during traffic spikes. Option C is wrong because increasing maxNodes alone does not prevent cold starts; without a minimum number of warm replicas, new replicas still need to initialize, and relying on Kubernetes Horizontal Pod Autoscaler (which is not used by Vertex AI Endpoints) is irrelevant as Vertex AI uses its own autoscaling mechanism. Option D is wrong because Cloud Functions and Cloud Run are serverless compute services, not designed for hosting TensorFlow models with GPU/TPU support, and they introduce their own cold-start latency without addressing the specific issue of model inference cold starts on Vertex AI.

367
Multi-Selecthard

A data team is migrating an on-premises Hadoop cluster to Dataproc. The cluster runs a mix of long-running services (Hive, HBase) and transient Spark jobs. They want to minimize cost while maintaining performance. Which TWO strategies should they implement?

Select 2 answers
A.Consolidate all workloads into a single high-availability cluster
B.Use local SSDs for all nodes to improve I/O performance
C.Use preemptible instances for worker nodes in the transient Spark cluster
D.Use Dataproc on GKE to run long-running services
E.Separate long-running services into a dedicated cluster with standard instances
AnswersC, E

Preemptible workers reduce costs significantly for fault-tolerant batch jobs. Spark can handle node preemption via checkpointing.

Why this answer

Preemptible workers are cost-effective for fault-tolerant Spark jobs. Separating long-running services into a separate cluster avoids interference and allows independent scaling. Using a single-node cluster for services is not practical.

Dataproc on GKE adds complexity. Standard persistent disks are fine for HDFS.

368
MCQhard

You are using Dataproc to run a Spark job that reads data from Cloud Storage, performs aggregations, and writes results back to Cloud Storage. The job is failing with out-of-memory errors on the shuffle. Which optimization should you apply?

A.Increase spark.sql.shuffle.partitions
B.Use RDDs instead of DataFrames
C.Increase spark.executor.memory
D.Decrease the number of executors
AnswerA

Why this answer

For shuffle-heavy operations, increasing the number of partitions reduces the size of each partition, reducing memory pressure. Alternatively, using DataFrames with optimized serialization (e.g., Kryo) helps.

369
MCQmedium

A data scientist deploys a new version of a fraud detection model (model2) alongside the existing model (model1) on the same Vertex AI endpoint with a 70/30 traffic split. After 24 hours, the team notices that model2's predictions are significantly different from model1's, and the fraud detection rate has increased. What is the most likely explanation for the change in predictions?

A.Model2 was trained on data that leaked future information, causing unrealistic results.
B.Model2 is receiving corrupted input data due to a bug in the traffic routing.
C.The traffic split is misconfigured and sending all traffic to model2.
D.Model2 uses a different model artifact (fraud_detection_v2) that produces different predictions.
AnswerD

The environment variable MODEL_NAME points to different model versions, causing output differences.

Why this answer

The most straightforward explanation for a significant change in predictions and an increased fraud detection rate is that model2 uses a different model artifact (fraud_detection_v2) that was designed to produce different outputs. In Vertex AI, deploying a new model version with a traffic split means both models receive the same input data, but each model artifact independently processes it. If model2's predictions differ substantially, it indicates the model artifact itself has been updated or replaced, not that there is a data or routing issue.

Exam trap

Google Cloud often tests the misconception that a traffic split or routing issue can cause prediction differences, when in fact the split only controls which model receives the request, not the content of the request or the model's internal logic.

How to eliminate wrong answers

Option A is wrong because data leakage would cause unrealistically high performance during training, but it does not explain why predictions differ between two models receiving the same live input data; both models would be affected if the input data itself contained leaked future information. Option B is wrong because corrupted input data due to a traffic routing bug would affect both models equally if they share the same endpoint and routing logic; Vertex AI's traffic split routes requests to the correct model based on the configured percentage, not by altering the input data. Option C is wrong because if the traffic split were misconfigured to send all traffic to model2, model1 would receive zero requests, but the question states a 70/30 split is in place and the team notices model2's predictions differ from model1's; a misconfiguration would not cause model2's predictions to change—it would simply change which model serves requests.

370
MCQhard

You run `gcloud ai models describe` and get the error above. The model was created successfully from a training job that completed without errors. The model ID is correct. What is the most likely cause?

A.The model was deleted or expired due to time-to-live settings.
B.The gcloud command is not authenticated to the correct project.
C.The model was created but not yet trained; training must complete before describe works.
D.The model was created in a different region (e.g., europe-west4) than the one specified in the command.
AnswerD

Model resources are regional; if created in another region, describe with wrong region fails.

Why this answer

`gcloud ai models describe` defaults to the `us-central1` region unless overridden with the `--region` flag. If the model was created in a different region (e.g., `europe-west4`), the command will fail with a 'Model not found' error even though the model ID is correct. Vertex AI models are regional resources, so the region must match exactly.

Exam trap

Google Cloud often tests the misconception that Vertex AI models are global resources, but they are actually regional, and candidates forget to specify the `--region` flag or assume the default region matches the model's location.

How to eliminate wrong answers

Option A is wrong because the model was created successfully from a training job that completed without errors, and there is no mention of time-to-live settings being configured; deletion or expiration would typically produce a different error message. Option B is wrong because the error is not about authentication; if the project were wrong, the error would indicate 'Permission denied' or 'Project not found', not 'Model not found'. Option C is wrong because the model was created from a completed training job, meaning training already finished; the `describe` command works on the model resource itself, not on a training state.

371
MCQmedium

You are monitoring a streaming Dataflow pipeline that reads from Pub/Sub and writes to BigQuery. In Cloud Monitoring, you notice that the 'system_lag' metric is increasing over time and now exceeds 10 minutes. The 'data_watermark' metric shows a steady lag. What is the most likely cause of the increasing system lag?

A.BigQuery write throughput is throttling the pipeline.
B.The Pub/Sub subscription has too many unacknowledged messages.
C.The pipeline is using a global window with late data handling.
D.The Dataflow pipeline is underprovisioned with workers, causing processing backlog.
AnswerD

Insufficient workers lead to a backlog, increasing system lag. Autoscaling may be delayed or maxed out.

Why this answer

An underprovisioned pipeline lacks sufficient worker resources to process incoming messages at the rate they arrive. This causes a growing backlog in the pipeline's internal buffers, which directly increases the 'system_lag' metric (the time between data ingestion and processing). The 'data_watermark' lag remaining steady indicates that the pipeline is still making progress on event-time processing, but the overall processing capacity is insufficient to keep up with the input rate.

Exam trap

The trap here is that candidates confuse 'system_lag' (processing delay) with 'data_watermark' (event-time completeness), leading them to incorrectly attribute the issue to late data handling or Pub/Sub acknowledgment problems instead of a simple resource underprovisioning.

How to eliminate wrong answers

Option A is wrong because BigQuery write throughput throttling would manifest as a steady or increasing 'data_watermark' lag (due to backpressure on event-time processing) and would typically cause write failures or retries, not a steadily increasing system lag while watermark lag stays constant. Option B is wrong because too many unacknowledged messages in Pub/Sub would indicate a subscriber issue, but Dataflow manages its own acknowledgments; if the pipeline were failing to acknowledge, the 'system_lag' would not necessarily increase—instead, the subscription backlog would grow, and the pipeline might stall. Option C is wrong because using a global window with late data handling would affect the 'data_watermark' metric (it would lag as late data arrives), not the 'system_lag' metric, which measures processing delay independent of windowing strategy.

372
Multi-Selecthard

A company uses Cloud Dataproc for large-scale Spark jobs. They notice that some jobs are failing due to insufficient memory on the worker nodes. They want to improve memory management without over-provisioning. Which three configurations should they apply? (Choose 3)

Select 3 answers
A.Set spark.executor.memory to a value that fits within the node memory
B.Enable Spark dynamic allocation
C.Use custom machine types with high memory ratios
D.Use local SSDs for temporary storage
E.Use preemptible worker nodes for volatile tasks
AnswersA, B, C

Prevents out-of-memory errors by ensuring executor memory fits worker capacity.

Why this answer

Setting spark.executor.memory to a value that fits within the node memory ensures that each executor does not exceed the available RAM on a worker node, preventing out-of-memory (OOM) errors. This configuration directly controls the heap size allocated to each executor, and when combined with spark.executor.cores and spark.executor.instances, it allows precise memory budgeting per node. Over-provisioning is avoided by calculating the maximum safe executor memory as (node memory - OS overhead - HDFS cache) / number of executors per node.

Exam trap

Google Cloud often tests the distinction between memory management and storage optimization, so candidates mistakenly choose local SSDs (option D) thinking they help with memory, when in fact they only improve disk I/O for shuffle operations.

373
MCQmedium

A data science team wants to deploy a model that requires a custom container with specific NVIDIA CUDA version. They build the image and push to Artifact Registry. When deploying to Vertex AI, the model fails to load with an error: 'Failed to start container: invalid ELF header'. What is the most likely cause?

A.The container image was built for a different CPU architecture (e.g., ARM64) than the Vertex AI machine (x86_64)
B.The model file (saved as .pkl) is corrupted
C.The CUDA version in the container is incompatible with the GPU on the machine
D.The container does not have the necessary permissions to access the model file in Cloud Storage
AnswerA

Invalid ELF header indicates the binary is incompatible with the platform architecture.

Why this answer

The image was built for the wrong architecture (e.g., building on an ARM Mac for a x86 deployment). Option B (CUDA version mismatch) would cause a different error. Option C (container permissions) would cause a permission denied error.

Option D (model file format) would cause loading errors but not container startup failure.

374
MCQhard

A company uses Cloud Spanner for a global e-commerce platform. They have a table of orders and a table of order items. To optimize performance for queries that join these tables on order_id, which Spanner schema design feature should they use?

A.Use Cloud Bigtable instead
B.Create a secondary index on order_id
C.Denormalize the order items into the orders table using repeated fields
D.Use interleaved tables with order_items as a child table of orders
AnswerD

Interleaving co-locates rows, improving join performance.

Why this answer

Interleaved tables store child rows physically with parent rows, reducing join latency. Secondary indexes are for filtering. Partitioned tables not in Spanner.

Denormalization could help but interleaved tables are the designed approach.

375
MCQhard

In Cloud Composer, a DAG has two tasks: task_A (runs an Apache Spark job on Dataproc) and task_B (loads data from Cloud Storage to BigQuery). task_B must start after task_A completes. The DAG is scheduled to run hourly. Sometimes task_B starts before task_A finishes because task_A's Dataproc job appears to complete in the Airflow metadata but the data is not yet available. What is the best way to ensure task_B only runs after the data is fully written?

A.Increase the number of retries for task_B
B.Use a sensor after task_A that checks for a specific file in Cloud Storage
C.Use DataprocJobOperator with a job_poll_interval and add a sensor to verify output
D.Change the DAG schedule to run every 30 minutes
AnswerC

DataprocJobOperator can poll the job status, and adding a sensor ensures data is written before proceeding.

Why this answer

It addresses the root cause: the Dataproc job may report completion in Airflow metadata before the output data is fully written to Cloud Storage. By using DataprocJobOperator with a job_poll_interval, you ensure Airflow waits for the actual job completion on Dataproc, and adding a sensor to verify the output (e.g., checking for a success marker file or expected data in Cloud Storage) guarantees that task_B only starts after the data is fully available. This two-step approach prevents race conditions between job completion and data consistency.

Exam trap

The trap here is that candidates assume a job's completion status in Airflow metadata is sufficient to guarantee data availability, overlooking the eventual consistency of Cloud Storage and the fact that Dataproc job completion and data write finalization are not atomic.

How to eliminate wrong answers

Option A is wrong because increasing retries for task_B does not solve the data availability issue; it only retries a task that may fail repeatedly due to missing data, wasting resources and time. Option B is wrong because using a sensor after task_A that checks for a specific file in Cloud Storage is a partial solution—it does not address the fact that the Dataproc job may not have fully completed, and the file check could succeed before all data is written if the file is created early. Option D is wrong because changing the DAG schedule to run every 30 minutes does not fix the dependency timing; it only increases execution frequency, potentially causing more overlaps and still allowing task_B to start before data is ready.

Page 4

Page 5 of 12

Page 6