Courseiva

Google Professional Data Engineer (PDE) — Questions 151225

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

Page 2

Page 3 of 12

Page 4
151
MCQeasy

An organization needs to store transactional data for a global e-commerce platform with strong consistency across regions and an SLA of 99.999% availability. The application requires SQL semantics with horizontal scaling. Which Google Cloud database should they choose?

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

Spanner is globally distributed, provides strong consistency, and offers 99.999% availability SLA, matching the requirements.

Why this answer

Cloud Spanner is the correct choice because it provides globally distributed, strongly consistent SQL semantics with horizontal scaling and a 99.999% availability SLA. It uses synchronous replication and the TrueTime API to ensure external consistency across regions, meeting the strict consistency and uptime requirements of a global e-commerce platform.

Exam trap

The trap here is that candidates often confuse Cloud Spanner with Cloud SQL, assuming any SQL database can scale horizontally, but Cloud SQL is a single-region, vertically scaled service, while Cloud Spanner is the only Google Cloud database that combines SQL, horizontal scaling, and global strong consistency with a 99.999% SLA.

How to eliminate wrong answers

Option A is wrong because Firestore is a NoSQL document database that does not support SQL semantics; it offers strong consistency only within a single region and lacks the global consistency and 99.999% SLA required. Option B is wrong because Cloud SQL is a traditional relational database that supports SQL but cannot horizontally scale across regions; it is limited to a single region and provides up to 99.95% availability, not 99.999%. Option D is wrong because Cloud Bigtable is a NoSQL wide-column database that does not support SQL semantics and provides only eventual consistency, not the strong consistency required for transactional data.

152
MCQmedium

A data engineer is designing a pipeline that reads from Cloud Pub/Sub, aggregates events into 5-minute windows, and writes the results to BigQuery. The engineer wants to ensure that late-arriving data (up to 2 minutes late) is included in the correct window. Which Dataflow feature should they configure?

A.Use a sliding window of 5 minutes with 2-minute slide
B.Set the window duration to 7 minutes to account for lateness
C.Set the allowed lateness to 2 minutes with a trigger that fires on late data
D.Use a global window and watermark
AnswerC

Allowed lateness specifies how long to wait; a trigger can emit updates for late data.

Why this answer

Dataflow's allowed lateness feature (set to 2 minutes) ensures that late-arriving data within that threshold is still assigned to the correct 5-minute window. Combined with a trigger that fires on late data, the pipeline can emit updated results for the window after the watermark passes, which is exactly what the engineer needs to handle late-arriving events up to 2 minutes late.

Exam trap

The trap here is that candidates confuse window duration adjustments (Option B) or sliding windows (Option A) with the proper late-data handling mechanism, not realizing that allowed lateness and triggers are the correct Dataflow primitives for including late-arriving data in the correct event-time window.

How to eliminate wrong answers

Option A is wrong because a sliding window of 5 minutes with a 2-minute slide creates overlapping windows that emit results every 2 minutes, not a single 5-minute window with late data handling; it would double-count events and not solve the late-arrival problem. Option B is wrong because setting the window duration to 7 minutes does not account for lateness—it simply shifts the window boundaries, causing data to be assigned to a different time range, which is incorrect for the intended 5-minute aggregation. Option D is wrong because a global window and watermark would aggregate all data into a single unbounded window, losing the per-5-minute grouping required by the pipeline.

153
MCQhard

A financial services company must comply with GDPR "right to be forgotten". They store customer transactions in BigQuery partitioned by date. When a user requests deletion, all their data must be removed within 48 hours. The deletion requests are received via a Pub/Sub topic. What is the most scalable and cost-effective approach?

A.Use Cloud Functions to execute a BigQuery DELETE statement on each request
B.Use Cloud DLP to redact the user's data in Cloud Storage
C.Use a Dataflow pipeline that reads the deletion IDs from Pub/Sub, joins with the transactions table using a side input, and writes the filtered data to a new table, then swapping
D.Use BigQuery table snapshots and restore after deletion
AnswerC

This scales well and avoids full table scans; the side input contains the IDs to delete.

Why this answer

It uses Dataflow to process deletion requests from Pub/Sub, join them with the BigQuery transactions table via a side input, and write a filtered copy to a new table. This approach is scalable (handles high-throughput streaming deletions) and cost-effective (avoids expensive DELETE mutations on BigQuery, which consume slot resources and can be slow for large tables). Swapping the new table for the old one completes the deletion efficiently within the 48-hour SLA.

Exam trap

Google Cloud often tests the misconception that BigQuery DELETE statements are the simplest way to remove data, but the trap here is that DELETE operations on large partitioned tables are expensive and not scalable for streaming deletion requests, whereas a Dataflow-based rewrite is both cost-effective and meets the 48-hour SLA.

How to eliminate wrong answers

Option A is wrong because executing a BigQuery DELETE statement per request is not scalable for high-volume deletion requests; each DELETE incurs slot consumption and can be slow on large partitioned tables, potentially exceeding the 48-hour SLA. Option B is wrong because Cloud DLP is designed for data masking and redaction in Cloud Storage, not for deleting rows from BigQuery tables; it does not address the requirement to remove customer transactions from BigQuery. Option D is wrong because BigQuery table snapshots are read-only copies used for point-in-time recovery, not for deleting specific user data; restoring a snapshot would revert the table to a previous state, not selectively remove a user's records.

154
MCQeasy

A data engineer needs to transfer 500 TB of archival data from an on-premises NAS to Cloud Storage. The on-premises network has limited bandwidth (100 Mbps). Which transfer method should they recommend?

A.Storage Transfer Service for on-premises
B.gsutil rsync
C.Transfer Appliance
D.Dataflow pipeline reading from NAS
AnswerC

Transfer Appliance is the best choice for large offline data transfer when network bandwidth is limited.

Why this answer

The Transfer Appliance is a physical device designed for large-scale data transfers (up to petabytes) when network bandwidth is insufficient. With 500 TB of data and only 100 Mbps bandwidth, the theoretical transfer time would be over 500 days, making any online transfer method impractical. The Transfer Appliance bypasses network constraints entirely by shipping the data physically to Google Cloud.

Exam trap

The exam often tests the misconception that any cloud-native tool (like Storage Transfer Service or gsutil) can handle large data volumes regardless of bandwidth, ignoring the physical reality of network transfer times for archival-scale data.

How to eliminate wrong answers

Option A is wrong because Storage Transfer Service for on-premises requires network connectivity and is designed for smaller, incremental transfers, not for 500 TB over a 100 Mbps link. Option B is wrong because gsutil rsync is a command-line tool that relies on network bandwidth and would take an impractical amount of time (over 500 days) to transfer 500 TB at 100 Mbps. Option D is wrong because a Dataflow pipeline reading from NAS would still need to stream data over the limited 100 Mbps network, resulting in the same bandwidth bottleneck and excessive transfer time.

155
MCQhard

A gaming company uses Pub/Sub to ingest player events and Dataflow for real-time analytics. They notice that the Pub/Sub subscription backlog is growing despite the Dataflow pipeline running continuously. The pipeline has a 1-hour window for aggregations. What is the most effective way to reduce the backlog?

A.Increase the Dataflow pipeline's worker count via autoscaling.
B.Use a push subscription instead of pull.
C.Decrease the window duration to 10 minutes.
D.Enable Pub/Sub topic retention.
AnswerA

More workers increase parallelism and processing rate, reducing backlog.

Why this answer

Increasing the Dataflow pipeline's worker count via autoscaling directly addresses the backlog by adding more parallel processing capacity to consume messages from the Pub/Sub subscription faster. Since the pipeline is continuously running but the backlog grows, the bottleneck is processing throughput, not pipeline availability. Autoscaling allows Dataflow to dynamically allocate more workers based on the backlog size, matching consumption rate to the incoming message rate.

Exam trap

Google Cloud often tests the misconception that changing window duration or subscription type can fix a throughput bottleneck, when the real solution is scaling compute resources to match the consumption rate.

How to eliminate wrong answers

Option B is wrong because switching from pull to push subscription does not inherently increase throughput; push subscriptions have their own limitations (e.g., endpoint capacity, HTTP timeouts) and the backlog growth is a processing capacity issue, not a delivery mechanism issue. Option C is wrong because decreasing the window duration to 10 minutes does not reduce the backlog; it changes the aggregation granularity but does not affect the rate at which messages are consumed from the subscription. Option D is wrong because enabling Pub/Sub topic retention controls how long unacknowledged messages are kept, not the rate of consumption; it would only extend the time messages remain available, not reduce the backlog.

156
Multi-Selectmedium

A company is designing a data lake on Cloud Storage with different zones. They need to enforce data retention so that objects in the 'raw' zone are automatically deleted after 1 year. Which TWO actions should they take? (Choose 2 correct options)

Select 2 answers
A.Use a bucket retention policy with a retention period of 1 year
B.Configure a Cloud Storage object lifecycle rule with a Delete action
C.Set an IAM policy to prevent deletion of objects
D.Create a Cloud Function to check object age and delete them
E.Apply a lifecycle rule that deletes objects with the prefix 'raw/'
AnswersB, E

Lifecycle rules can delete objects automatically based on age.

Why this answer

Cloud Storage object lifecycle management allows you to set rules that automatically delete objects after a specified age. By configuring a lifecycle rule with a Delete action and setting the condition to 'Age: 365 days', objects in the 'raw' zone will be automatically removed after 1 year, meeting the retention requirement without manual intervention.

Exam trap

The trap here is confusing retention policies (which prevent deletion) with lifecycle rules (which trigger deletion), leading candidates to incorrectly select Option A thinking it enforces deletion rather than preventing it.

157
MCQeasy

A startup is deploying a PyTorch model on Google Cloud. They need to serve predictions for a mobile app with bursty traffic. Which service is most cost-effective?

A.Vertex AI Endpoints with autoscaling and a minimum of 0 replicas to scale down to zero
B.Vertex AI Endpoints with a minimum number of replicas
C.App Engine with manual scaling
D.Cloud Run with CPU always allocated
AnswerA

Scaling to zero minimizes cost when idle, ideal for bursty traffic.

Why this answer

Most cost-effective because Vertex AI Endpoints with autoscaling and minimum of 0 replicas can scale down to zero when idle, eliminating cost during no traffic. This is ideal for bursty traffic patterns. Option B has minimum replicas, incurring cost even when idle.

Option C (App Engine manual scaling) does not scale to zero easily. Option D (Cloud Run with CPU always allocated) charges for CPU even when idle, making it less cost-effective for bursty traffic.

158
MCQmedium

A company wants to use Dataprep to clean and transform raw CSV files stored in Cloud Storage before loading into BigQuery. The data quality checks show missing values and inconsistent date formats. Which Dataprep feature should they use to handle these issues?

A.Data quality profiling
B.Scheduling
C.Wrangler
D.Recipe steps
AnswerD

Recipe steps define transformations such as impute missing values and parse dates.

Why this answer

Recipe steps allow chaining transformations like fill missing values and format dates. Data quality profiling identifies issues but doesn't fix them. Scheduling automates execution.

Wrangler is the UI, not a specific feature for transformations.

159
MCQhard

You are designing a data pipeline that processes streaming events with late-arriving data (up to 2 hours late). The pipeline must compute hourly aggregations and emit results as soon as possible, but must also accurately update results when late data arrives. You want to minimize overall processing cost. Which Dataflow windowing and trigger configuration should you use?

A.Fixed windows of 1 hour with allowed lateness of 2 hours and trigger every 5 minutes (early) and on watermark (late) with accumulating fired panes
B.Global window with triggers every 5 minutes
C.Sliding windows of 1 hour with 30-minute offset
D.Session windows with 10-minute gap duration
AnswerA

Fixed windows match the hourly aggregation requirement. Allowed lateness of 2 hours handles late data. Early triggers provide near-real-time results. Accumulating fired panes ensures updates are included.

Why this answer

Session windows are ideal for capturing bursts of user activity but not for fixed hourly aggregations. The best approach is to use fixed windows with allowed lateness of 2 hours and triggering early every N minutes (e.g., 5 minutes) and also on watermark advancement. This provides early results while allowing late data to update the window.

Using accumulating and discarding late panes (or just accumulating) depends on the use case; but here, accumulating fired panes is typical for correctness.

160
MCQhard

A data engineer configures the above lifecycle rule on a Cloud Storage bucket that stores daily log files. After 60 days, they notice that files older than 30 days have been transitioned to Nearline, but files older than 90 days are still present. What is the most likely cause?

A.The delete rule is missing `isLive: true` condition, so it does not apply to live objects.
B.The `age` condition in the delete rule is calculated from the transition date, not creation date.
C.The bucket has object versioning enabled, and the delete rule only applies to non-current versions.
D.The delete rule's condition includes `matchesStorageClass`: `STANDARD`, which does not match the Nearline storage class of transitioned objects.
AnswerD

After the first rule transitions objects to Nearline, they no longer match the `STANDARD` storage class required by the delete rule, so they are not deleted.

Why this answer

The lifecycle delete rule includes a `matchesStorageClass` condition set to `STANDARD`. Once objects are transitioned to Nearline (which is a different storage class), they no longer match the `STANDARD` condition, so the delete rule does not apply to them. As a result, files older than 90 days that were moved to Nearline remain in the bucket.

Exam trap

Google Cloud often tests the interaction between lifecycle rules and storage class transitions, specifically that a `matchesStorageClass` condition filters objects based on their current storage class, not the original class at creation.

How to eliminate wrong answers

Option A is wrong because the delete rule does not need an `isLive: true` condition to apply to live objects; in fact, `isLive: true` is the default behavior for lifecycle rules, and omitting it does not prevent the rule from applying to live objects. Option B is wrong because the `age` condition in lifecycle rules is always calculated from the object's creation date, not from the transition date. Option C is wrong because object versioning being enabled would cause the delete rule to apply only to non-current versions only if the rule explicitly targets non-current versions; the scenario describes current versions still present, and versioning does not inherently prevent deletion of current versions.

161
MCQeasy

Your company is building a real-time anomaly detection system for financial transactions. The system must process streams of transactions and flag anomalies within seconds. The volume is moderate (5000 transactions per second). You want a fully managed solution that integrates with BigQuery for historical analysis. Which service should you use for stream processing?

A.Cloud Dataflow
B.Cloud Pub/Sub with push subscriptions
C.Cloud Dataproc with Spark Streaming
D.Cloud Data Fusion
AnswerA

Dataflow is fully managed, handles streaming with sub-second latency, and integrates natively with Pub/Sub and BigQuery.

Why this answer

Cloud Dataflow is a fully managed service ideal for real-time stream processing with low latency. It can read from Pub/Sub, perform transformations (e.g., anomaly detection), and write to BigQuery for historical analysis. Dataproc requires cluster management; Data Fusion is batch-oriented; Pub/Sub alone does not process data.

162
MCQeasy

A marketing team needs to run ad-hoc SQL queries on terabytes of clickstream data stored in Parquet files in Cloud Storage. They want a serverless solution with no cluster management and the ability to query external data without loading. Which service should they use?

A.Cloud SQL
B.AlloyDB
C.Dataproc with Spark SQL
D.BigQuery with external tables
AnswerD

BigQuery external tables let you query Parquet files in GCS without loading, serverless.

Why this answer

BigQuery with external tables allows querying data stored in Cloud Storage (including Parquet files) without loading it into BigQuery storage, providing a serverless, fully managed solution with no cluster management. This matches the requirement for ad-hoc SQL queries on terabytes of clickstream data in Parquet format, as BigQuery automatically scales compute and storage.

Exam trap

The trap here is that candidates may choose Dataproc with Spark SQL (Option C) because it can query Parquet files, but they overlook the 'serverless' and 'no cluster management' requirement, which BigQuery satisfies natively without any cluster provisioning.

How to eliminate wrong answers

Option A is wrong because Cloud SQL is a fully managed relational database for OLTP workloads, not designed for petabyte-scale analytical queries on external Parquet files, and requires data to be loaded into its storage. Option B is wrong because AlloyDB is a PostgreSQL-compatible database optimized for transactional and hybrid workloads, not a serverless query engine for external data in Cloud Storage, and it requires data to be imported. Option C is wrong because Dataproc with Spark SQL requires cluster management (even if ephemeral) and is not serverless; it also involves provisioning and scaling clusters, contradicting the 'no cluster management' requirement.

163
Multi-Selecteasy

A company uses Dataproc for transient clusters. Which TWO actions can reduce costs?

Select 2 answers
A.Increase master node size
B.Set cluster autoscaling to minimize idle resources
C.Use standard VMs for all nodes
D.Use persistent clusters to avoid creation overhead
E.Use preemptible VMs for worker nodes
AnswersB, E

Autoscaling reduces resource waste, lowering cost.

Why this answer

Dataproc cluster autoscaling automatically adjusts the number of worker nodes based on the YARN memory and CPU utilization metrics. By scaling down during idle periods, you avoid paying for unused compute capacity, directly reducing costs for transient clusters that have variable workloads.

Exam trap

The trap here is that candidates often think 'persistent clusters' are cheaper because they avoid re-creation overhead, but they overlook the continuous compute cost of idle persistent clusters versus the pay-per-use model of transient clusters.

164
Multi-Selectmedium

A company needs a fully managed, PostgreSQL-compatible database that supports both transactional (OLTP) and analytical (OLAP) workloads with low latency. They want to minimize operational overhead. Which two Google Cloud services should they consider? (Choose two.)

Select 2 answers
A.Cloud SQL for PostgreSQL
B.Cloud Spanner
C.AlloyDB with BigQuery as a federated source
D.BigQuery
E.AlloyDB
AnswersC, E

AlloyDB handles OLTP, and BigQuery can query it via federated queries for analytics, but the question asks for services to consider; AlloyDB alone may suffice, but combining with BigQuery adds analytics power.

Why this answer

AlloyDB is a fully managed PostgreSQL-compatible database service designed for both transactional (OLTP) and analytical (OLAP) workloads with low latency. By using BigQuery as a federated source, you can run analytical queries directly against AlloyDB data without moving it, combining operational and analytical capabilities while minimizing operational overhead.

Exam trap

The misconception that a single database service must be either purely transactional or purely analytical is common; the correct answer leverages a combination of AlloyDB for OLTP and BigQuery federation for OLAP to meet both requirements with low operational overhead.

165
MCQmedium

Refer to the exhibit. This log entry was generated by Vertex AI Model Monitoring for a production model. What should the data engineer do to address this issue?

A.Increase the drift threshold to 0.9 to suppress alerts
B.Retrain the model with more recent data
C.Deploy a new model version trained on the original dataset
D.Disable monitoring for the 'age' feature
AnswerB

Addresses the root cause by adapting to data shift.

Why this answer

Vertex AI Model Monitoring detected a drift in the 'age' feature, indicating that the production data distribution has shifted from the training data. Retraining the model with more recent data aligns the model with the current data distribution, mitigating the drift and maintaining prediction accuracy. This is the standard remediation for model drift in production ML systems.

Exam trap

Google Cloud often tests the misconception that adjusting thresholds or disabling monitoring is a valid fix for drift, when the correct action is always to retrain the model with current data.

How to eliminate wrong answers

Option A is wrong because increasing the drift threshold to 0.9 would suppress alerts without addressing the underlying data drift, allowing the model to continue making inaccurate predictions. Option C is wrong because deploying a new model version trained on the original dataset would not resolve the drift; it would reuse the same outdated training data that no longer represents the current production distribution. Option D is wrong because disabling monitoring for the 'age' feature would hide the drift issue rather than fixing it, leaving the model vulnerable to degraded performance due to a drifted feature.

166
MCQmedium

A data pipeline uses Cloud Composer (Airflow) to orchestrate Dataproc jobs. Each job submits a Spark application that reads from BigQuery and writes to Cloud Storage. The pipeline runs nightly and takes 6 hours. Management wants to reduce costs. Which approach is most effective?

A.Use preemptible VMs for the Dataproc cluster
B.Switch to Cloud Dataproc billing per second instead of per minute
C.Increase the memory of the driver node to improve performance
D.Upgrade the Cloud Storage class from Standard to Nearline
AnswerA

Preemptible VMs are cheaper and suitable for batch jobs.

Why this answer

Preemptible VMs are significantly cheaper (up to 80% discount) than standard VMs and are ideal for fault-tolerant, batch workloads like nightly Dataproc jobs. Since the pipeline runs nightly and takes 6 hours, it can tolerate the occasional preemption of worker nodes by using Spark's built-in resilience (e.g., task retries). This directly reduces compute cost without sacrificing completion, assuming the cluster is configured with enough preemptible workers to handle the workload.

Exam trap

Google Cloud often tests the misconception that 'upgrading' storage class or changing billing granularity saves money, when in fact the correct answer involves leveraging cheaper compute resources (preemptible VMs) that are designed for fault-tolerant batch jobs.

How to eliminate wrong answers

Option B is wrong because Dataproc already bills per second after a 1-minute minimum, so switching to per-second billing is not a change that reduces costs further. Option C is wrong because increasing driver memory does not reduce costs; it may actually increase costs by requiring a larger, more expensive VM, and performance gains are unlikely if the bottleneck is not driver memory. Option D is wrong because upgrading from Standard to Nearline storage increases cost (Nearline has higher retrieval and minimum storage duration fees) and is intended for infrequently accessed data, not for nightly write workloads where data is read soon after writing.

167
MCQhard

A financial services company uses a custom container on Vertex AI Prediction to serve a fraud detection model. The container runs a Flask app that loads a large feature engineering library (~2 GB) at startup. The model is updated weekly. For the past two weeks, the new model version has been failing health checks and showing 'Container failed to start' errors in the logs. The previous versions worked fine. You inspect the container image and confirm it is built correctly using Cloud Build. The only change in the latest build is an updated version of the feature engineering library. What is the most likely cause and how should you fix it?

A.The Cloud Build step that pushes the image is misconfigured. Rebuild using a different approach.
B.The Vertex AI endpoint machine type is too small for the new container. Upgrade to a larger machine type.
C.The new library version increased memory consumption during startup, exceeding the health check timeout. Increase the startup probe initial delay.
D.The new library has a dependency conflict that causes the Flask app to crash. Roll back to the previous library version.
AnswerC

A larger library could cause longer initialization; adjusting the health check timing accommodates that.

168
MCQeasy

A team has set up a push subscription to an HTTPS endpoint. They notice that messages are not being acknowledged and are resent every 10 seconds. What is the most likely issue?

A.The push endpoint is returning HTTP 200 but taking too long to process
B.The push endpoint is returning HTTP 500
C.The push endpoint is returning HTTP 200 with 'ack' in the body
D.The push endpoint is returning HTTP 400
AnswerB

Any non-200 response (e.g., 500) causes Pub/Sub to retry; 500 indicates a server error.

Why this answer

In Google Cloud Pub/Sub push subscriptions, the subscriber must acknowledge messages by returning an HTTP 200 status code. If the endpoint returns HTTP 500, Pub/Sub interprets this as a failure and will retry delivery with exponential backoff, but the default minimum retry interval is 10 seconds. This matches the observed behavior of messages being resent every 10 seconds without acknowledgment.

Exam trap

Google Cloud often tests the misconception that the response body or processing time affects acknowledgment, when in fact only the HTTP status code determines whether a message is acknowledged or retried.

How to eliminate wrong answers

Option A is wrong because returning HTTP 200, even with slow processing, is treated as a successful acknowledgment; Pub/Sub would not resend the message. Option C is wrong because returning HTTP 200 with 'ack' in the body is still a valid acknowledgment (the body content is irrelevant; only the status code matters). Option D is wrong because HTTP 400 indicates a client error, which Pub/Sub treats as a permanent failure and will not retry indefinitely with a 10-second interval.

169
MCQhard

A company runs a Dataproc cluster with 10 worker nodes for a Spark streaming job that processes data from Pub/Sub (via Pub/Sub Lite) and writes to Cloud Storage. They observe that the job is producing many small files in Cloud Storage, leading to high costs and performance issues in downstream batch pipelines. The team wants to consolidate output files while maintaining low latency. What is the best solution?

A.Run a separate compaction job that periodically merges small files into larger ones
B.Use windowed streaming with a longer window duration and Spark's file size configuration
C.Reduce the number of workers to force more data per task
D.Switch from Dataproc to Dataflow, which has built-in file sharding optimization
AnswerB

Allows batching data to create larger files with acceptable latency.

Why this answer

Using a longer window duration in Spark Streaming allows more data to accumulate before writing, and combining this with Spark's file size configuration (e.g., `spark.sql.files.maxRecordsPerFile` or `spark.hadoop.mapreduce.fileoutputcommitter.algorithm.version=2`) ensures that output files are consolidated into larger sizes. This reduces the number of small files in Cloud Storage while maintaining low latency by avoiding an extra compaction job or reducing parallelism.

Exam trap

The trap here is that candidates often choose a separate compaction job (Option A) because it seems like a straightforward fix, but they overlook the latency penalty and the fact that Spark's native streaming configurations can achieve the same goal without extra overhead.

How to eliminate wrong answers

Option A is wrong because running a separate compaction job introduces additional latency and resource overhead, which contradicts the requirement to maintain low latency; it also adds complexity and potential data consistency issues. Option C is wrong because reducing the number of workers decreases parallelism, which can increase processing latency and may not guarantee larger files if the data volume per task remains small due to Spark's default partitioning. Option D is wrong because switching to Dataflow does not inherently solve the small files problem; Dataflow's built-in file sharding optimization (e.g., via `FileIO.write()` with `withNumShards`) still requires explicit configuration, and the question specifically asks for a solution within the existing Dataproc/Spark context.

170
MCQhard

A company runs a Dataflow streaming pipeline that processes financial transactions. They need to apply a new transformation that enriches the data with a lookup from Cloud Bigtable without stopping the pipeline. The pipeline must be updated in a way that minimises data loss and preserves exactly-once semantics. What is the recommended approach?

A.Use the Dataflow update option with the same pipeline name and new version, ensuring the transform is backward compatible.
B.Drain the pipeline first, then start a new pipeline with the updated code.
C.Create a new pipeline in parallel and switch the Pub/Sub subscription to the new pipeline.
D.Stop the pipeline, update the code, and restart with a new pipeline name.
AnswerA

Updating preserves state and exactly-once semantics.

Why this answer

Dataflow supports updating a streaming pipeline without draining by replacing the pipeline version. Using the --update flag with the same pipeline name and a new version allows the pipeline to be upgraded while preserving the state exactly-once.

171
Matchingmedium

Match each Google Cloud IAM role to its description.

Drag a concept onto its matching description — or click a concept then click the description.

Concepts
Matches

Read access to BigQuery datasets and tables

Permission to run BigQuery jobs

Read access to Cloud Storage objects

Permissions for Dataflow worker nodes

Why these pairings

Predefined IAM roles in BigQuery control access at different levels. The BigQuery Admin role has full management, Data Editor can modify datasets/tables, Data Viewer can read data, and Job User can run queries. Common confusions mix these permissions.

172
MCQmedium

You are troubleshooting a Dataproc cluster that runs nightly Spark jobs. The jobs are failing with out-of-memory errors. You want to reduce costs while fixing the issue. Which combination of actions should you take? (Select the BEST answer.)

A.Use SSD persistent disks for all nodes to improve I/O performance.
B.Decrease the number of worker nodes and increase the size of each worker.
C.Switch to a high-memory machine type for the master node only.
D.Increase the number of preemptible worker nodes and use standard machine types for the master.
AnswerD

More workers increase parallelism and memory capacity; preemptible workers are cost-effective. The master node remains standard to ensure stability.

Why this answer

Preemptible workers are cheaper and can be used for worker nodes, but not for master nodes. Adding more preemptible workers can increase parallelism and reduce memory pressure per worker, but may cause more preemptions. Using high-memory master nodes is not necessary for worker memory issues.

Using SSDs for scratch storage can improve performance but does not directly address OOM. Reducing worker count would exacerbate the problem.

173
Multi-Selecthard

A Dataflow batch job frequently fails with 'OutOfMemoryError'. Which THREE are common causes? (Choose 3)

Select 3 answers
A.Too many parallel workers
B.Inefficient GroupByKey with hot keys
C.Too many side inputs
D.Too large window accumulation in streaming mode
E.Using Dataflow Shuffle
AnswersB, C, D

Hot keys cause all values to be processed by a single worker, leading to memory exhaustion.

Why this answer

A hot key in a GroupByKey operation causes all values for that key to be processed by a single worker, leading to memory exhaustion when the key's associated data exceeds the worker's memory capacity. This is a common cause of OutOfMemoryError in Dataflow batch jobs, as the SDK buffers all values for a key before emitting the result.

Exam trap

Google Cloud often tests the misconception that increasing parallelism (Option A) always reduces memory errors, but in Dataflow, hot keys cause memory issues regardless of worker count because the hot key's data is processed by a single worker.

174
MCQmedium

A data scientist is using Vertex AI to train a model and wants to ensure that the training code and environment are reproducible. Which approach should they take?

A.Use Jupyter notebooks on Vertex AI Workbench
B.Use Vertex AI Training with a pre-built container and specify the exact version of the framework
C.Use custom containers with fixed tags
D.Use Cloud Build to train the model
AnswerB

Pre-built containers with version pinning ensure consistent environment and code execution.

Why this answer

Specifying the exact version of a pre-built container in Vertex AI Training ensures that the same framework version, dependencies, and runtime environment are used every time the training job runs. This eliminates variability from package updates or environment drift, which is essential for reproducibility in machine learning pipelines.

Exam trap

A common misconception is that using 'fixed tags' (e.g., 'v1.0') guarantees reproducibility, but tags can be reassigned to different images. A pre-built container with an exact version string or a digest ensures true immutability.

How to eliminate wrong answers

Option A is wrong because Jupyter notebooks on Vertex AI Workbench are interactive environments that can produce non-deterministic outputs due to manual cell execution order, hidden state, and lack of version pinning for dependencies, making them unsuitable for reproducible training. Option C is wrong because custom containers with fixed tags (e.g., 'latest') can still lead to reproducibility issues if the underlying image is overwritten or updated; a fixed tag does not guarantee an immutable image unless combined with a digest (SHA256). Option D is wrong because Cloud Build is a CI/CD service for building and testing code, not for training models; it lacks the managed ML infrastructure and environment versioning that Vertex AI Training provides for reproducible model training.

175
MCQmedium

Refer to the exhibit. A Dataflow pipeline is failing intermittently with the shown error. Which step should the team take to ensure data quality and prevent such errors?

A.Increase the number of workers to process the data faster.
B.Add a monitoring alert on the 'system_lag' metric.
C.Use a strongly typed schema for the PCollection and let Beam automatically reject malformed data.
D.Modify the pipeline to handle parsing failures by sending invalid records to a dead letter queue.
AnswerD

A dead letter queue isolates bad data for later inspection without failing the pipeline.

Why this answer

The error indicates that the pipeline is failing due to malformed or unparseable data. By sending invalid records to a dead letter queue (DLQ), the pipeline can continue processing valid data while capturing and isolating bad records for later analysis or reprocessing. This pattern is a standard data quality practice in Apache Beam and Dataflow, ensuring that transient or corrupt data does not cause pipeline failures.

Exam trap

Google Cloud often tests the distinction between scaling solutions (like increasing workers) and data quality patterns (like dead letter queues), trapping candidates who confuse performance optimization with error handling.

How to eliminate wrong answers

Option A is wrong because increasing the number of workers addresses throughput and latency, not data quality or malformed data errors; it does not prevent parsing failures. Option B is wrong because monitoring the 'system_lag' metric tracks pipeline latency, not data quality issues; it would not prevent or handle malformed records. Option C is wrong because while strongly typed schemas can help catch type mismatches at compile time, they do not automatically reject malformed data at runtime in Beam; the pipeline would still fail if a record cannot be parsed into the schema, and Beam does not have built-in automatic rejection to a dead letter queue without explicit handling.

176
MCQhard

A company is using BigQuery for analytics and needs to ensure that certain columns containing PII are encrypted with a customer-managed key (CMEK). Which approach should they take?

A.Use Cloud Data Loss Prevention (DLP) to mask the columns during query.
B.Use BigQuery column-level encryption with AEAD functions and a Cloud KMS key.
C.Apply CMEK at the dataset level; all tables inherit the encryption.
D.Store the data encrypted in Cloud Storage and use external tables with a CMEK.
AnswerB

Correct: AEAD functions enable column-level encryption with CMEK.

Why this answer

BigQuery column-level encryption using AEAD (Authenticated Encryption with Associated Data) functions allows you to encrypt specific columns containing PII with a customer-managed key (CMEK) stored in Cloud KMS. This approach provides granular, field-level encryption that meets compliance requirements without affecting the rest of the table or dataset, and the encryption/decryption is performed transparently within BigQuery using the AEAD.DECRYPT_STRING function.

Exam trap

Google often tests the distinction between dataset-level encryption (CMEK at the dataset or table level) and column-level encryption; the trap here is that candidates assume CMEK applies only at the dataset level, missing that BigQuery supports field-level encryption via AEAD functions with Cloud KMS keys for granular control.

How to eliminate wrong answers

Option A is wrong because Cloud DLP masking is a data loss prevention technique that obscures data at query time but does not encrypt the underlying stored data with a CMEK; it is a transformation applied on the fly, not persistent encryption. Option C is wrong because CMEK at the dataset level encrypts the entire dataset's underlying storage (e.g., table files), but it does not provide column-level granularity; all columns are encrypted uniformly, and you cannot selectively encrypt only PII columns. Option D is wrong because storing data encrypted in Cloud Storage and using external tables with a CMEK would require managing encryption outside BigQuery and does not leverage BigQuery's native column-level encryption capabilities; external tables also have performance and feature limitations compared to native BigQuery tables.

177
MCQmedium

A company deploys a machine learning model to Vertex AI for real-time predictions. After deployment, they notice that prediction latency spikes during peak traffic hours. Which approach should they take to reduce latency without sacrificing accuracy?

A.Configure auto-scaling with higher min and max instances
B.Reduce the number of input features
C.Switch from online to batch prediction
D.Use a larger machine type for the model
AnswerA

Auto-scaling handles traffic spikes.

Why this answer

Configuring auto-scaling with higher min and max instances ensures that Vertex AI has sufficient pre-warmed replicas to handle traffic spikes without cold-start latency. This approach maintains model accuracy because it does not alter the model architecture or inference logic, only the infrastructure capacity.

Exam trap

Google Cloud often tests the misconception that reducing features or using batch prediction is the primary way to reduce latency, but the real exam trap is that candidates overlook the need to maintain real-time capability and accuracy, and instead choose a solution that changes the model or prediction mode rather than scaling infrastructure.

How to eliminate wrong answers

Option B is wrong because reducing the number of input features may degrade model accuracy, and the question explicitly requires not sacrificing accuracy. Option C is wrong because switching from online to batch prediction eliminates real-time capability, which contradicts the requirement for real-time predictions. Option D is wrong because using a larger machine type can reduce latency but often increases cost and may introduce cold-start delays if scaling is not addressed; it does not directly solve latency spikes during peak traffic, and the question asks for a solution that does not sacrifice accuracy, which a larger machine type does not affect but is not the most targeted fix for traffic-induced latency.

178
MCQeasy

A company is designing a real-time clickstream analytics pipeline using Pub/Sub and Dataflow. The pipeline must handle late-arriving data (up to 1 hour) and ensure exactly-once processing. Which Dataflow feature should be configured to handle late data correctly?

A.Configure the trigger with allowed lateness of 1 hour.
B.Use fixed windows with a 1-hour period and enable data discarding.
C.Use session windows with a gap duration of 1 hour.
D.Set the watermark estimate to 1 hour.
AnswerA

Allowed lateness specifies how long after the watermark the system waits for late data before considering the window complete.

Why this answer

Dataflow's allowed lateness feature explicitly controls how long the pipeline waits for late-arriving data before closing a window. By setting allowed lateness to 1 hour, the watermark is held back, and late data within that period is still processed with exactly-once semantics. This directly addresses the requirement for handling late data up to 1 hour while ensuring no duplicates or data loss.

Exam trap

Google Cloud often tests the distinction between allowed lateness (which extends window lifetime for late data) and watermark estimation (which is a system property, not a user-set parameter), leading candidates to incorrectly choose D.

How to eliminate wrong answers

Option B is wrong because fixed windows with a 1-hour period and data discarding would drop any data arriving after the window's end, failing the late-data requirement. Option C is wrong because session windows with a 1-hour gap duration merge events into sessions based on inactivity gaps, not fixed lateness, and do not guarantee handling of data arriving up to 1 hour late for a specific event time. Option D is wrong because the watermark estimate is a system-managed heuristic, not a configurable feature; setting it to 1 hour is not a valid Dataflow configuration and would not correctly handle late data.

179
MCQmedium

A team needs to orchestrate a complex ETL workflow that includes conditional branching (if new data arrives, run transformation A, else run transformation B), error handling, and coordination across multiple services. Which service should they use?

A.Cloud Functions
B.Cloud Composer (Apache Airflow)
C.Cloud Workflows
D.Cloud Scheduler
AnswerB

Airflow natively supports branching, dependencies, and error handling in Python DAGs, ideal for complex orchestration.

Why this answer

Cloud Composer (Apache Airflow) is the correct choice because it is designed for orchestrating complex, multi-step ETL workflows with conditional branching, error handling, and cross-service coordination. Airflow's directed acyclic graphs (DAGs) natively support conditional logic (e.g., BranchPythonOperator), retries, and dependency management across heterogeneous services, making it ideal for this use case.

Exam trap

Google Cloud often tests the distinction between orchestration (Cloud Composer) and simple scheduling or event-driven compute (Cloud Scheduler, Cloud Functions), leading candidates to pick Cloud Functions for its event-driven nature or Cloud Workflows for its branching capability, without recognizing that Airflow is the only service purpose-built for complex, multi-step ETL orchestration with conditional logic and error handling.

How to eliminate wrong answers

Option A is wrong because Cloud Functions is a serverless compute service for single-purpose, event-driven functions, not a workflow orchestrator; it lacks native support for conditional branching, retry policies, and multi-step coordination across services. Option C is wrong because Cloud Workflows is a low-code orchestration service that can handle branching and error handling, but it is designed for simpler, synchronous workflows and does not provide the same level of scheduling, retry, and monitoring capabilities as Airflow for complex ETL pipelines. Option D is wrong because Cloud Scheduler is a cron job service that triggers tasks on a schedule, but it cannot manage conditional branching, error handling, or multi-service coordination within a single workflow.

180
Multi-Selectmedium

A company is building a data lake on Cloud Storage. They need to organise data into zones for raw, curated, and processed layers. Which TWO practices should they follow? (Choose 2.)

Select 2 answers
A.Use the same storage class for all zones to simplify management.
B.Use separate Cloud Storage buckets for each zone (raw, curated, processed).
C.Set retention policies on the raw zone to make data immutable.
D.Enable object versioning on all buckets to prevent data loss.
E.Use a single bucket with different prefixes (e.g., /raw, /curated, /processed).
AnswersB, E

Separate buckets provide logical isolation, enabling different permissions, lifecycle policies, and storage classes per zone, which is a recommended practice.

Why this answer

A data lake typically uses separate buckets or prefixes for raw (immutable), curated (cleaned/transformed), and processed (aggregated/reporting) data. Using prefixes within a single bucket is common, but separate buckets provide better isolation. Lifecycle rules can be applied per prefix or bucket.

181
MCQmedium

A company uses Vertex AI Workbench notebooks for data exploration and model development. They want to ensure that the notebook environment can access BigQuery data using the same permissions as the user's Google Cloud account. What is the recommended setup?

A.Use a Cloud Functions proxy to authenticate to BigQuery from the notebook.
B.Create a service account with BigQuery access and attach it to the notebook instance.
C.Log in to the notebook using the user's Google Cloud credentials via oauth2client.
D.Grant the Compute Engine default service account BigQuery access.
AnswerB

Best practice: use a service account for consistent, granular permissions that are not tied to a specific user.

Why this answer

Vertex AI Workbench notebooks can use user-managed notebooks with user credentials. By setting the 'User-managed notebook' type and using the 'Add service account' option, you can grant the notebook instance a service account with appropriate BigQuery permissions. Alternatively, you can use the built-in 'Use the same identity as the user' option which uses the user's credentials via OAuth.

However, the recommended approach for production is to use a service account for consistent permissions.

182
MCQhard

A company wants to replicate a Cloud SQL (PostgreSQL) database to BigQuery in near real-time for analytics. The volume is about 10GB per day with frequent updates and deletes. They need to capture changes with low latency and ensure exactly-once delivery to BigQuery. Which approach should they use?

A.Export the entire database to Cloud Storage as CSV files every hour and load them into BigQuery using a load job with WRITE_TRUNCATE.
B.Use a Dataflow pipeline with JDBCIO to read from Cloud SQL every minute and write changes to BigQuery using upserts.
C.Use Cloud Data Fusion with a Debezium streaming source to capture CDC from Cloud SQL and a BigQuery sink with exactly-once mode.
D.Use Cloud SQL's change data capture feature to write changes to a Pub/Sub topic and use a Dataflow pipeline to stream into BigQuery.
AnswerC

Correct. Cloud Data Fusion with Debezium streaming source captures change data capture (CDC) from Cloud SQL PostgreSQL, handling inserts, updates, and deletes in near real-time. The BigQuery sink with exactly-once mode ensures no duplicate records, meeting all requirements.

Why this answer

Cloud Data Fusion with a Debezium streaming source provides native change data capture (CDC) from PostgreSQL, capturing inserts, updates, and deletes with low latency. The BigQuery sink in exactly-once mode ensures no duplicate records, meeting the requirement for near real-time analytics with frequent updates and deletes.

Exam trap

Google Cloud often tests the misconception that Cloud SQL has a native CDC feature to write to Pub/Sub, but in reality, it requires an external CDC tool like Debezium or Datastream to capture changes.

How to eliminate wrong answers

Option A is wrong because exporting the entire database as CSV files every hour and using WRITE_TRUNCATE overwrites the entire BigQuery table, losing all historical data and failing to capture updates and deletes in near real-time; it also does not provide exactly-once delivery. Option B is wrong because JDBCIO reads snapshots of the table at each poll interval, not change data capture, so it cannot capture deletes and may miss updates between polls; it also does not guarantee exactly-once semantics for upserts in BigQuery. Option D is wrong because Cloud SQL does not have a built-in change data capture feature that writes directly to Pub/Sub; this option describes a non-existent capability, as Cloud SQL requires third-party tools like Debezium or Datastream to capture CDC.

183
MCQhard

You are migrating an on-premises PostgreSQL database to Cloud SQL. You need to continuously replicate changes to BigQuery for real-time analytics with minimal latency. Which service should you use?

A.Dataflow with JDBC source
B.Pub/Sub with a Cloud Function that writes to BigQuery
C.Storage Transfer Service
D.Datastream
AnswerD

Datastream is the managed CDC service that can stream changes from PostgreSQL to BigQuery with minimal latency.

Why this answer

Datastream is designed for change data capture (CDC) from databases like PostgreSQL, MySQL, and Oracle to BigQuery or GCS. It provides low-latency replication. Pub/Sub and Dataflow are not directly for CDC.

Storage Transfer Service is for file transfers, not database replication.

184
MCQeasy

A data scientist has trained an XGBoost model on Vertex AI and wants to deploy it to an endpoint with automatic scaling based on traffic. What is the recommended deployment approach?

A.Export the model to a container and deploy on Cloud Run
B.Use AI Platform Prediction with batch prediction
C.Deploy the model as an API on App Engine
D.Use Vertex AI Endpoints with automatic scaling enabled
AnswerD

Vertex AI Endpoints support automatic scaling based on traffic, making it the recommended approach.

Why this answer

Vertex AI Endpoints with automatic scaling enabled is the recommended approach because it directly supports deploying trained models (including XGBoost) as online prediction endpoints with built-in autoscaling based on incoming traffic. This service manages the underlying infrastructure, load balancing, and scaling policies, aligning with the requirement for automatic scaling without additional containerization or serverless overhead.

Exam trap

Google Cloud often tests the distinction between online (real-time) and batch prediction services, and the trap here is that candidates may confuse Vertex AI Endpoints with generic serverless options like Cloud Run or App Engine, overlooking the fact that Vertex AI provides a purpose-built, managed endpoint service with native autoscaling for ML models.

How to eliminate wrong answers

Option A is wrong because exporting the model to a container and deploying on Cloud Run requires manual containerization and does not natively integrate with Vertex AI's model registry, versioning, or monitoring, and Cloud Run's scaling is based on request concurrency rather than the model-specific metrics Vertex AI provides. Option B is wrong because AI Platform Prediction with batch prediction is designed for offline, asynchronous predictions on large datasets, not for real-time online serving with automatic scaling based on live traffic. Option C is wrong because deploying the model as an API on App Engine introduces unnecessary complexity and lacks the optimized serving infrastructure, model versioning, and traffic splitting capabilities that Vertex AI Endpoints offer for ML models.

185
MCQhard

A model deployed on Vertex AI Endpoint is making predictions with high accuracy but the business team suspects bias against a certain demographic group. You need to analyze the model's predictions for fairness. What is the most effective approach?

A.Use Vertex AI Explainable AI to generate feature attributions for each prediction and analyze whether the demographic feature has disproportionate impact.
B.Compute overall fairness metrics by comparing prediction rates across demographic groups.
C.Collect more data for the under-represented group and retrain the model.
D.Use Vertex AI Model Monitoring to check for training-serving skew on the demographic feature.
AnswerA

Explanations help identify if a sensitive attribute is influencing predictions unfairly.

Why this answer

Vertex AI Explainable AI provides per-instance feature attributions, which allow you to examine how the model uses each feature—including sensitive demographic attributes—to arrive at a prediction. By analyzing these attributions across demographic groups, you can detect whether the model disproportionately relies on the demographic feature, indicating potential bias. This approach is more granular than aggregate metrics and directly addresses the business team's concern about bias in individual predictions.

Exam trap

Google Cloud often tests the distinction between bias detection (analysis) and bias mitigation (retraining), so candidates may incorrectly choose Option C as a quick fix instead of the correct analytical approach using Explainable AI.

How to eliminate wrong answers

Option B is wrong because computing overall fairness metrics (e.g., demographic parity) only compares aggregate prediction rates across groups, which can mask per-instance bias and does not reveal whether the model is using the demographic feature in a discriminatory way. Option C is wrong because collecting more data and retraining the model is a remediation step, not an analysis step; it does not help diagnose whether the current model exhibits bias. Option D is wrong because Vertex AI Model Monitoring checks for training-serving skew (distribution drift between training and serving data), not for bias or fairness in predictions against demographic groups.

186
MCQmedium

A team wants to use Cloud Pub/Sub Lite for a high-throughput, low-cost messaging system. They need exactly-once delivery to subscribers. What should they know about Pub/Sub Lite's delivery guarantees?

A.Pub/Sub Lite provides at-least-once delivery, same as standard Pub/Sub.
B.Pub/Sub Lite provides exactly-once delivery when using push subscriptions.
C.Pub/Sub Lite provides exactly-once delivery when using pull subscriptions.
D.Pub/Sub Lite supports exactly-once delivery by default.
AnswerA

Correct: Pub/Sub Lite guarantees at-least-once delivery.

Why this answer

Pub/Sub Lite offers at-least-once delivery like standard Pub/Sub; exactly-once is not guaranteed.

187
MCQhard

A company has a model that requires GPU for inference and has strict latency requirements. They deployed on Vertex AI Endpoint with autoscaling but observe cold start latency when scaling up. What is the best solution?

A.Set a higher min_replica_count to keep instances warm
B.Pre-compile the model with TensorRT
C.Use a larger GPU instance
D.Switch to batch prediction
AnswerA

Keeping a minimum number of instances online avoids cold starts when traffic spikes.

Why this answer

Setting a higher min_replica_count ensures that a baseline number of GPU instances are always running and ready to serve inference requests, eliminating cold start latency because new instances do not need to be provisioned and loaded from scratch when traffic spikes. This directly addresses the autoscaling-induced cold start issue by maintaining a warm pool of replicas.

Exam trap

The trap here is that candidates often confuse inference optimization techniques (like TensorRT or larger GPUs) with infrastructure-level scaling configurations, failing to recognize that cold start is a provisioning delay, not a compute performance issue.

How to eliminate wrong answers

Option B is wrong because pre-compiling the model with TensorRT optimizes inference performance (e.g., reducing latency per request) but does not eliminate the cold start latency that occurs when new instances are spun up from zero. Option C is wrong because using a larger GPU instance reduces per-request compute time but does not prevent the provisioning and model-loading delay when scaling from zero replicas. Option D is wrong because switching to batch prediction is designed for asynchronous, non-real-time workloads and does not meet strict latency requirements; it also does not address cold start for online inference.

188
MCQeasy

A company is building a data lake on Cloud Storage for log analysis. Log files (CSV) arrive every 5 minutes from multiple sources. The files should be ingested into BigQuery for reporting within 15 minutes. Which approach best meets the requirements with minimal operational overhead?

A.Set up a Cloud Storage notification to trigger a Cloud Function that loads each file into BigQuery using the BigQuery API.
B.Schedule a daily batch load from Cloud Storage to BigQuery using the BigQuery Data Transfer Service.
C.Use Dataflow to read from Pub/Sub (ingested from Cloud Storage) and write to BigQuery.
D.Use BigQuery federated queries to query the CSV files directly from Cloud Storage.
AnswerA

This approach provides near-real-time loading (within minutes) with minimal operational overhead, as Cloud Functions are serverless.

Why this answer

Cloud Storage notifications trigger a Cloud Function on each file upload, which then loads the file into BigQuery via the BigQuery API. This provides near-real-time ingestion (within seconds of file arrival) with minimal operational overhead, as there are no servers to manage and no scheduling needed. The 5-minute file arrival and 15-minute SLA are easily met without complex infrastructure.

Exam trap

Google Cloud often tests the misconception that serverless options like Cloud Functions are only for simple tasks, but here they are the most efficient choice for near-real-time ingestion with minimal overhead, while Dataflow is overkill for this straightforward file-load pattern.

How to eliminate wrong answers

Option B is wrong because a daily batch load does not meet the 15-minute ingestion requirement; it would only load data once per day, causing up to 24 hours of latency. Option C is wrong because it introduces unnecessary complexity and operational overhead by adding Pub/Sub and Dataflow, which are not needed when files are already in Cloud Storage and can be loaded directly via a Cloud Function. Option D is wrong because BigQuery federated queries do not ingest data into BigQuery; they query the CSV files directly from Cloud Storage, which is slower and does not support the required reporting use case where data must be stored in BigQuery for efficient analysis.

189
Drag & Dropmedium

Drag and drop the steps to deploy a Cloud Dataflow pipeline from a template into the correct order.

Drag steps to the numbered slots on the right, or tap a step then tap a slot.

Steps
Order
1Step 1
2Step 2
3Step 3
4Step 4

Why this order

Deploying a Dataflow pipeline from a template via the Cloud Console involves a specific sequence: first, navigate to the Dataflow page, then create a job from a template, select the appropriate template, fill in the required parameters (such as input/output and temp location), and finally run the job. This order ensures all necessary configurations are applied correctly before execution.

190
MCQmedium

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

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

BigQuery Omni enables cross-cloud queries across AWS and Azure without data movement.

Why this answer

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

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

191
MCQmedium

A company uses Dataproc to run daily Spark ML jobs. The jobs run for 2 hours each day. The team wants to reduce costs without changing job characteristics. Which strategy is MOST cost-effective?

A.Use a single-node cluster to eliminate overhead
B.Enable high-availability mode to avoid restarts
C.Use preemptible instances for worker nodes
D.Increase the number of standard workers to finish faster
AnswerC

Preemptible instances are cheap and Spark handles preemptions via fault tolerance.

Why this answer

Preemptible VMs are up to 80% cheaper and can handle job interruptions as Spark is fault-tolerant. Single-node is for testing, not production. High-availability is for long-running clusters with HA requirements.

Standard nodes are more expensive.

192
MCQhard

An organization wants to enforce that data in a Cloud Storage bucket cannot be deleted or overwritten for 7 years due to regulatory compliance. Which Cloud Storage feature should they use?

A.Retention Policy with Bucket Lock
B.IAM conditions
C.Object Lifecycle Management
D.Object holds
AnswerA

Retention Policy prevents deletion/overwrites; Bucket Lock makes it immutable.

Why this answer

Retention Policy with a retention period ensures objects cannot be deleted or overwritten during that period. Bucket Lock makes the policy permanent. Object holds are per-object.

Lifecycle management automates transitions/deletions, opposite of retention.

193
MCQeasy

A data engineer needs to design a batch processing pipeline using Cloud Data Fusion. The pipeline should read data from Cloud Storage, perform transformations (join, filter, aggregate), and write to BigQuery. What is the most efficient way to handle the transformations?

A.Use Data Fusion Wrangler to visually design the transformations and then run the pipeline on a Dataproc cluster.
B.Use SQL queries in BigQuery to perform the transformations after loading raw data into staging tables.
C.Use custom Python scripts in a Cloud Function triggered after the files land in Cloud Storage.
D.Use Apache Spark on Dataproc to code the transformations manually, bypassing Data Fusion.
AnswerA

Wrangler provides a UI for transformations and Data Fusion executes them on Dataproc.

Why this answer

Cloud Data Fusion Wrangler provides a visual, no-code interface for designing transformations (join, filter, aggregate) that are then compiled into an Apache Spark or MapReduce program and executed on a Dataproc cluster. This approach leverages Data Fusion's native integration with Dataproc for efficient, scalable batch processing without manual coding, while keeping the pipeline fully managed within the Data Fusion ecosystem.

Exam trap

Google Cloud often tests the misconception that Cloud Data Fusion is only a visual tool and that transformations must be coded manually in Spark or SQL, when in fact Wrangler generates optimized Spark code under the hood and integrates seamlessly with Dataproc for execution.

How to eliminate wrong answers

Option B is wrong because it bypasses Data Fusion entirely, requiring raw data to be loaded into BigQuery staging tables first, which adds latency and storage costs; transformations in BigQuery are better suited for analytics queries, not as a primary ETL step in a Data Fusion pipeline. Option C is wrong because Cloud Functions have a maximum timeout of 9 minutes (540 seconds) and limited memory (up to 8 GB), making them unsuitable for large-scale batch transformations like joins and aggregations on datasets that may be gigabytes or terabytes in size. Option D is wrong because it suggests manually coding Spark on Dataproc, which defeats the purpose of using Data Fusion's visual design and managed execution; while Spark can be used, Data Fusion already abstracts and optimizes the Spark execution, so manual coding adds unnecessary complexity and maintenance overhead.

194
Multi-Selectmedium

A company is designing a data lake on Google Cloud. They need to store raw data in multiple formats (CSV, Parquet, Avro) and allow various downstream processing frameworks. Which two storage solutions provide flexibility and scalability? (Choose two.)

Select 2 answers
A.Cloud Filestore
B.BigQuery
C.Cloud Storage
D.Cloud Spanner
E.Cloud Bigtable
AnswersB, C

BigQuery can store and query structured data, and with federated queries it can access external files.

Why this answer

BigQuery is correct because it can directly query raw data stored in Cloud Storage in formats like CSV, Parquet, and Avro using external tables or federated queries, without requiring data loading. This provides a flexible, serverless analytics layer that scales automatically and integrates with downstream processing frameworks like Apache Spark, Dataflow, and Dataproc.

Exam trap

Google Cloud often tests the misconception that any database or storage service can serve as a data lake, but the trap here is that only object storage (Cloud Storage) and a serverless query engine (BigQuery) provide the schema-on-read flexibility and scalability required for raw multi-format data, while transactional or operational databases (Spanner, Bigtable) impose schema-on-write constraints and are not designed for bulk analytical storage.

195
MCQeasy

A data engineer needs to load 10 TB of CSV files from Amazon S3 into Google BigQuery on a daily basis. Which service should they use to automate this transfer?

A.Dataproc
B.Cloud Data Fusion
C.BigQuery Data Transfer Service
D.Storage Transfer Service
AnswerC

BigQuery Data Transfer Service supports scheduled transfers from Amazon S3 directly into BigQuery.

Why this answer

Storage Transfer Service can transfer data from Amazon S3 to Google Cloud Storage, but it does not load directly into BigQuery. BigQuery Data Transfer Service can import from Amazon S3 directly into BigQuery tables. Other options are not suitable: Cloud Data Fusion is for ETL pipelines, not simple transfer; Transfer Appliance is for offline petabyte-scale transfers; Dataproc is for Spark/Hadoop jobs.

196
MCQhard

A healthcare company streams patient monitoring data to Cloud Pub/Sub. A Dataflow pipeline reads the stream, enriches with patient records from BigQuery, and writes to Bigtable for real-time queries. The BigQuery lookup is slow and causes pipeline lag. What is the best approach to improve performance?

A.Increase the number of Dataflow workers and use vertical scaling.
B.Use BigQuery's streaming read API in the pipeline.
C.Pre-join the data in a batch pipeline and load into Bigtable.
D.Use a side input from a BigQuery query with a global window and periodic refresh.
AnswerD

Side inputs cache data efficiently.

Why this answer

Using a side input from BigQuery with a global window and periodic refresh allows the Dataflow pipeline to cache the patient records in memory across all workers, avoiding per-element slow lookups. This pattern leverages Beam's side input semantics to broadcast a relatively static lookup table, significantly reducing latency compared to synchronous BigQuery queries for each incoming event.

Exam trap

The trap here is that candidates often assume that increasing parallelism (Option A) or using a faster read API (Option B) will solve the latency issue, when in fact the core problem is the synchronous per-element lookup pattern, which is best addressed by caching the reference data as a side input.

How to eliminate wrong answers

Option A is wrong because increasing the number of workers and vertical scaling does not address the root cause: the per-element synchronous BigQuery lookup is the bottleneck, and simply adding more workers will not reduce the latency of each individual query. Option B is wrong because BigQuery's streaming read API is designed for high-throughput ingestion, not for low-latency point lookups; it still requires a query per event and does not eliminate the network round-trip overhead. Option C is wrong because pre-joining in a batch pipeline and loading into Bigtable would work only if the patient records are static and the data is not truly streaming; it sacrifices the real-time nature of the pipeline and cannot handle late-arriving or updated patient data without reprocessing.

197
MCQhard

You are responsible for deploying a PyTorch model for real-time inference. The model requires GPU acceleration. You want to minimize infrastructure management overhead. Which serving option should you choose?

A.Deploy the model as a Cloud Function with a GPU backend
B.Use Cloud Run with GPU enabled
C.Use AI Platform Training to host the model as a prediction service
D.Deploy the model on Vertex AI Endpoints using a custom container with GPU support
AnswerD

Vertex AI supports custom containers and GPUs for serving.

Why this answer

Vertex AI Endpoints with a custom container and GPU support is the correct choice because it is purpose-built for serving ML models at scale, fully managed, and supports GPU acceleration for low-latency inference. It minimizes infrastructure overhead by handling auto-scaling, health checks, and model versioning, unlike the other options that lack GPU support or are designed for training rather than serving.

Exam trap

Google Cloud often tests the misconception that Cloud Run or Cloud Functions can support GPUs, but in reality, neither service offers GPU acceleration, making Vertex AI Endpoints the only viable managed option for GPU inference.

How to eliminate wrong answers

Option A is wrong because Cloud Functions do not support GPU backends; they are serverless compute for lightweight, event-driven code and cannot accelerate PyTorch inference. Option B is wrong because Cloud Run does not currently support GPUs; it is a managed compute platform for containerized applications but lacks GPU attachment capabilities. Option C is wrong because AI Platform Training is designed for model training jobs, not for hosting a real-time prediction service; it lacks the endpoint management, autoscaling, and low-latency serving features required for production inference.

198
MCQmedium

Your company uses Pub/Sub to ingest clickstream data. Messages must be processed in order for the same user_id. How should you configure the Pub/Sub subscription to guarantee ordering?

A.Use a pull subscription with enable_message_ordering=true
B.Use a pull subscription with exactly-once delivery enabled
C.Use a push subscription with acknowledgement deadline set to 600 seconds
D.Use a push subscription with a dead letter topic
AnswerA

Ordering keys with enable_message_ordering ensures messages with the same key are delivered in order.

Why this answer

Pub/Sub ordering keys allow messages with the same key to be delivered in order to subscribers. The subscription must be created with enable_message_ordering set to true.

199
MCQeasy

A data engineer needs to store transactional data for an e-commerce application that requires ACID compliance, automatic failover, and point-in-time recovery. The expected throughput is a few thousand transactions per second. Which Google Cloud storage option should they choose?

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

Cloud SQL provides ACID compliance, high availability, and PITR for moderate OLTP workloads.

Why this answer

Cloud SQL is the correct choice because it provides full ACID compliance, automated failover with high availability configurations, and point-in-time recovery via binary log replay. It supports up to several thousand transactions per second with appropriate machine sizing, making it suitable for this e-commerce workload.

Exam trap

The trap here is that candidates often choose Cloud Spanner for any ACID requirement, overlooking that Cloud SQL is the cost-effective and simpler choice for single-region transactional workloads with moderate throughput.

How to eliminate wrong answers

Option A is wrong because Firestore is a NoSQL document database that does not support ACID transactions across multiple documents in the same way as a relational database, and it lacks point-in-time recovery as a built-in feature. Option B is wrong because Cloud Bigtable is a wide-column NoSQL database optimized for high-throughput analytical workloads (millions of ops/sec), not for ACID-compliant transactional workloads with point-in-time recovery. Option D is wrong because Cloud Spanner is a globally distributed relational database that provides ACID compliance and strong consistency, but it is overkill for a few thousand transactions per second and introduces unnecessary complexity and cost compared to Cloud SQL for this scale.

200
Multi-Selecthard

A company is designing a real-time analytics pipeline using Pub/Sub and Dataflow. They need to ensure exactly-once processing and handle late-arriving data. Which two configurations should they implement? (Choose TWO.)

Select 2 answers
A.Set up a global window with no triggers
B.Enable exactly-once delivery on Pub/Sub subscription
C.Use Dataflow's default at-least-once mode
D.Use a fixed window with allowed lateness and a trigger
E.Write all data to Cloud Storage and then batch load to BigQuery
AnswersB, D

Why this answer

To achieve exactly-once semantics, enable exactly-once delivery on the Pub/Sub subscription (option B). To handle late-arriving data, use a fixed window with allowed lateness and a trigger (option D). This configuration ensures that late data is still processed within the allowed lateness period, while the trigger allows early results to be emitted before the window closes.

201
MCQmedium

A company wants to use dbt (data build tool) to transform data in BigQuery. They have a Cloud Storage bucket containing raw CSV files that are loaded daily into BigQuery via an external table. Which dbt feature should they use to modularize the transformation logic and handle dependencies between models?

A.dbt tests
B.dbt snapshots
C.dbt models with ref()
D.dbt seeds
AnswerC

Models define transformations and dependencies; ref() handles lineage and ordering.

Why this answer

C is correct because dbt models with the `ref()` function allow you to modularize SQL transformation logic and automatically handle dependencies between models. When you use `ref('model_name')`, dbt builds a dependency graph, ensuring models are executed in the correct order based on their references. This is essential for transforming raw data from an external table into a structured, analytics-ready dataset in BigQuery.

Exam trap

Candidates often confuse the purpose of dbt components: models with `ref()` manage transformation logic and dependencies, while tests handle data quality, snapshots track historical changes, and seeds load static data.

How to eliminate wrong answers

Option A is wrong because dbt tests are used for validating data quality (e.g., uniqueness, not null) and do not handle transformation logic or dependency management. Option B is wrong because dbt snapshots are designed to capture historical changes in slowly changing dimensions (Type 2 SCDs), not to modularize transformation logic or manage model dependencies. Option D is wrong because dbt seeds are used to load static CSV files directly into the warehouse as tables, not to transform data or manage dependencies between models.

202
MCQhard

Your company runs a real-time recommendation system for a popular e-commerce website using a machine learning model deployed on Vertex AI Endpoints. The model takes user features and product catalog data as input and returns top-10 product recommendations. The system uses a feature store to serve user embeddings and product embeddings. Recently, the recommender team retrained the model with a new algorithm and deployed it as a new version. Since the deployment, the latency for recommendation requests has increased from 100ms to 500ms on average, exceeding the 200ms SLO. The model accuracy is acceptable, and there are no errors. The endpoint uses an n1-standard-8 machine with a single GPU. The new model is larger but still fits on the GPU. You investigate and find that the GPU utilization remains low (<20%), but CPU utilization is high (90%). What should you do to reduce latency while maintaining accuracy?

A.Upgrade the machine type to one with more GPU memory (e.g., n1-standard-8 with a larger GPU) to reduce model inference time.
B.Change the batch size in the model serving code to process multiple requests together, improving GPU utilization.
C.Increase the number of replicas (nodes) to parallelize the CPU-bound preprocessing work.
D.Offload preprocessing to a dedicated Cloud Run service that runs asynchronously and returns precomputed feature vectors.
AnswerC

Adding more nodes will distribute the preprocessing load across multiple CPUs, reducing the overall latency per request if the load balancer dispatches requests efficiently. However, this increases cost.

Why this answer

The high CPU utilization (90%) with low GPU utilization (<20%) indicates that the bottleneck is CPU-bound preprocessing, not GPU inference. Increasing the number of replicas (nodes) distributes the CPU preprocessing load across multiple instances, reducing per-request latency without affecting model accuracy. This directly addresses the root cause while keeping the existing GPU resources.

Exam trap

Google Cloud often tests the misconception that GPU utilization must be increased to reduce latency, but the trap here is that the bottleneck is CPU-bound preprocessing, not GPU inference, so scaling replicas (horizontal scaling) is the correct fix, not GPU upgrades or batching.

How to eliminate wrong answers

Option A is wrong because upgrading to a larger GPU does not address the CPU bottleneck; GPU memory is sufficient and GPU utilization is low, so more GPU memory would not reduce latency. Option B is wrong because increasing batch size would increase latency per request (as requests wait to be batched) and does not solve CPU-bound preprocessing; it may even worsen CPU contention. Option D is wrong because offloading preprocessing to a Cloud Run service asynchronously would add network round-trip latency and complexity, and the preprocessing is likely synchronous and required per request; it would not reduce the CPU bottleneck on the serving path.

203
MCQhard

A Dataflow streaming pipeline uses stateful transformations with per-key state and timers. After a deployment, the team observes that the pipeline is reprocessing events from the last 30 minutes every time it restarts. The pipeline's checkpoint is configured to persist every 10 seconds. Which change should be made to prevent unnecessary reprocessing?

A.Use a non-volatile state backend like Cloud Bigtable for state storage.
B.Increase the checkpoint interval to 60 seconds to reduce frequency of checkpoints.
C.Enable idempotent writes to the sink by adding a unique identifier per event.
D.Decrease the checkpoint interval to 1 second to checkpoint more frequently.
AnswerC

Idempotent writes prevent duplicates from being written when reprocessing occurs.

Why this answer

Enabling idempotent writes ensures that even if events are reprocessed due to pipeline restarts, the sink will deduplicate them based on the unique identifier. This prevents duplicate data from being written, which is the core issue when stateful transformations cause reprocessing of events from the last 30 minutes. The checkpoint interval (10 seconds) is already frequent enough; the problem is not checkpoint frequency but the lack of deduplication at the sink.

Exam trap

Google Cloud often tests the misconception that increasing checkpoint frequency or changing state backends solves reprocessing issues, when the real solution is idempotent sinks to handle duplicates from replay.

How to eliminate wrong answers

Option A is wrong because using a non-volatile state backend like Cloud Bigtable does not prevent reprocessing; it only ensures state survives restarts, but the pipeline still replays uncommitted events from the last checkpoint. Option B is wrong because increasing the checkpoint interval to 60 seconds would actually increase the window of potential reprocessing, making the problem worse, not better. Option D is wrong because decreasing the checkpoint interval to 1 second would increase overhead and still not prevent reprocessing; the pipeline will always replay events from the last successful checkpoint, regardless of frequency.

204
Multi-Selectmedium

An organization is moving on-premises Hadoop workloads to Google Cloud. They need to minimize code changes and manage transient clusters for cost savings. Which two Google Cloud services should they consider? (Choose TWO.)

Select 2 answers
A.Compute Engine with self-managed Hadoop
B.BigQuery
C.Dataproc on GKE
D.Cloud Dataproc
E.Cloud Dataflow
AnswersC, D

Allows running Spark workloads on GKE, leveraging container orchestration.

Why this answer

Cloud Dataproc (option D) is a managed service for running Spark and Hadoop clusters. It supports transient clusters that can be created on-demand and deleted when idle, minimizing costs. It also allows direct migration of on-premises Hadoop code with minimal changes because it supports standard Hadoop/Spark APIs.

Dataproc on GKE (option C) provides similar benefits but runs containerized workloads on GKE, offering additional ephemeral cluster capabilities and integration with Kubernetes. Both options minimize code changes and enable transient clusters for cost savings, while BigQuery (option B) requires rewriting SQL queries and Cloud Dataflow (option E) requires converting to Beam pipelines. Compute Engine with self-managed Hadoop (option A) does not provide transient cluster management by default.

Exam trap

The trap here is that candidates often confuse Cloud Dataflow (a Google Cloud service that runs Beam pipelines) with Dataproc, not realizing that Dataflow requires rewriting Hadoop jobs into Beam pipelines, while Dataproc on GKE and Cloud Dataproc directly support unmodified Hadoop/Spark code.

205
Multi-Selecteasy

A company uses Pub/Sub to decouple services. They have a topic with two subscriptions: Subscription A is a push subscription that sends messages to a Cloud Function; Subscription B is a pull subscription used by a Dataflow job. They need to ensure that messages are processed in order for a specific device_id. Which TWO configurations should they apply?

Select 2 answers
A.Enable message ordering on the topic and set an ordering key for each message.
B.Disable duplicate filtering on the topic.
C.Configure the Cloud Function to retry on failure with exponential backoff.
D.Use exactly one subscription for both the Cloud Function and Dataflow job.
E.Use a single subscription with multiple concurrent consumers.
AnswersA, D

Ordering key is required for ordered delivery.

Why this answer

Enabling message ordering on the topic and setting an ordering key (e.g., device_id) ensures that messages with the same key are delivered to subscribers in the order they were published. This is a fundamental Pub/Sub feature that guarantees FIFO (first-in, first-out) delivery per ordering key, which directly addresses the requirement for processing messages in order for a specific device_id.

Exam trap

Google Cloud often tests the misconception that multiple subscriptions or multiple consumers can maintain ordering independently, but in Pub/Sub, ordering is per subscription and per ordering key, and only a single subscriber per subscription can guarantee FIFO delivery.

206
MCQhard

A company runs a production Dataflow streaming pipeline that reads from Pub/Sub, groups events by customer ID, and writes to BigQuery. The pipeline uses global windows with triggers. After a recent code change, the pipeline started generating duplicate events in BigQuery for the same customer ID. The previous version did not have duplicates. The team reviews the code and sees that the trigger was changed from 'afterProcessingTime' to 'afterWatermark'. What is the most likely reason for duplicates?

A.The afterProcessingTime trigger fired multiple times for the same window
B.Late-arriving events cause the afterWatermark trigger to fire additional panes for the same window
C.The pipeline is firing early and on-time panes for the same window
D.The pipeline uses accumulation mode which accumulates results across firings
AnswerB

Watermark triggers can fire again for late data, producing duplicates if not deduplicated.

Why this answer

The change from `afterProcessingTime` to `afterWatermark` introduces a dependency on the watermark, which estimates event time progress. When late-arriving events (those with timestamps before the watermark) arrive after the watermark has advanced, the `afterWatermark` trigger fires an additional pane for the same window, causing duplicate writes to BigQuery. The previous trigger (`afterProcessingTime`) fired based on processing time, which does not react to late data in the same way, hence no duplicates.

Exam trap

Google Cloud often tests the distinction between processing-time and event-time triggers, and the trap here is that candidates assume `afterWatermark` is simply a 'one-time' trigger, overlooking that late-arriving data can cause additional firings.

How to eliminate wrong answers

Option A is wrong because `afterProcessingTime` fires based on wall-clock time, not on data arrival, and it does not inherently cause multiple firings for the same window unless combined with other triggers or accumulation; the issue here is specifically the switch to watermark-based triggering. Option C is wrong because firing early and on-time panes is a feature of `afterWatermark` with early firings, but the question states the trigger was changed to `afterWatermark` alone (without early firings), so this does not explain the duplicates. Option D is wrong because accumulation mode (e.g., `accumulatingFiredPanes`) determines whether results are accumulated across firings, but the core cause of additional panes is the watermark reacting to late data, not the accumulation mode itself.

207
MCQhard

You are a data engineer at a financial services company that uses Vertex AI to train and deploy models for credit risk assessment. The company has strict governance requirements: every model version must be approved by the risk committee before going to production. The approval process can take several days. Currently, the team trains a new model weekly and manually deploys it to a staging endpoint for review, then manually promotes to production after approval. This process is error-prone and slow. You want to automate the pipeline: training should trigger automatically when new data arrives, the model should be automatically deployed to a staging endpoint for review, and after manual approval, it should be promoted to production. Additionally, you need to ensure that if a model in staging performs poorly (e.g., low accuracy), it should not be promoted even if approved. What should you do?

A.Use Vertex AI Experiments to track model versions, then manually deploy from the Experiments UI.
B.Use Cloud Scheduler to run training weekly, then use Cloud Functions to deploy to staging, and after manual approval, use another Cloud Function to check performance and deploy to production.
C.Create a Vertex AI Pipeline that: (1) Triggers on new data, (2) Trains model, (3) Evaluates and stores metrics in the model registry, (4) Deploys to staging endpoint as a new model version. Then use a manual approval step (e.g., via Cloud Build approval or external system) to trigger a second pipeline that checks the stored metrics and, if acceptable, deploys to production endpoint.
D.Train models on Vertex AI Workbench and use a CI/CD tool like Cloud Build to deploy to staging. Use a Cloud Build approval step to promote to production after manual check.
AnswerC

This automates training and staging deployment, then separates approval gate, and uses metric check to conditionally promote to production.

Why this answer

The best approach uses Vertex AI Pipelines to automatically train and deploy to a staging endpoint. After manual approval, a separate pipeline step checks model performance metrics (which were stored during training/evaluation) and if they meet a threshold, promotes to production. This enforces governance and automation.

208
MCQmedium

Your organization has a BigQuery flat-rate reservation with 500 slots. During peak hours, queries are queued and you need additional capacity temporarily. You want to add slots for a burst of activity without committing to a long-term purchase. What should you do?

A.Switch to on-demand pricing
B.Use flex slots
C.Create a secondary reservation with autoscaling
D.Purchase additional committed use reservations
AnswerB

Flex slots provide temporary capacity on an hourly basis, perfect for bursting.

Why this answer

Flex slots are short-term, hourly commitments that can be added to an existing flat-rate reservation to handle bursts. They are ideal for temporary capacity needs.

209
MCQhard

You are building a real-time fraud detection system using BigQuery streaming and a BQML logistic regression model. The model must be retrained every hour with new labeled data. What is the MOST cost-effective approach to serve predictions with low latency?

A.Call ML.PREDICT on a BigQuery table that is updated every hour
B.Use a BigQuery materialized view that refreshes every minute and apply ML.PREDICT
C.Stream data into Pub/Sub and use a Dataflow pipeline with Apache Beam's model inference
D.Export the model to a Cloud Storage bucket and deploy it to AI Platform Prediction
AnswerD

Exporting to AI Platform Prediction provides low-latency serving with autoscaling, cost-effective for hourly retraining.

Why this answer

Exporting the model to Cloud Storage and deploying to AI Platform Prediction is the most cost-effective approach because AI Platform Prediction provides managed, autoscaling prediction serving with pay-per-prediction pricing. It avoids the cost and latency of repeatedly querying BigQuery with ML.PREDICT, which consumes slots and is not designed for real-time serving. Option C (Dataflow with model inference) incurs streaming pipeline costs, while options A and B are inefficient due to repeated BigQuery queries or unsupported materialized views with ML.PREDICT.

210
MCQeasy

A data scientist has iterated on a model and produced a new version. The organization requires the ability to roll back to the previous version quickly if the new version performs poorly in production. Which approach should be used?

A.Store each model version in a separate Cloud Storage bucket.
B.Keep the previous model in a container image and redeploy via Cloud Run.
C.Use Cloud Source Repositories to tag model versions.
D.Upload both versions to Vertex AI Model Registry and use endpoint traffic splitting to route 100% to the safe version if needed.
AnswerD

The registry keeps versions; endpoint traffic allows instant switch.

Why this answer

Vertex AI Model Registry allows you to deploy multiple model versions and use endpoint traffic splitting to gradually shift traffic or instantly route 100% to a specific version. This enables immediate rollback by setting the traffic split to 100% for the previous model version without redeploying or changing infrastructure.

Exam trap

Google Cloud often tests the misconception that version control tools (like Cloud Source Repositories) or storage buckets are sufficient for rollback, when in fact the key requirement is a managed model registry with traffic splitting capabilities for instant, no-downtime rollback.

How to eliminate wrong answers

Option A is wrong because storing each model version in a separate Cloud Storage bucket does not provide a mechanism for quick rollback; you would still need to redeploy the model from that bucket, which is not instantaneous. Option B is wrong because keeping the previous model in a container image and redeploying via Cloud Run is not a rollback strategy—it requires a new deployment, which takes time and does not leverage Vertex AI's managed traffic splitting. Option C is wrong because Cloud Source Repositories is a source code version control service, not a model registry; tagging model versions there does not affect production endpoint traffic.

211
MCQeasy

You are operating a streaming data pipeline that uses Cloud Pub/Sub and Dataflow. The data source sometimes emits events that are delayed by several minutes due to network issues. Your pipeline must produce accurate aggregations (e.g., counts per minute) even for late data, but you also need to avoid waiting for a long time before emitting results. Which approach should you use?

A.Use processing-time windows and ignore the event timestamps entirely.
B.Use event-time processing with allowed lateness and a trigger that fires early to provide speculative results.
C.Use global windows and hold all data for 24 hours before processing to ensure completeness.
D.Use event-time processing and discard any data that arrives after the window ends.
AnswerB

Dataflow supports allowed lateness and triggers; you can set a trigger to emit early results every minute, and then a final result after the allowed lateness period, ensuring both low latency and eventual accuracy.

Why this answer

It uses event-time processing to handle late data via allowed lateness, combined with early triggers to emit speculative results before the window closes. This balances accuracy for delayed events with low latency for downstream consumers, which is a common requirement in streaming pipelines using Cloud Pub/Sub and Dataflow.

Exam trap

Google Cloud often tests the distinction between processing-time and event-time semantics, and the trap here is that candidates may choose processing-time windows (Option A) thinking they are simpler, not realizing they sacrifice correctness for late data.

How to eliminate wrong answers

Option A is wrong because processing-time windows ignore event timestamps entirely, so late-arriving data would be assigned to the wrong window, producing inaccurate aggregations. Option C is wrong because global windows with a 24-hour hold would cause unbounded latency and memory pressure, violating the requirement to avoid waiting a long time before emitting results. Option D is wrong because discarding late data after the window ends would lose delayed events, failing the requirement for accurate aggregations even with late data.

212
MCQmedium

A company wants to build an event-driven application that processes images uploaded to a Cloud Storage bucket. The processing takes up to 10 minutes per image and should be automatically triggered. Which compute option should they use?

A.Cloud Functions (2nd gen) with Eventarc trigger
B.App Engine
C.Cloud Functions (1st gen)
D.Cloud Run on Eventarc trigger
AnswerD

Cloud Run can handle long-running requests (up to 60 minutes) and is triggered by Eventarc for GCS events.

Why this answer

Cloud Functions have a 9-minute timeout; Cloud Run can handle up to 60 minutes and is triggered by Eventarc for GCS events.

213
MCQmedium

The exhibit shows a Cloud Logging query result. A data engineer sees this log for a streaming Dataflow job. What is the most likely cause?

A.The job is experiencing network latency.
B.The job is using too much memory per worker.
C.The job has insufficient permissions to scale.
D.The job has reached the maximum number of workers allowed by the project quota.
AnswerD

Worker pool exhausted indicates quota limit.

Why this answer

The log shows that the Dataflow job is not scaling up despite pending work. This typically occurs when the job has reached the maximum number of workers allowed by the project quota. Dataflow uses the Compute Engine default worker quota, and if the job attempts to exceed that limit, it will stop scaling and log messages indicating that it cannot add more workers.

Exam trap

Google Cloud often tests the distinction between resource quotas and permissions, so the trap here is that candidates confuse a quota limit (which is a hard resource cap) with an IAM permissions issue (which would produce a different error).

How to eliminate wrong answers

Option A is wrong because network latency would cause delays in data processing but would not prevent the job from scaling up; the log would show slow progress or timeouts, not a scaling block. Option B is wrong because excessive memory usage per worker would cause worker crashes or OOM errors, not a failure to scale; the job would still attempt to add workers. Option C is wrong because insufficient permissions to scale would result in an authorization error when trying to create new worker instances, not a quota-related log message; the error would reference IAM roles or service account permissions.

214
MCQhard

A data pipeline uses Pub/Sub to ingest events, a Dataflow streaming pipeline to process them, and writes results to BigQuery. The pipeline must handle occasional duplicate events without causing duplicate rows in BigQuery. What is the best approach?

A.Use BigQuery legacy streaming inserts with insertId for deduplication
B.Use the Storage Write API with the committed stream
C.Set a unique constraint on the BigQuery table
D.Enable exactly-once processing in Pub/Sub
AnswerA

Legacy streaming inserts use insertId to deduplicate within a short window.

Why this answer

BigQuery does not enforce primary keys; deduplication must be handled in the pipeline using idempotent writes or a dedup step.

215
MCQhard

You are a machine learning engineer at a FinTech company. Your team has developed a credit risk model using XGBoost and deployed it on Vertex AI Prediction using a custom container. The model is used for real-time credit decisions, and the endpoint is configured with a single machine type (n1-standard-4) and min_replica_count = 2, max_replica_count = 10. Recently, the team observed that during a promotional campaign, the endpoint's prediction latency increased from 200ms to over 2 seconds, and some requests resulted in 503 errors. You check the Cloud Monitoring metrics and see that CPU utilization reached 100% on the existing replicas, but the number of replicas never scaled beyond the initial 2. The deployment uses a custom container that runs a TensorFlow Serving-like model server. The container image is stored in Artifact Registry. The Vertex AI endpoint is configured with a traffic split of 100% to this model version. What is the most likely cause of the scaling failure, and what step should you take to resolve it?

A.Increase min_replica_count to 5 to handle the baseline load.
B.Change the endpoint configuration to use gRPC instead of HTTP to reduce latency.
C.Ensure the custom container exposes the correct metrics for CPU utilization so that Vertex AI autoscaling can trigger.
D.Set the max_replica_count to a higher value like 20.
AnswerC

Autoscaling relies on metrics; if the container doesn't expose them, scaling won't happen.

Why this answer

Vertex AI's autoscaling relies on the custom container exposing standard metrics (e.g., CPU utilization via the /metrics endpoint in a Prometheus format or through the Vertex AI custom metric adapter). If the container does not expose these metrics, the autoscaler cannot detect high CPU usage and will not trigger scaling beyond the initial replicas, leading to latency spikes and 503 errors under load.

Exam trap

The trap here is that candidates assume autoscaling is automatic based on CPU utilization alone, but Vertex AI requires explicit metric exposure from custom containers; otherwise, the autoscaler remains inactive.

How to eliminate wrong answers

Option A is wrong because increasing min_replica_count only sets a baseline number of replicas; it does not fix the autoscaling mechanism that failed to add replicas when CPU hit 100%. Option B is wrong because switching to gRPC can reduce network overhead and latency, but it does not address the root cause of scaling failure—the autoscaler not triggering due to missing metrics. Option D is wrong because raising max_replica_count only increases the upper limit; if the autoscaler never triggers scaling (due to missing metrics), the replicas will remain at the initial count regardless of the max setting.

216
MCQmedium

After deploying a model to Vertex AI Endpoints, the prediction responses include unexpected data. The model returns logits instead of probabilities. What is the most likely cause?

A.The model was trained with different loss
B.The input data is scaled incorrectly
C.The endpoint is not properly configured
D.The model output is not post-processed
AnswerD

Missing softmax or similar transformation leads to raw logits being returned.

Why this answer

The most likely cause is that the model output is not post-processed. In Vertex AI Endpoints, models often output raw logits (unnormalized scores) from the final layer, and a softmax or sigmoid activation must be applied as a post-processing step to convert these logits into probabilities. Without this post-processing, the endpoint returns the raw logits, which is why the prediction responses contain unexpected data.

Exam trap

Google Cloud often tests the distinction between model training configurations and serving/post-processing steps, and the trap here is that candidates assume the endpoint or deployment configuration controls output formatting, when in fact the model's exported graph or serving function determines whether logits or probabilities are returned.

How to eliminate wrong answers

Option A is wrong because training with a different loss function (e.g., cross-entropy vs. mean squared error) does not directly cause the model to output logits instead of probabilities; the output layer's activation function (or lack thereof) determines whether outputs are logits or probabilities. Option B is wrong because incorrect input scaling would affect the prediction values (e.g., shifting or scaling them), but it would not change the fundamental nature of the output from logits to probabilities; the model would still output whatever its final layer produces. Option C is wrong because the endpoint configuration (e.g., machine type, traffic splitting, or model version) does not alter the model's output format; the endpoint simply serves the model's raw predictions as-is.

217
MCQmedium

A streaming Dataflow pipeline ingests events from Cloud Pub/Sub and writes to BigQuery. The event schema evolves occasionally (new columns added). The pipeline fails when new columns appear. What is the best long-term solution?

A.Configure the BigQuery sink to use stored 'dynamic' schema by setting create_disposition to CREATE_NEVER and writing to a temporary table with schema auto-detection
B.Stop the pipeline and update the BigQuery schema manually whenever a new column appears
C.Switch to Dataproc to process the data with Spark and write to BigQuery using the Avro format
D.Use a Cloud Function to transform the data and add null columns for missing fields
AnswerA

Using schema auto-detection on a temporary table and then merging into the main table with wildcard tables or using BigQuery's schema flexibility can handle new columns.

Why this answer

It leverages BigQuery's schema auto-detection with a temporary table to handle schema evolution dynamically. By setting create_disposition to CREATE_NEVER, the pipeline writes to a table that already exists, while the temporary table with auto-detection allows the pipeline to infer new columns from the incoming data. This approach avoids pipeline failures when new columns appear, as the sink can adapt without manual intervention or pipeline restarts.

Exam trap

Google Cloud often tests the misconception that manual schema updates or external transformations are acceptable long-term solutions, when in fact the correct answer leverages a built-in BigQuery feature (schema auto-detection) to handle schema evolution dynamically without pipeline downtime.

How to eliminate wrong answers

Option B is wrong because it requires manual intervention to stop the pipeline and update the BigQuery schema each time a new column appears, which is not a long-term solution and defeats the purpose of a streaming pipeline that needs to handle schema evolution automatically. Option C is wrong because switching to Dataproc with Spark and Avro format does not inherently solve the schema evolution problem; it adds unnecessary complexity and still requires handling schema changes in the Spark job or BigQuery sink. Option D is wrong because using a Cloud Function to transform data and add null columns for missing fields is a brittle workaround that requires maintaining a separate function and does not scale well with frequent schema changes; it also introduces additional latency and cost.

218
MCQhard

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

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

Increasing regularization penalizes large weights and reduces overfitting.

Why this answer

Increasing the L2 regularization weight (w_reg) penalizes large weights and reduces overfitting. Increasing number of factors (num_factors) increases model complexity, worsening overfitting. Decreasing learning rate may help but not as directly as regularization.

219
Multi-Selecthard

A company uses Cloud Build to deploy containerized applications. They want to ensure build and deployment quality. Which THREE steps should they include in their CI/CD pipeline? (Choose three.)

Select 3 answers
A.Scan container images for vulnerabilities using Container Analysis.
B.Run unit tests after deployment.
C.Deploy directly to production on every commit.
D.Use canary deployments with gradual traffic shifting.
E.Pin base image digests in Dockerfile.
AnswersA, D, E

Vulnerability scanning ensures images are secure before deployment.

Why this answer

Container Analysis (now part of Artifact Registry) scans container images for known vulnerabilities (CVEs) in OS packages and application dependencies. Integrating this scan into the CI/CD pipeline ensures that only compliant images proceed to deployment, preventing vulnerable code from reaching production. This directly supports the 'Ensuring solution quality' domain by enforcing security gates before release.

Exam trap

Google often tests the misconception that unit tests can be run after deployment or that direct-to-production commits are acceptable in a quality-focused pipeline, when in fact both violate the principle of shifting left on quality and risk reduction.

220
Multi-Selectmedium

Which TWO factors should be considered when choosing between Cloud Dataflow and Dataproc for a batch processing pipeline?

Select 2 answers
A.Dataproc allows custom Docker containers, while Dataflow does not.
B.Dataflow is built for data processing patterns, while Dataproc is better for general-purpose compute.
C.Dataproc supports Python, while Dataflow only supports Java.
D.Dataflow provides auto-scaling, while Dataproc requires manual cluster sizing.
E.Dataflow supports Java and Python, while Dataproc only supports Java.
AnswersB, D

Dataflow is specialized for data pipelines.

Why this answer

Dataflow is purpose-built for data processing patterns like batch and stream processing with unified programming models (Apache Beam), while Dataproc is optimized for general-purpose compute workloads such as running custom Spark, Hadoop, or ML jobs. Option D is correct because Dataflow provides automatic horizontal autoscaling based on pipeline throughput, whereas Dataproc requires manual cluster sizing or configuration of autoscaling policies, which are not as granular or reactive as Dataflow's.

Exam trap

Google Cloud often tests the misconception that Dataflow only supports Java and that Dataproc requires manual scaling, when in fact both services support multiple languages and Dataproc offers optional autoscaling, but Dataflow's autoscaling is more dynamic and fine-grained.

221
Multi-Selectmedium

A data engineer needs to build a real-time dashboard in Looker Studio that displays live sales data from BigQuery. The dashboard must refresh every minute. The underlying BigQuery table is updated continuously via streaming inserts. Which two approaches can reduce query cost and latency? (Choose TWO)

Select 2 answers
A.Use the BigQuery Data Transfer Service to copy data to a separate dataset
B.Create a materialized view that pre-aggregates the data
C.Schedule a script to export the table to Cloud Storage and load into Cloud SQL
D.Use BigQuery BI Engine to accelerate the Looker Studio queries
E.Partition the BigQuery table by the date column
AnswersD, E

BI Engine provides in-memory analysis for sub-second query response.

Why this answer

BI Engine can accelerate queries in Looker Studio by caching data in memory. Partitioning the table on the date column reduces the amount of data scanned.

222
MCQeasy

Your company wants to analyze real-time user clickstream data from a website. The data arrives as JSON messages via an HTTP endpoint. The pipeline should be able to handle spikes in traffic, provide low-latency insights, and store the raw data in a data lake for historical analysis. Which Google Cloud service should you use to ingest and process the streaming data?

A.Cloud Pub/Sub combined with Dataflow
B.Cloud Dataproc
C.Cloud Functions
D.Cloud IoT Core
AnswerA

Cloud Pub/Sub provides reliable, scalable ingestion; Dataflow enables stream processing with exactly-once semantics and can write to Cloud Storage.

Why this answer

Cloud Pub/Sub is the correct ingestion service because it provides a highly scalable, fully managed message queue that can handle traffic spikes by decoupling producers from consumers. Dataflow (Apache Beam) then processes the streaming data with low latency, supports exactly-once semantics, and can write raw data to a data lake like Cloud Storage for historical analysis. This combination meets all requirements: spike handling, low-latency insights, and raw data storage.

Exam trap

Google Cloud often tests the misconception that Cloud Functions can handle streaming ingestion due to its HTTP trigger, but its 9-minute timeout and lack of native streaming support make it unsuitable for high-throughput, low-latency pipelines.

How to eliminate wrong answers

Option B (Cloud Dataproc) is wrong because it is a managed Hadoop/Spark service designed for batch and stream processing but requires manual cluster management and autoscaling configuration, making it less suitable for handling unpredictable traffic spikes with low latency compared to the serverless Pub/Sub + Dataflow pipeline. Option C (Cloud Functions) is wrong because it is a lightweight, event-driven compute service with a maximum timeout of 9 minutes and limited throughput, making it unsuitable for high-volume, real-time streaming ingestion and processing. Option D (Cloud IoT Core) is wrong because it is specifically designed for ingesting data from IoT devices using MQTT/HTTP protocols, not for general web clickstream data from an HTTP endpoint, and it lacks the native streaming analytics capabilities needed for low-latency insights.

223
MCQmedium

A data engineer wants to create a data lake on Google Cloud for storing raw streaming data, then transform it into curated and processed zones for analytics. The data is in Avro format and will be queried by BigQuery. Which two services are MOST suitable as the primary storage and query interface?

A.Cloud Storage and BigQuery
B.Cloud Storage and Dataproc
C.Cloud Storage and Cloud SQL
D.Cloud Storage and Firestore
AnswerA

Cloud Storage stores the Avro files in zones, and BigQuery queries them via external tables or loaded tables.

Why this answer

Cloud Storage is the most suitable primary storage for a data lake because it provides scalable, durable, and cost-effective object storage for raw Avro data. BigQuery is the ideal query interface because it can directly query Avro files stored in Cloud Storage using external tables, and it supports serverless analytics without needing to manage infrastructure.

Exam trap

Common misconception: candidates often think a processing engine like Dataproc is required to query Avro data in a data lake, but BigQuery can natively query Avro files stored in Cloud Storage without the need for intermediate processing.

How to eliminate wrong answers

Option B is wrong because Dataproc is a managed Spark/Hadoop service for batch processing, not a primary query interface for ad-hoc analytics; it would add unnecessary complexity and latency compared to BigQuery's direct Avro querying. Option C is wrong because Cloud SQL is a relational database for transactional workloads, not designed for large-scale analytics on Avro data in a data lake, and it cannot directly query Avro files. Option D is wrong because Firestore is a NoSQL document database for real-time applications, not suitable for analytical queries on large volumes of streaming data in Avro format.

224
MCQhard

A data science team deploys a TensorFlow image classification model to Vertex AI Prediction. The model performs well in offline evaluation but shows a 15% drop in accuracy in production. The production data distribution has shifted compared to the training data. The team needs to continuously monitor and retrain the model. Which solution is most appropriate for detecting drift and triggering retraining?

A.Enable Vertex AI Model Monitoring for feature drift; configure alerts to trigger a Vertex AI Pipelines retraining run.
B.Export production predictions to Cloud Logging, then use Log Analytics to compare distributions.
C.Store predictions in BigQuery and run scheduled SQL queries to detect drift; trigger retraining via Cloud Functions.
D.Use Cloud Monitoring to track prediction latency and error rates; manually retrain when errors increase.
AnswerA

Vertex AI Model Monitoring detects drift and can trigger automated retraining.

Why this answer

Vertex AI Model Monitoring is purpose-built for detecting feature drift in production ML models by comparing live inference data against a baseline distribution. When drift is detected, it can directly trigger a Vertex AI Pipelines retraining run, creating an automated, end-to-end MLOps loop that addresses the production accuracy drop without manual intervention.

Exam trap

Google Cloud often tests the distinction between operational monitoring (latency, errors) and data-quality monitoring (feature drift), leading candidates to mistakenly choose Cloud Monitoring (Option D) because they confuse production health metrics with model-specific distribution shifts.

How to eliminate wrong answers

Option B is wrong because exporting predictions to Cloud Logging and using Log Analytics for distribution comparison is a manual, ad-hoc approach that lacks native drift detection algorithms and automated retraining triggers, making it unsuitable for continuous monitoring. Option C is wrong because storing predictions in BigQuery and running scheduled SQL queries to detect drift requires custom statistical logic and does not leverage Vertex AI's built-in drift detection, alerting, or pipeline integration, leading to higher maintenance overhead. Option D is wrong because Cloud Monitoring tracks prediction latency and error rates, which are operational metrics, not feature distribution shifts; relying on error rates as a proxy for drift is indirect and unreliable, and manual retraining defeats the goal of continuous automation.

225
MCQhard

A Dataflow pipeline using Apache Beam processes unbounded data from Pub/Sub. The pipeline uses fixed windows of 1 minute and a trigger that fires early every 30 seconds and at watermark. The team observes that the output pane for window [10:00:00, 10:01:00) contains events with timestamps from 10:00:15 and 10:00:45, but also an event with timestamp 10:02:00. What is the most likely cause?

A.The trigger is firing too early, causing the window to close prematurely
B.Allowed lateness is set to more than 1 minute, so late data is still included in its original window
C.The watermark is incorrectly estimated, allowing late data to be included
D.The window duration is actually 2 minutes due to a misconfiguration
AnswerB

When allowed lateness > 0, late data (with timestamp after window end but within allowed lateness) is still included in the correct window. The event with timestamp 10:02:00 is 1 minute late for window [10:00, 10:01), so allowed lateness must be at least 1 minute.

Why this answer

Late data can arrive after the watermark has passed, and with allowed lateness, it can be included in the original window. The event with timestamp 10:02:00 is late data that arrived after the watermark for window [10:00:00, 10:01:00), but within the allowed lateness period. It is not a trigger issue because the trigger fires correctly; the event is simply late.

Page 2

Page 3 of 12

Page 4