Courseiva

Google Professional Data Engineer (PDE) — Questions 376450

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

Page 5

Page 6 of 12

Page 7
376
Matchingmedium

Match each Google Cloud service to its data processing capability.

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

Concepts
Matches

Unified stream and batch processing (Apache Beam)

Managed Spark and Hadoop clusters

Workflow orchestration (Apache Airflow)

Visual data integration and pipeline builder

Why these pairings

Dataflow is for stream/batch processing, Dataproc for managed clusters, and Pub/Sub for messaging. Distractors swap responsibilities with Cloud Composer and Dataflow.

377
MCQmedium

A data pipeline reading from Cloud Storage and writing to BigQuery using Dataflow is experiencing high cost. The data is CSV and needs schema inference. What change reduces cost?

A.Use Dataproc instead of Dataflow
B.Use Cloud Functions to transform data
C.Use BigQuery load jobs with schema auto-detection
D.Use BigQuery Data Transfer Service
AnswerC

Load jobs are free for data ingestion (only storage cost) and support auto-detection.

Why this answer

BigQuery load jobs with schema auto-detection can directly ingest CSV files from Cloud Storage without the need for a Dataflow pipeline, eliminating the compute cost associated with Dataflow. Schema auto-detection infers column names and types from the CSV header and data, matching the requirement for schema inference while being a serverless, no-cost-for-compute operation (you only pay for storage and querying). This reduces cost by removing the Dataflow processing step entirely.

Exam trap

Google Cloud often tests the misconception that any data transformation or schema inference requires a processing framework like Dataflow or Dataproc, when in fact BigQuery's native load jobs with auto-detection can handle many CSV ingestion scenarios at zero compute cost.

How to eliminate wrong answers

Option A is wrong because Dataproc is a managed Spark/Hadoop service that incurs compute costs for cluster VMs, and using it instead of Dataflow would not reduce cost—it would likely increase cost due to cluster overhead and the need to manage schema inference manually. Option B is wrong because Cloud Functions are event-driven compute that would still require processing each CSV file, incurring invocation and execution costs, and they lack native schema inference for BigQuery, requiring custom code that adds complexity and potential cost. Option D is wrong because BigQuery Data Transfer Service is designed for scheduled transfers from sources like Google Ads, Amazon S3, or SaaS applications, not for ad-hoc CSV files in Cloud Storage; it does not support schema auto-detection for arbitrary CSV files and would not replace the need for a pipeline.

378
MCQhard

A company has a BigQuery table that is partitioned by ingestion time and clustered by the 'customer_id' column. They notice that queries filtering on 'customer_id' are not benefiting from clustering as expected. What is the most likely cause?

A.The query is using a wildcard function that prevents clustering pruning
B.The clustering column must be the same as the partition column
C.The table is too small for clustering to be effective
D.Clustering does not work with ingestion-time partitioning
AnswerC

Clustering is most effective on large tables (>1 GB). On small tables, the benefits are minimal.

Why this answer

Clustering works best when the clustering column is used in a filter that limits data scanned. However, if the filter is on a non-clustering column, or if the clustering column has high cardinality with many distinct values, clustering may not help much. In this case, the issue could be that the filter on 'customer_id' is not selective enough, or the table is too small.

379
MCQmedium

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

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

Sequential split respects the temporal order and prevents leakage.

Why this answer

For time-series data, a random split would leak future information into training. A sequential split (earlier data for training, later for evaluation) is required.

380
Multi-Selecteasy

A company is designing a CI/CD pipeline for their ML models using Cloud Build and Vertex AI. Which TWO practices should they adopt to ensure reliable and reproducible deployments?

Select 2 answers
A.Require manual approval for every model change before deployment
B.Store all model artifacts in a single Cloud Storage bucket without versioning
C.Use immutable container images with version tags for each model deployment
D.Include unit tests for data preprocessing and feature engineering code in the pipeline
E.Deploy every model version directly to production for immediate use
AnswersC, D

Immutable images ensure that the exact same environment is used across all deployments.

Why this answer

Using immutable container images with version tags ensures that each deployment is based on a fixed, unchangeable artifact. This eliminates the risk of configuration drift or unintended changes between builds, which is critical for reproducibility in Vertex AI deployments. Cloud Build can tag images with the commit SHA or build ID, making each deployment traceable and rollback-safe.

Exam trap

Google often tests the misconception that manual approval gates or single-bucket storage without versioning are acceptable for reproducibility, when in fact they undermine automation and traceability in CI/CD pipelines.

381
MCQeasy

Which BigQuery feature allows you to estimate the cost of a query before running it, by returning the number of bytes that would be processed?

A.EXPLAIN statement
B.INFORMATION_SCHEMA.JOBS
C.--dry_run flag
D.Slot estimator
AnswerC

dry_run returns bytes processed without running the query.

Why this answer

The --dry_run flag in the BigQuery CLI or the dryRun parameter in the API simulates the query and returns the bytes processed without executing it, allowing cost estimation.

382
MCQmedium

A team runs a Dataflow streaming pipeline that reads from Pub/Sub, windows events by processing time, and writes to BigQuery. Some late-arriving events are being dropped. The requirement is to include all events that arrive within 10 minutes of the watermark. Which pipeline configuration should be used?

A.Use sliding windows with no allowed lateness
B.Use fixed windows with .withAllowedLateness(Duration.standardMinutes(10))
C.Use fixed windows with withAllowedLateness(Duration.standardSeconds(10))
D.Switch from processing time to event time and use default triggers
AnswerB

Allows late data up to 10 minutes after watermark.

Why this answer

`withAllowedLateness(Duration.standardMinutes(10))` on a fixed window allows late-arriving events to be included up to 10 minutes after the watermark passes the window's end. This directly meets the requirement to retain events arriving within 10 minutes of the watermark, while still using processing-time windows as specified.

Exam trap

Google Cloud often tests the distinction between processing time and event time, and the exact value of allowed lateness, tricking candidates into choosing a shorter duration or the wrong window type.

How to eliminate wrong answers

Option A is wrong because sliding windows with no allowed lateness will drop all late events, failing the requirement to include events within 10 minutes of the watermark. Option C is wrong because `withAllowedLateness(Duration.standardSeconds(10))` only allows 10 seconds of lateness, not the required 10 minutes. Option D is wrong because switching to event time would change the windowing basis from processing time, which is not requested, and default triggers alone do not provide the explicit 10-minute lateness allowance needed.

383
MCQhard

An e-commerce company uses Vertex AI to serve a real-time personalization model. The model is updated daily via a retraining pipeline that uploads a new version to the same endpoint. Recently, after a model update, the online prediction responses have been returning anomalous results (e.g., recommending irrelevant products). The previous version performed well. The team suspects that the new model is undercooked or has a bug. They have already checked the training code and the pipeline logs, which show no errors. The pipeline deploys the new model version to the endpoint by updating the traffic split to route 100% of traffic to the new version. Which course of action should the team take to quickly mitigate the issue while diagnosing the root cause? A) Roll back the endpoint to the previous model version by setting traffic split to 0% for the new version. B) Delete the current endpoint and recreate it with the previous model version. C) Tweak the training hyperparameters and retrain immediately. D) Increase the number of replicas on the endpoint to handle load.

A.Tweak the training hyperparameters and retrain immediately.
B.Increase the number of replicas on the endpoint to handle load.
C.Delete the current endpoint and recreate it with the previous model version.
D.Roll back the endpoint to the previous model version by setting traffic split to 0% for the new version.
AnswerD

Rolling back traffic instantly restores previous behavior while allowing debugging of the new version.

Why this answer

Rolling back traffic to the previous known-good version immediately restores correct predictions, while the team investigates the new model. Option A (tweaking hyperparameters) takes time and may not fix the bug. Option B (increasing replicas) does not address the incorrect model output.

Option C (deleting endpoint) is excessive and causes downtime.

384
MCQhard

A company runs a batch processing job on Dataproc that uses Apache Spark to process 500 GB of data daily. The job completes successfully but takes 4 hours. The team wants to reduce the runtime to under 2 hours without increasing cost. What should they do?

A.Use preemptible VMs for worker nodes and increase the number of workers.
B.Increase the master node's machine type to n2-standard-8.
C.Increase the machine type of worker nodes to n2-highmem-8.
D.Migrate the job to Dataflow with autoscaling enabled.
AnswerA

Preemptible VMs are cheaper, allowing more workers for the same cost, reducing runtime.

Why this answer

Preemptible VMs cost significantly less than standard VMs (about 60-80% discount). By using preemptible VMs for worker nodes, you can increase the number of workers (and thus parallelism) without increasing cost. This directly reduces runtime by distributing the 500 GB workload across more executors, while the cost savings from preemptible VMs offset the additional nodes.

Exam trap

Google Cloud often tests the trade-off between cost and performance by making candidates think that upgrading machine types (more CPU/memory) is the only way to speed up a job, ignoring that preemptible VMs allow scaling out (more nodes) without increasing cost.

How to eliminate wrong answers

Option B is wrong because increasing the master node's machine type (e.g., to n2-standard-8) improves driver capacity but does not accelerate data processing; Spark's bottleneck is typically worker parallelism and memory, not the driver. Option C is wrong because increasing worker node machine type (e.g., to n2-highmem-8) increases cost per node, and without adding more workers, the parallelism remains the same, so runtime may not drop below 2 hours while cost increases. Option D is wrong because migrating to Dataflow does not inherently reduce cost; Dataflow uses different pricing (per second of vCPU/memory) and autoscaling may increase cost if the job requires more resources to meet the 2-hour target, and the question explicitly requires no cost increase.

385
MCQhard

A company uses Cloud Storage to store IoT sensor data in JSON format. The data is ingested using a Cloud Function triggered by Cloud Storage events. They notice that when many files are uploaded simultaneously, some files are not processed and the Cloud Function logs show 'function execution timeout'. What is the most likely cause and solution?

A.The Cloud Function is not idempotent; implement idempotency.
B.The Cloud Storage event notification is unreliable; switch to Pub/Sub notifications.
C.The Cloud Function has too few instances; increase max instances.
D.The Cloud Function's timeout is too short; increase timeout beyond 540 seconds.
AnswerD

Increasing the timeout allows the function to complete its processing within the allocated time.

Why this answer

The Cloud Function logs explicitly show 'function execution timeout', which indicates the function is exceeding its configured maximum runtime. The default Cloud Functions timeout is 60 seconds, and the maximum is 540 seconds (9 minutes). When many files are uploaded simultaneously, each function invocation may take longer due to increased processing load, causing timeouts.

Increasing the timeout to the maximum of 540 seconds gives the function more time to complete processing, directly addressing the logged error.

Exam trap

Google Cloud often tests the distinction between scaling issues (max instances) and timeout issues, so the trap here is that candidates see 'many files uploaded simultaneously' and incorrectly assume a concurrency/scaling problem, when the logs explicitly point to a timeout.

How to eliminate wrong answers

Option A is wrong because idempotency ensures duplicate events don't cause duplicate processing, but the logs show timeouts, not duplicate processing errors. Option B is wrong because Cloud Storage event notifications are reliable for triggering Cloud Functions; switching to Pub/Sub adds a buffer but does not solve the timeout issue. Option C is wrong because increasing max instances would allow more concurrent invocations, but the problem is that individual invocations are timing out, not that there are too few instances to handle the load.

386
MCQmedium

A healthcare company must encrypt data in BigQuery with customer-managed keys (CMEK). They want to control the key lifecycle independently. Which approach should they take?

A.Use BigQuery column-level encryption (AEAD) with a key from Cloud KMS
B.Use Cloud KMS to create a key, then set it as the default encryption key for the BigQuery dataset
C.Enable default encryption on the Cloud Storage bucket used for staging data
D.Encrypt the data before loading using a custom application and store the key in Secret Manager
AnswerB

BigQuery CMEK is configured at the dataset level via Cloud KMS.

Why this answer

BigQuery supports CMEK through Cloud KMS. You can create a key ring and key in Cloud KMS, then specify it when creating datasets or tables. The key is used to encrypt data at rest.

Column-level encryption is separate and uses AEAD functions with customer-managed keys at the application level.

387
Multi-Selectmedium

A healthcare company stores patient records as JSON files in Cloud Storage for analysis. They want to design a data lake that enables querying the data with BigQuery while minimizing storage costs and maintaining data security. Which two actions should they take? (Choose two.)

Select 2 answers
A.Partition the data by date and store in separate directories for each partition.
B.Configure object lifecycle management to transition files older than 90 days to Nearline storage.
C.Convert all JSON files to CSV to reduce storage size.
D.Use BigLake to create external tables with row-level security and access delegation.
E.Enable Cloud KMS to encrypt the data with customer-managed encryption keys.
AnswersB, D

Lifecycle policies automatically move data to cheaper storage classes, reducing cost.

Why this answer

Options B and D are correct. Option B uses Cloud Storage object lifecycle management to transition older objects to Nearline storage, reducing storage costs while maintaining queryability via BigQuery external tables. Option D uses BigLake to create external tables with row-level security and access delegation, ensuring data security and enabling direct BigQuery querying without moving data, while minimizing storage costs by avoiding data duplication.

Exam trap

A common misconception is that converting JSON to CSV always reduces storage size, but the primary cost-saving mechanism for infrequently accessed data is lifecycle management to colder storage tiers like Nearline. Additionally, BigLake provides security and access delegation without needing to transform the data format.

388
MCQmedium

Your team runs a weekly batch ETL pipeline using Cloud Dataproc. The pipeline reads raw data from Cloud Storage, transforms it with Apache Spark, and writes results to BigQuery. Recently, the pipeline has been failing with the error 'Out of Memory' during the shuffle phase. The cluster uses standard worker nodes (n1-standard-4). What is the most effective way to resolve this without increasing total cost?

A.Increase the number of Spark partitions by setting spark.sql.shuffle.partitions to a higher value.
B.Increase the number of worker nodes by adding more n1-standard-4 instances.
C.Enable dynamic allocation and use preemptible VMs for some workers.
D.Switch worker nodes to n1-highmem-4 instances to provide more memory.
AnswerA

More partitions mean less data per partition, reducing memory usage per task. This can resolve OOM without added cost.

Why this answer

The 'Out of Memory' error during the shuffle phase indicates that individual executor tasks are processing too much data per partition. Increasing `spark.sql.shuffle.partitions` reduces the amount of data each task handles, lowering memory pressure per executor without adding more nodes or upgrading hardware. This directly addresses the shuffle memory bottleneck while keeping the total cluster cost unchanged.

Exam trap

The trap here is that candidates often assume memory errors must be solved by adding more memory (Option D) or more nodes (Option B), ignoring the cost constraint and the fact that repartitioning can resolve the issue without additional resources.

How to eliminate wrong answers

Option B is wrong because adding more worker nodes increases total cost, which violates the constraint of not increasing cost. Option C is wrong because enabling dynamic allocation and using preemptible VMs does not resolve the per-executor memory shortage; it only changes cluster scaling and cost structure, but the shuffle memory issue persists on the existing nodes. Option D is wrong because switching to n1-highmem-4 instances increases per-node memory but also increases cost per node, raising total cost unless the number of nodes is reduced, which is not specified and may not be feasible without losing parallelism.

389
MCQhard

You are implementing a data pipeline that reads from Cloud Storage (parquet files), transforms data with Cloud Dataflow, and writes to BigQuery. The pipeline runs on a batch schedule every hour. You notice that the Dataflow job takes 10 minutes, but the overall pipeline latency is 15 minutes due to file availability and scheduling. The business requires latency under 5 minutes. Which change should you make?

A.Switch to streaming pipeline with .watchForNewFiles() and process files as they arrive
B.Batch the hourly data into a single larger hourly run
C.Use a larger machine type for the Dataflow workers
D.Increase the number of workers and use smaller input files
AnswerA

This reduces latency by triggering processing immediately.

Why this answer

The root cause of the latency is file availability and scheduling delay, not the processing time. Switching to a streaming pipeline with `.watchForNewFiles()` (or the equivalent `FileIO.match().continuously()`) allows Dataflow to process files as soon as they arrive in Cloud Storage, eliminating the batch scheduling wait and reducing overall latency to near the processing time.

Exam trap

Google Cloud often tests the distinction between reducing processing time (compute optimization) and reducing scheduling/availability latency (pipeline architecture change), leading candidates to mistakenly choose worker scaling or batching options.

How to eliminate wrong answers

Option B is wrong because batching the hourly data into a single larger run would increase the processing time and does not address the file availability and scheduling delay that cause the 5-minute overhead. Option C is wrong because using a larger machine type for Dataflow workers would only reduce the 10-minute processing time, not the 5-minute scheduling and file availability delay. Option D is wrong because increasing the number of workers and using smaller input files could reduce processing time but does not eliminate the scheduling wait or the delay waiting for files to become available.

390
Multi-Selecthard

During a Vertex AI training pipeline, the training job fails with an error: 'Out of memory: Killed process'. The model is a large deep learning model using TensorFlow. Which THREE steps should the team take to resolve this issue?

Select 3 answers
A.Change to a distributed training strategy
B.Enable memory growth configuration in TensorFlow
C.Switch the training from GPU to TPU accelerator
D.Reduce the training batch size
E.Use a custom machine type with more memory
AnswersB, D, E

Memory growth allows TensorFlow to allocate memory on demand, avoiding early OOM.

Why this answer

TensorFlow by default allocates all available GPU memory, which can cause out-of-memory (OOM) errors when other processes or the system itself need memory. Enabling memory growth with `tf.config.experimental.set_memory_growth` allows TensorFlow to allocate memory incrementally, reducing the risk of OOM kills. This is a direct mitigation for the 'Killed process' error caused by memory exhaustion.

Exam trap

Google Cloud often tests the misconception that distributed training automatically solves memory issues, but in reality, it distributes computation, not memory pressure, and can even increase per-node memory usage due to gradient synchronization buffers.

391
MCQeasy

A team deploys a new version of a Cloud Function. After deployment, error rates increase significantly. What is the most efficient way to diagnose the cause?

A.Deploy a debug version with additional logging.
B.Check Cloud Logging for error stacks and exceptions.
C.Increase the function timeout and retry settings.
D.Immediately rollback to the previous version.
AnswerB

Logs provide immediate insight into the error, allowing targeted debugging.

Why this answer

Cloud Logging automatically captures error stacks and exceptions from Cloud Functions without requiring code changes. Checking these logs is the most efficient first step because it provides immediate visibility into the root cause of errors, such as unhandled exceptions, timeouts, or dependency failures, without incurring additional deployment overhead.

Exam trap

Google tests the principle of 'most efficient diagnostic step' by tempting candidates to choose a reactive action (like rollback or timeout increase) or a time-consuming code change, rather than leveraging existing observability tools like Cloud Logging that provide immediate, detailed error context.

How to eliminate wrong answers

Option A is wrong because deploying a debug version with additional logging is inefficient and time-consuming; it requires modifying code, redeploying, and potentially introducing new issues, whereas Cloud Logging already captures detailed error information. Option C is wrong because increasing function timeout and retry settings does not diagnose the cause of errors; it only masks symptoms by allowing more time for execution or retrying failed invocations, which could exacerbate resource consumption and latency. Option D is wrong because immediately rolling back to the previous version is a reactive mitigation step, not a diagnostic one; it may restore service but fails to identify the root cause, leaving the team without insight into what went wrong in the new version.

392
MCQmedium

A company processes real-time clickstream data from websites. They need to aggregate user sessions that may span multiple hours and handle events that arrive late due to network delays. The pipeline must avoid discarding late data. Which Dataflow feature should they configure?

A.Use fixed windows with a trigger that fires after every element
B.Use session windows with a gap duration and allow late data with a suitable allowed_lateness
C.Use the GlobalWindow with a watermark
D.Use sliding windows with no allowed lateness
AnswerB

Session windows group events within a gap, and allowed_lateness accommodates late arrivals.

Why this answer

Session windows are ideal for aggregating user sessions that span multiple hours, as they group events based on a gap duration of inactivity. By configuring `allowed_lateness`, the pipeline can handle late-arriving events without discarding them, ensuring completeness. This directly addresses the requirement to avoid discarding late data while aggregating sessions.

Exam trap

Google Cloud often tests the distinction between window types and late-data handling; the trap here is that candidates might choose fixed or sliding windows without realizing they lack the session-gap logic needed for variable-length user sessions, or they might overlook the `allowed_lateness` parameter as the key to preserving late data.

How to eliminate wrong answers

Option A is wrong because fixed windows with a trigger after every element would create a new window per event, failing to aggregate sessions that span hours and not handling late data properly. Option C is wrong because GlobalWindow with a watermark is used for global aggregations (e.g., counting all events) but does not naturally group events into sessions based on inactivity gaps; it would require complex triggers and does not inherently support sessionization. Option D is wrong because sliding windows with no allowed lateness would discard any late-arriving events, violating the requirement to avoid discarding late data.

393
Multi-Selectmedium

A data engineer needs to implement data quality rules and governance policies across multiple data lakes in GCP. They want to automatically discover and catalog data assets, and enforce row-level security. Which two services should they use? (Select TWO)

Select 2 answers
A.Security Command Center
B.Dataplex
C.Cloud DLP
D.Dataflow
E.Data Catalog
AnswersB, E

Dataplex provides unified data lake management with built-in data quality, governance, and row-level security enforcement.

Why this answer

Dataplex (B) provides unified data management including data quality, governance policies, and row-level security via BigQuery. Data Catalog (E) enables automated discovery and cataloging of data assets across multiple data lakes. Together, they satisfy all requirements.

394
Multi-Selecthard

A company uses Cloud Dataproc for ephemeral clusters to run batch jobs. They want to ensure job reliability and data quality. Which two configuration options should they use? (Choose two.)

Select 2 answers
A.Enable preemptible VMs for cost savings.
B.Use initialization actions for cluster setup.
C.Enable idle timeout to automatically delete clusters.
D.Use custom machine types for better performance.
E.Use graceful decommissioning of workers.
AnswersB, E

Initialization actions guarantee required software and configurations are present, improving job consistency.

Why this answer

Initialization actions allow you to install dependencies, configure software, or validate data sources on every cluster node before jobs run. This ensures consistent cluster setup across ephemeral clusters, directly supporting job reliability and data quality by preventing environment mismatches or missing libraries.

Exam trap

The trap here is that candidates might confuse cost-saving or performance features with reliability and data quality mechanisms. For example, enabling preemptible VMs (which are spot instances in Google Cloud) reduces cost but can cause job failures if workers are reclaimed. Idle timeout only deletes clusters after inactivity, not ensuring reliable job execution.

Custom machine types improve performance but not reliability. In contrast, initialization actions for Google Cloud Dataproc ensure every ephemeral cluster node has the correct software and data sources, directly supporting job reliability and data quality. Graceful decommissioning allows workers to complete their tasks before being removed, preventing data loss during scaling down or cluster deletion.

These two options directly address consistency and fault tolerance for Dataproc batch jobs.

395
Multi-Selectmedium

A company wants to build a real-time dashboard for monitoring application logs. The logs are ingested via Pub/Sub and must be processed with low latency (sub-second). You need to enrich the logs with user metadata from Cloud SQL and store the results in BigQuery for analysis. Which TWO services should be used for the stream processing? (Choose two.)

Select 2 answers
A.Dataproc
B.Cloud Data Fusion
C.Dataflow
D.Cloud Functions
E.Pub/Sub
AnswersC, E

Dataflow handles stream processing with sub-second latency and side inputs.

Why this answer

Dataflow can read from Pub/Sub, enrich with side inputs from Cloud SQL, and write to BigQuery. Pub/Sub is the ingestion point. The pipeline uses Dataflow for stream processing.

396
MCQmedium

A data engineer is building a batch pipeline that runs daily using Cloud Composer. The pipeline has three tasks: extract data from Cloud Storage, transform data using Dataflow, and load the transformed data into BigQuery. The engineer wants to ensure that the Dataflow job only starts after the extraction task completes successfully, and the load task only starts after the Dataflow job finishes. How should the engineer define the task dependencies in the Airflow DAG?

A.extract >> [transform, load]
B.transform >> extract >> load
C.extract >> transform >> load
D.extract >> load >> transform
AnswerC

Correct: This defines sequential dependencies: extract before transform, transform before load.

Why this answer

Airflow uses the bitshift operator (>>) to define task dependencies in a linear sequence. The DAG must ensure that the extract task completes before the transform task starts, and the transform task completes before the load task starts. This is achieved by chaining the tasks in order: extract >> transform >> load, which enforces the required sequential execution.

Exam trap

A common misconception is that multiple tasks can be chained in parallel with a single bitshift operator, leading candidates to choose Option A, which incorrectly allows the load task to start before the Dataflow job completes. In Airflow, sequential dependencies are defined by chaining tasks with '>>' in order.

How to eliminate wrong answers

Option A is wrong because it sets transform and load as parallel downstream tasks of extract, meaning load could start before transform finishes, violating the requirement that load waits for Dataflow. Option B is wrong because it places transform before extract, which would attempt to run the Dataflow job before the extraction completes, breaking the dependency chain. Option D is wrong because it places load before transform, which would attempt to load data into BigQuery before the Dataflow transformation is done, leading to incorrect or missing data.

397
MCQeasy

A startup needs a fully managed, serverless Spark service to run occasional data processing jobs without managing clusters. They want to pay only for the resources used during job execution. Which Google Cloud service should they use?

A.Dataproc Serverless
B.Dataflow
C.Cloud Data Fusion
D.Dataproc
AnswerA

Dataproc Serverless automatically manages resources for Spark jobs and charges per job.

Why this answer

Dataproc Serverless provides a serverless Spark environment where you pay per job execution. Cloud Data Fusion is for visual ETL. Dataproc is managed but not serverless.

Dataflow is serverless for Beam, not Spark.

398
MCQeasy

A logistics company uses Cloud Functions to process incoming tracking events from IoT devices. Events are sent via HTTP triggers. During peak hours, some events fail with 500 errors. What is the best strategy to handle this reliably?

A.Implement client-side retry with exponential backoff.
B.Increase the Cloud Functions timeout to 9 minutes and memory to 2GB.
C.Switch to Cloud Tasks and configure retry parameters.
D.Use Cloud Pub/Sub as an intermediary: send events to Pub/Sub and trigger Cloud Functions via Pub/Sub subscription.
AnswerD

Pub/Sub provides buffering and retries.

Why this answer

Cloud Pub/Sub decouples event ingestion from processing, providing at-least-once delivery and built-in retry with exponential backoff. This ensures that HTTP 500 errors from Cloud Functions are automatically retried without data loss, even during peak loads, and the Pub/Sub subscription can be configured with a dead-letter queue for persistent failures.

Exam trap

Google Cloud often tests the misconception that client-side retry (Option A) or increasing resource limits (Option B) is sufficient for reliability, when the core requirement is decoupling ingestion from processing to handle transient failures and scale independently.

How to eliminate wrong answers

Option A is wrong because client-side retry with exponential backoff shifts the burden to IoT devices, which may be resource-constrained or unreliable, and does not guarantee delivery if the client fails or disconnects. Option B is wrong because increasing timeout and memory does not address the root cause of 500 errors (e.g., transient backend failures or throttling) and can increase costs without improving reliability. Option C is wrong because Cloud Tasks is designed for HTTP target tasks with retries, but it still relies on the Cloud Functions HTTP endpoint, which can fail under load; Cloud Tasks does not provide the same buffering and decoupling as Pub/Sub for event-driven ingestion.

399
MCQhard

A Dataflow pipeline as described in the exhibit has increasing lag. Which optimization is most likely to reduce the lag?

A.Use FileLoads instead of StreamingInserts for BigQuery output
B.Increase the number of workers
C.Use global windows instead of fixed windows
D.Add additional ParDo transforms
AnswerA

FileLoads (batch loads) are more efficient for high throughput and reduce lag.

Why this answer

The exhibit shows increasing lag in a Dataflow pipeline writing to BigQuery. StreamingInserts (the default) use the BigQuery Storage Write API, which can throttle under high throughput, causing backpressure and lag. Switching to FileLoads writes data to temporary files in Cloud Storage and then loads them into BigQuery via batch load jobs, which decouples the write path from the streaming insert quota and reduces lag by avoiding per-row insert limits.

Exam trap

Google Cloud often tests the misconception that scaling workers or changing windowing fixes all performance issues, but the trap here is that the lag is specifically caused by the BigQuery sink's streaming insert throttling, which requires a sink-level optimization like FileLoads.

How to eliminate wrong answers

Option B is wrong because increasing the number of workers can help with parallel processing but does not address the root cause of lag from BigQuery streaming insert quota exhaustion or throttling; it may even increase the rate of inserts and worsen the problem. Option C is wrong because using global windows instead of fixed windows does not affect the write path to BigQuery; windowing changes how data is grouped for aggregation but does not reduce lag caused by the sink's throughput limitations. Option D is wrong because adding additional ParDo transforms increases the processing steps and can introduce more latency, making the lag worse rather than reducing it.

400
MCQhard

You have two versions of a classification model (v1 and v2) deployed on a Vertex AI Endpoint. You want to gradually roll out v2 to 10% of traffic, monitor performance, and if metrics are better, increase traffic to 100%. You have set up model monitoring for skew and drift. Which configuration should you use?

A.Use the Vertex AI Endpoint 'traffic_split' parameter to assign 10% of traffic to v2 and 90% to v1.
B.Deploy v2 to a separate endpoint and use a load balancer to route 10% of traffic.
C.Create a new deployment with v2 on the same endpoint and set the 'min_replica_count' to 1 for both versions.
D.Enable Vertex AI Model Monitoring on the endpoint and set up alerting for performance drop.
AnswerA

Traffic splitting is the standard method for canary deployments.

Why this answer

The Vertex AI Endpoint 'traffic_split' parameter allows you to direct a percentage of inference requests to different model versions deployed on the same endpoint. Setting 10% to v2 and 90% to v1 enables a gradual rollout while monitoring skew and drift, and you can adjust the split as needed. This is the native, supported method for canary deployments in Vertex AI, avoiding the complexity and latency of external load balancers.

Exam trap

The trap here is that candidates confuse infrastructure-level load balancing (Option B) with Vertex AI's built-in traffic splitting, or think that replica counts (Option C) control traffic distribution, when in fact traffic_split is the only parameter that directly controls request routing percentages.

How to eliminate wrong answers

Option B is wrong because deploying v2 to a separate endpoint and using an external load balancer adds unnecessary complexity, latency, and cost; Vertex AI Endpoints natively support traffic splitting without additional infrastructure. Option C is wrong because setting 'min_replica_count' to 1 for both versions does not control traffic distribution; it only ensures minimum instance availability, not the percentage of requests routed to each model. Option D is wrong because enabling Model Monitoring and alerting for performance drop is a monitoring step, not a configuration for traffic splitting; it does not direct 10% of traffic to v2.

401
MCQmedium

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

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

Vertex AI Workbench offers managed, pre-configured Jupyter notebooks with deep learning libraries.

Why this answer

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

Vertex AI Pipelines is for orchestrating ML workflows.

402
MCQeasy

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

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

Correct: approximate distinct count with improved performance.

Why this answer

APPROX_COUNT_DISTINCT is a HyperLogLog++ based function that provides an approximate distinct count with standard error of ~1.6%, and is much faster on large datasets.

403
MCQmedium

You have a Dataflow pipeline that processes streaming data with high throughput. You notice that the pipeline is experiencing high latency and the workers are underutilized. Which Dataflow feature can automatically optimize resource allocation?

A.Flex Templates
B.Horizontal autoscaling
C.Streaming Engine
D.Dataflow Prime
AnswerD

Dataflow Prime offers vertical autoscaling and right-fitting to optimize worker resources.

Why this answer

Dataflow Prime (also known as right-fitting) provides vertical autoscaling and resource optimization based on actual usage. Horizontal autoscaling is standard but may not address underutilization. Streaming engine is for scaling the streaming writes but not worker tuning.

Flex templates are for deployment, not runtime optimization.

404
MCQhard

A media company uses Cloud Dataflow to process video metadata from a Pub/Sub stream. The pipeline enriches metadata using a lookup table stored in Cloud Bigtable. Recently, they noticed increased latency and occasional 'Bigtable operation timeout' errors. The Bigtable instance has 3 nodes and the data is highly distributed. The Dataflow pipeline uses default settings. What is the most likely cause of the timeouts?

A.The Bigtable table uses a single column family with over 100 columns, leading to high read overhead
B.The Dataflow pipeline uses a large batch size for Bigtable reads, overwhelming the instance
C.The Bigtable cluster has too few nodes for the read throughput
D.The Dataflow pipeline does not cache Bigtable results, causing repeated lookups
AnswerA

Wide column families cause inefficient reads in Bigtable.

Why this answer

A single column family with over 100 columns in Bigtable forces the system to read all column qualifiers for each row, even if only a few are needed. This increases read overhead and latency, and can trigger 'operation timeout' errors when the Dataflow pipeline's default settings (which do not limit column qualifiers) request the entire row. The highly distributed data and 3-node cluster exacerbate the issue, but the root cause is the excessive column count within one family.

Exam trap

Google Cloud often tests the misconception that Bigtable timeouts are always due to insufficient nodes or throughput, when in fact the root cause can be inefficient schema design like a single column family with too many columns.

How to eliminate wrong answers

Option B is wrong because Dataflow's default batch size for Bigtable reads is conservative (typically 1–10 rows per RPC), not large; a large batch size would actually reduce overhead, not cause timeouts. Option C is wrong because 3 nodes for a highly distributed dataset is generally sufficient for moderate throughput; the timeouts are due to per-row read overhead, not node count. Option D is wrong because caching Bigtable results would not help with timeouts caused by reading too many columns per row; caching reduces repeated lookups but does not address the fundamental read amplification from a wide column family.

405
MCQeasy

A company wants to trigger a Cloud Run service whenever a new file is uploaded to a specific Cloud Storage bucket. Which event-driven solution should they use?

A.Eventarc with Cloud Storage trigger and Cloud Run destination
B.Cloud Scheduler to periodically poll the bucket
C.Cloud Functions triggered by Cloud Storage
D.Pub/Sub with a push subscription to Cloud Run
AnswerA

Eventarc natively supports Cloud Storage events and routes to Cloud Run.

Why this answer

Eventarc is the recommended service for routing events from Cloud Storage to Cloud Run because it provides a fully managed, event-driven architecture with built-in filtering and retry logic. When a new file is uploaded, Cloud Storage emits a notification that Eventarc captures and delivers directly to the Cloud Run service as an HTTP request, enabling serverless processing without polling or additional infrastructure.

Exam trap

The trap here is that candidates confuse Cloud Functions (option C) as the only serverless compute option for Cloud Storage events, overlooking that Eventarc is the modern, preferred service for routing events to Cloud Run, and that Pub/Sub (option D) requires manual setup not shown in the question.

How to eliminate wrong answers

Option B is wrong because Cloud Scheduler is a cron job service for scheduled, not event-driven, tasks; periodically polling a bucket introduces latency and inefficiency, and it cannot react instantly to uploads. Option C is wrong because Cloud Functions triggered by Cloud Storage is a valid event-driven approach, but the question specifically asks for a Cloud Run destination, and Cloud Functions cannot directly invoke Cloud Run without additional integration. Option D is wrong because Pub/Sub with a push subscription to Cloud Run requires manually configuring Cloud Storage to publish to Pub/Sub, which adds complexity and is not the native, recommended pattern for Cloud Storage events; Eventarc abstracts this by directly managing the event flow from Cloud Storage to Cloud Run.

406
MCQhard

You want to create a cost-efficient snapshot of a large BigQuery table that can be used by other teams for read-only analytics without incurring additional storage costs for the base table data. What should you use?

A.Create a BigQuery table snapshot of the original table.
B.Export the table to Cloud Storage as Avro files and load into a new table.
C.Create a view over the original table.
D.Create a BigQuery table clone of the original table.
AnswerD

Table clones share storage with the base table, so no additional storage cost initially. Charges apply only for modifications.

Why this answer

A BigQuery table clone creates a read-only, cost-efficient copy of the table that references the underlying storage of the base table, so no additional storage costs are incurred for the base data. Clones are ideal for sharing snapshots for read-only analytics without duplicating storage, and they support time-travel queries within the clone's retention period.

Exam trap

Google often tests the distinction between table clones (zero-cost storage for base data) and table snapshots (which incur storage costs for the snapshot data), leading candidates to mistakenly choose snapshots for cost efficiency.

How to eliminate wrong answers

Option A is wrong because a BigQuery table snapshot incurs additional storage costs for the snapshot data, as it creates a separate copy of the table's data at a point in time, not a zero-cost reference. Option B is wrong because exporting to Cloud Storage as Avro files and loading into a new table duplicates the data, incurring both export and storage costs for the new table, which is not cost-efficient. Option C is wrong because a view does not create a snapshot; it runs a query against the original table each time it is accessed, which can incur query costs and does not provide a static, read-only copy for other teams.

407
MCQhard

A company uses BigQuery's Storage Write API in committed mode to stream data. They notice that some writes are failing with 'DEADLINE_EXCEEDED' errors during peak traffic. The pipeline is a Dataflow job using the Beam SDK. What is the MOST likely cause and solution?

A.The Dataflow workers lack sufficient memory; increase worker memory.
B.The default RPC timeout is too low for the write throughput; increase the timeout in the Storage Write API configuration.
C.The Pub/Sub subscription is not sending acknowledgments; check the subscription.
D.The row schema has changed; update the schema before writing.
AnswerB

High traffic can cause RPCs to exceed the default timeout; increasing the timeout allows more time for acknowledgment.

Why this answer

Committed mode requires immediate acknowledgment from BigQuery. Under high traffic, the default timeout may be exceeded. The solution is to increase the timeout or switch to buffered mode, which provides higher throughput by batching.

The error is not due to schema mismatch or permissions; those would cause different errors. Pub/Sub is not involved in the write path.

408
MCQeasy

A company deploys a machine learning model on Vertex AI for online predictions. The model experiences intermittent spikes in traffic, causing latency increases. Which strategy should the company use to ensure consistent low latency during traffic spikes?

A.Enable autoscaling on the Vertex AI endpoint with appropriate min and max nodes.
B.Manually scale the deployed model to a larger machine type during peak hours.
C.Reduce the number of prediction nodes to minimize overhead.
D.Switch to batch prediction to handle all requests asynchronously.
AnswerA

Autoscaling automatically adjusts the number of nodes based on traffic, ensuring low latency during spikes while controlling cost.

Why this answer

Vertex AI endpoints support autoscaling, which dynamically adjusts the number of prediction nodes based on incoming traffic. By setting appropriate min and max nodes, the endpoint can scale up during traffic spikes to maintain low latency and scale down during low traffic to reduce costs. This ensures consistent performance without manual intervention.

Exam trap

Google Cloud often tests the misconception that manual scaling or switching to batch prediction is a valid solution for real-time latency spikes, when in fact autoscaling is the only automated, cost-effective method for handling intermittent traffic on Vertex AI endpoints.

How to eliminate wrong answers

Option B is wrong because manually scaling to a larger machine type during peak hours is reactive, not proactive, and cannot respond instantly to intermittent spikes; it also incurs higher costs during all peak hours rather than scaling only when needed. Option C is wrong because reducing the number of prediction nodes would decrease capacity, worsening latency during traffic spikes rather than improving it. Option D is wrong because batch prediction is designed for asynchronous, offline processing of large datasets and does not provide real-time, low-latency responses required for online predictions.

409
MCQeasy

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

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

Workbench provides managed notebooks for development and prototyping.

Why this answer

Vertex AI Workbench provides managed Jupyter notebooks with pre-installed frameworks and easy access to Vertex AI services.

410
MCQmedium

You need to analyze customer churn and want to understand the rank of each customer's churn probability within their subscription plan. Which BigQuery window function computes the relative ranking from 1 (highest probability) to N?

A.DENSE_RANK()
B.RANK()
C.NTILE(100)
D.ROW_NUMBER()
AnswerB

RANK() gives the rank within a partition; ties get same rank, next rank skips.

Why this answer

RANK() assigns a rank with gaps for ties; DENSE_RANK() assigns consecutive ranks; ROW_NUMBER() assigns unique sequential numbers; NTILE() divides into buckets. For relative ranking with ties, RANK() is typically used for 'rank' meaning.

411
MCQmedium

A company is migrating their on-premises Apache Spark jobs to Dataproc. They want to minimize code changes and take advantage of serverless infrastructure. Which Dataproc feature should they use?

A.Dataproc clusters with preemptible VMs
B.Dataproc Workflow Templates
C.Dataproc Serverless Spark
D.Dataproc Jobs API with custom machine types
AnswerC

Serverless Spark runs jobs without cluster management and is compatible with existing Spark code.

Why this answer

Dataproc Serverless Spark is the correct choice because it allows the company to run Spark workloads without provisioning or managing clusters, minimizing code changes by using the same Spark APIs and libraries. This serverless infrastructure automatically scales resources and handles failures, aligning with the goal of reducing operational overhead while maintaining compatibility with existing Spark jobs.

Exam trap

Google Cloud often tests the distinction between 'serverless' and 'managed' services; the trap here is that candidates may confuse Dataproc Workflow Templates or Jobs API with serverless capabilities, but those still require cluster management, whereas Dataproc Serverless Spark truly abstracts the infrastructure.

How to eliminate wrong answers

Option A is wrong because preemptible VMs are cost-effective but still require managing a cluster and do not provide serverless infrastructure; they are prone to termination, which can disrupt jobs without proper checkpointing. Option B is wrong because Workflow Templates orchestrate job sequences on existing clusters but do not eliminate cluster management or provide serverless execution. Option D is wrong because the Dataproc Jobs API with custom machine types still requires a running cluster to submit jobs, thus not achieving serverless infrastructure or minimizing cluster management.

412
MCQeasy

A data engineer wants to quickly estimate the cost of running a BigQuery query before executing it. Which command-line tool or command should they use?

A.gcloud logging read
B.bq query --use_cache=false
C.gcloud bigtable queries run
D.bq query --dry_run
AnswerD

The --dry_run flag parses and validates the query, then outputs the bytes processed without executing.

Why this answer

The `bq query --dry_run` command parses the query and reports the number of bytes processed without executing it, allowing cost estimation based on on-demand pricing.

413
Multi-Selectmedium

Which TWO best practices should be followed when managing multiple model versions on Vertex AI Endpoints for a production system?

Select 2 answers
A.Always keep all historical versions deployed to enable fast rollback.
B.If two versions share the same endpoint, they must have exactly the same machine type.
C.Use traffic splitting to gradually shift traffic to a new version while monitoring performance.
D.Upload each model version as a new model resource and deploy to a separate endpoint for isolation.
E.Use the same endpoint for multiple versions and adjust min_replica_count, max_replica_count for each version.
AnswersC, D

Traffic splitting enables canary deployments and safe rollback.

Why this answer

Vertex AI Endpoints support traffic splitting, allowing you to route a percentage of inference requests to a new model version while the rest goes to the existing version. This enables gradual rollout, monitoring of performance metrics (e.g., latency, error rate), and safe rollback without downtime. It is a best practice for production systems to validate a new version before fully cutting over.

Exam trap

Google Cloud often tests the misconception that multiple versions on the same endpoint must share identical infrastructure settings (like machine type), but Vertex AI allows heterogeneous configurations per version, and traffic splitting is the correct method for gradual rollouts, not keeping all versions or adjusting autoscaling parameters.

414
MCQmedium

A data engineer needs to design a schema in BigQuery for a dataset that contains customer orders. Each order has a header and multiple line items. Queries frequently need to retrieve the entire order including line items. Which schema design is MOST performant and cost-effective?

A.Store all data in a flat table with repeated order info per line item
B.Use nested and repeated fields (orders table with line items as REPEATED RECORD)
C.Normalize into separate orders and line_items tables, join on order_id
D.Use a partitioned table on order date
AnswerB

Nested/repeated fields allow storing order with line items in one row, eliminating joins.

Why this answer

BigQuery is optimized for denormalized schemas using nested and repeated fields (REPEATED RECORD). Storing line items as a repeated record within the orders table avoids expensive JOIN operations, reduces data shuffling, and allows BigQuery to scan only the necessary columns, making queries that retrieve entire orders with line items both faster and more cost-effective.

Exam trap

Google often tests the misconception that normalization (Option C) is always the best practice for relational databases, but in BigQuery's distributed, columnar architecture, denormalization with nested and repeated fields is the recommended pattern for performance and cost efficiency.

How to eliminate wrong answers

Option A is wrong because storing all data in a flat table with repeated order info per line item leads to massive data duplication (each line item repeats all order header fields), increasing storage costs and query scan size without leveraging BigQuery's native nested structure. Option C is wrong because normalizing into separate orders and line_items tables and joining on order_id introduces expensive JOIN operations that require shuffling and sorting large datasets, which is inefficient in BigQuery's distributed architecture and incurs higher slot usage and cost. Option D is wrong because partitioning on order date alone does not address the structural inefficiency of storing line items separately; while partitioning can improve query performance for date-range filters, it does not eliminate the need for JOINs or duplication, and the question specifically asks about retrieving entire orders with line items.

415
MCQmedium

A financial services company uses a Dataflow streaming pipeline to process real-time stock trades. The pipeline reads from Pub/Sub, enriches with reference data from Cloud Bigtable, and writes to BigQuery. Recently, they noticed an increase in processing latency during market open hours. Investigation shows that the pipeline is data-skewed: a few stock symbols generate 90% of the traffic. The team wants to reduce latency without changing the pipeline structure. What should they do?

A.Increase the Pub/Sub subscription flow control to buffer less data
B.Use event-time windows based on trade timestamp to spread data
C.Enable Dataflow Streaming Engine to dynamically repartition work
D.Increase the number of workers and use more CPU
AnswerC

Streaming Engine handles hot keys by splitting processing across workers.

Why this answer

Dataflow Streaming Engine can dynamically repartition work, which directly addresses data skew by redistributing the processing load of hot keys (e.g., high-volume stock symbols) across available workers. This reduces latency without altering the pipeline structure, as it uses a shuffle service that separates the compute from the storage, allowing for more efficient handling of skewed data.

Exam trap

Google often tests the misconception that simply scaling workers or adjusting flow control can solve data skew, but the correct approach requires a mechanism like Streaming Engine's dynamic repartitioning that specifically handles uneven key distribution without altering the pipeline structure.

How to eliminate wrong answers

Option A is wrong because increasing Pub/Sub subscription flow control to buffer less data would actually increase the risk of data loss or backpressure, and does not solve the underlying data skew issue; it only changes how much data is pulled at once. Option B is wrong because using event-time windows based on trade timestamps does not address data skew; it only groups data by time, but the hot keys (stock symbols) still cause uneven distribution within each window. Option D is wrong because increasing the number of workers and using more CPU does not fix data skew; without dynamic repartitioning, the hot keys will still overload a few workers, leading to resource underutilization and continued latency.

416
MCQmedium

An MLOps team wants to implement continuous deployment of ML models using Cloud Build and Vertex AI. They have a GitHub repository with training code. What should they use?

A.Deploy using Cloud Run
B.Vertex AI Pipelines integrated with Cloud Build
C.Cloud Functions to monitor GitHub
D.Cloud Build trigger with a custom step to run Vertex AI Training job and deploy
AnswerD

Cloud Build can be configured to trigger on GitHub pushes and run training/deployment steps.

Why this answer

It directly addresses the requirement for continuous deployment of ML models using Cloud Build and Vertex AI. A Cloud Build trigger can be configured to fire on GitHub commits, and a custom step in the Cloud Build pipeline can invoke a Vertex AI Training job, followed by deploying the trained model to Vertex AI Endpoints. This provides a fully automated CI/CD pipeline for ML models without additional orchestration overhead.

Exam trap

The trap here is that candidates may overthink the solution and choose Vertex AI Pipelines (Option B) because it is a dedicated ML orchestration tool, but the question specifically asks for integration with Cloud Build, and a simple Cloud Build trigger with custom steps is the most direct and efficient approach for continuous deployment.

How to eliminate wrong answers

Option A is wrong because Cloud Run is a serverless compute platform for containerized applications, not a service for training or deploying ML models in a Vertex AI context; it lacks native support for model versioning, evaluation, and endpoint management. Option B is wrong because Vertex AI Pipelines is an orchestration service for ML workflows, but integrating it with Cloud Build would add unnecessary complexity and is not the standard approach for a simple continuous deployment trigger; Cloud Build can directly invoke Vertex AI services without requiring a separate pipeline. Option C is wrong because Cloud Functions to monitor GitHub would require custom code to detect changes and trigger actions, which is less efficient and more error-prone than using Cloud Build's native GitHub trigger; Cloud Build already provides built-in event-driven triggers for GitHub repositories.

417
MCQmedium

A data engineer is designing a BigQuery table for a clickstream dataset with frequent queries aggregating over user sessions. Each user session has multiple events, and the engineer wants to avoid joins for performance. Which schema design pattern should they use?

A.Use a normalized schema with separate tables for sessions and events, then join on session ID
B.Store each event as a separate row with session key and use clustering on session ID
C.Use partitioning on event timestamp and clustering on user ID
D.Use nested and repeated fields to store events within each session row
AnswerD

Nested repeated fields allow storing events inside the session row, avoiding joins.

Why this answer

BigQuery supports nested and repeated fields (e.g., STRUCT and REPEATED), allowing denormalization. This reduces the need for joins and improves query performance. Partitioning and clustering are for physical data organization, not schema design.

418
MCQhard

A Dataproc cluster uses preemptible worker nodes to reduce costs. The cluster runs a long-running Spark job that occasionally experiences worker failures. How should the job be configured to handle preemptible worker failures gracefully?

A.Set spark.task.maxFailures to a high number to allow retries.
B.Disable preemptible workers for the job.
C.Use persistent disks for preemptible workers.
D.Enable automatic restart of the Spark driver on failure.
AnswerA

Increasing maxFailures allows tasks to be retried on remaining workers.

Why this answer

Spark jobs should use checkpointing and handle task retries to survive preemption.

419
MCQmedium

Your company is building a real-time fraud detection system using Google Cloud. Transactions are streamed into Pub/Sub, and you need to process them with low latency (under 100ms per event) and aggregate data over sliding windows. Which Google Cloud service is best suited for this processing logic?

A.Dataflow
B.BigQuery streaming inserts with scheduled queries
C.Dataproc with Spark Streaming
D.Cloud Functions
AnswerA

Dataflow provides exactly-once, low-latency stream processing with native sliding window support.

Why this answer

Dataflow is the best choice because it provides a unified stream and batch processing model with native support for Pub/Sub, exactly-once semantics, and low-latency sliding window aggregations. Its autoscaling and millisecond-level checkpointing enable sub-100ms per event processing, which is critical for real-time fraud detection.

Exam trap

Google Cloud often tests the misconception that BigQuery streaming inserts can handle real-time per-event processing, but candidates overlook that scheduled queries add latency and BigQuery is not designed for stateful per-event aggregations with sliding windows.

How to eliminate wrong answers

Option B is wrong because BigQuery streaming inserts with scheduled queries cannot achieve sub-100ms latency per event; scheduled queries run on a periodic basis (e.g., every minute), introducing significant delay, and BigQuery is optimized for analytical queries, not per-event low-latency processing. Option C is wrong because Dataproc with Spark Streaming introduces higher startup and shuffle overhead, typically achieving latencies in the seconds range, and requires manual cluster management, making it unsuitable for consistent sub-100ms per event. Option D is wrong because Cloud Functions has a maximum timeout of 9 minutes and is designed for stateless, short-lived tasks; it lacks built-in support for stateful sliding window aggregations and cannot maintain per-key state across events without external services.

420
MCQhard

Your team manages a multi-model ensemble deployed on Vertex AI Endpoint. The ensemble consists of three models: a neural network (NN), a gradient boosted tree (GBT), and a logistic regression (LR). They are deployed as separate endpoints and traffic is split using a traffic split configuration. Recently, the overall accuracy dropped from 92% to 85%. Monitoring shows that the NN model's latency has increased significantly, causing it to miss timeouts and fall back to default predictions. The other two models are performing normally. The NN model is the most complex and handles the majority of the traffic. You need to restore accuracy quickly. What should you do first?

A.Increase the timeout for predictions on the NN endpoint to avoid fallback.
B.Enable fallback logic to use the GBT model when NN times out, ensuring no prediction is missed.
C.Temporarily reduce the traffic percentage to the NN model to 0% and redistribute to GBT and LR until the NN issue is resolved.
D.Relaunch the NN model with a larger machine type and more replicas to reduce latency.
AnswerC

This immediately stops the problematic model from serving and restores accuracy using the other models.

Why this answer

The immediate priority is to stop routing traffic to the failing NN model, which is causing timeouts and fallback to default predictions, thereby restoring accuracy quickly. By setting the NN endpoint's traffic percentage to 0% and redistributing to the healthy GBT and LR models, you eliminate the source of degraded predictions without requiring a redeployment or configuration change that could take time. This leverages Vertex AI's traffic split capability to isolate the faulty model while you diagnose and fix the latency issue.

Exam trap

The trap here is that candidates may think increasing timeout or adding fallback logic (options A or B) will fix the accuracy issue, but they fail to recognize that the NN is still receiving traffic and producing degraded predictions, whereas the correct first step is to stop routing traffic to the failing model entirely.

How to eliminate wrong answers

Option A is wrong because increasing the timeout on the NN endpoint does not address the root cause of high latency; it merely delays the fallback, and the model may still produce slow or incorrect predictions, continuing to degrade accuracy. Option B is wrong because enabling fallback logic to use GBT when NN times out still allows the NN to receive traffic and potentially time out, causing a delay and still relying on default predictions for the majority of traffic; it does not restore accuracy quickly. Option D is wrong because relaunching the NN model with a larger machine type and more replicas is a longer-term fix that requires redeployment and scaling, which takes time and does not immediately stop the ongoing accuracy drop.

421
Multi-Selectmedium

You are designing a Dataflow pipeline for processing real-time clickstream data. The pipeline must group events into 30-second windows and handle late data up to 5 minutes. You want to output partial results every 10 seconds for low-latency monitoring. Which THREE configurations should you use? (Choose three.)

Select 3 answers
A.Use sliding windows of 30 seconds with a 10-second period
B.Use a trigger that fires after the end of the window
C.Use fixed windows of 30 seconds
D.Set allowed lateness to 5 minutes
E.Use a trigger with early firings every 10 seconds
AnswersC, D, E

Fixed windows of 30 seconds correctly groups events into discrete 30-second intervals.

Why this answer

Fixed windows of 30 seconds create the required windowing. Allowed lateness of 5 minutes ensures late data within that timeframe is included in results. A trigger with early firings every 10 seconds produces the requested partial results for low-latency monitoring.

All three configurations are necessary to meet all requirements.

Exam trap

Candidates might focus only on windowing and lateness, forgetting that early firing triggers are essential for periodic partial results as specified.

422
MCQeasy

You want to monitor the latency of messages in a Pub/Sub subscription. Which Cloud Monitoring metric should you use to see the age of the oldest unacknowledged message?

A.pubsub.googleapis.com/subscription/oldest_unacked_message_age
B.pubsub.googleapis.com/subscription/num_undelivered_messages
C.pubsub.googleapis.com/topic/send_request_count
D.pubsub.googleapis.com/topic/publish_latency
AnswerA

This metric directly shows the age of the oldest unacknowledged message, indicating processing latency.

Why this answer

The metric 'subscription/oldest_unacked_message_age' measures the age (in seconds) of the oldest unacknowledged message in a subscription. This helps track processing lag. The other metrics measure different aspects: num_undelivered_messages is count, not age; topic metrics are irrelevant for subscription lag; publish_latency is about publishing, not consumption.

423
MCQmedium

What is the most likely cause of this error?

A.The JSONL file is missing some required fields.
B.The input images have a different number of channels than expected.
C.The instances are in JSON format instead of JSONL.
D.Each JSONL line contains a single image tensor without a batch dimension.
AnswerD

The model expects a batch dimension; each line should contain a batch of images.

Why this answer

The error occurs because each line in a JSONL file is expected to be a self-contained JSON object representing a single inference request. When the line contains a raw image tensor without a batch dimension, the model's serving framework (e.g., TensorFlow Serving or TorchServe) cannot perform batched inference, as it expects input tensors to have shape (batch_size, channels, height, width) or (batch_size, height, width, channels). The missing batch dimension causes a shape mismatch error during model execution.

Exam trap

Google Cloud often tests the distinction between data format errors (like JSON vs JSONL) and tensor shape errors, trapping candidates who confuse a missing batch dimension with a missing field or channel mismatch.

How to eliminate wrong answers

Option A is wrong because missing required fields would typically cause a parsing or validation error, not a tensor shape mismatch; the error described is specifically about the batch dimension, not missing fields. Option B is wrong because an incorrect number of channels would produce a channel mismatch error, not a missing batch dimension error; the model expects a specific channel count, but the error message would reference channel depth, not batch size. Option C is wrong because JSON format instead of JSONL would cause a file parsing error (e.g., expecting one JSON object per line but finding a JSON array), not a tensor shape error; the serving framework would fail to load the file entirely.

424
MCQmedium

You are building a data pipeline that runs daily batch jobs on Dataproc, then loads results into BigQuery. You want to orchestrate the entire workflow, including dependencies between steps, retries, and monitoring. Which Google Cloud service is most appropriate?

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

Cloud Composer (Airflow) is the right choice for complex workflows with dependencies, retries, and scheduling across Dataproc and BigQuery.

Why this answer

Cloud Composer is a managed Apache Airflow service that provides DAG-based orchestration with rich operators for Dataproc, BigQuery, and other GCP services. It handles dependencies, retries, and monitoring out of the box. Workflows is simpler and serverless but lacks the extensive operator library and scheduling flexibility of Airflow.

425
Multi-Selectmedium

A data engineer is building a feature store for ML models using Vertex AI Feature Store. The features are computed daily from BigQuery and need to be available for both online predictions (low latency) and offline training. Which two actions must the engineer take? (Choose TWO)

Select 2 answers
A.Deploy a custom TensorFlow model on Vertex AI
B.Use Cloud SQL to store feature metadata
C.Create a BigQuery table for offline serving
D.Create an entity type in the feature store
E.Enable online serving for the feature store
AnswersD, E

Entity types define the logical grouping of features.

Why this answer

Vertex AI Feature Store requires creating an entity type and a featurestore (which serves online and offline). Features are ingested via Dataflow or batch jobs.

426
Multi-Selecthard

A company is migrating an on-premises Hadoop cluster to Google Cloud. They need to run existing Spark jobs with minimal modification. Which THREE strategies should they consider? (Choose THREE.)

Select 3 answers
A.Migrate to BigQuery for all analytics.
B.Use Cloud Dataproc with Spark and Hive components.
C.Store data in Cloud Storage instead of HDFS.
D.Rewrite Spark jobs as Dataflow pipelines.
E.Use Dataproc Jobs API to submit jobs.
AnswersB, C, E

Compatible with existing code.

Why this answer

Cloud Dataproc is a managed Spark and Hadoop service that supports the same Spark and Hive components used on-premises, allowing existing Spark jobs to run with minimal modification. It provides native integration with Cloud Storage, which can replace HDFS without changing job logic, and the Dataproc Jobs API enables programmatic job submission, preserving existing workflows.

Exam trap

The trap here is that candidates may assume BigQuery or Dataflow are the only Google Cloud data processing options, overlooking that Dataproc is specifically designed for minimal-change migrations of existing Spark/Hadoop workloads.

427
Multi-Selecthard

A company building a real-time analytics pipeline with Pub/Sub and Dataflow. Which THREE best practices should they follow?

Select 3 answers
A.Use event time processing with watermarks and allowed lateness
B.Design idempotent sinks to handle duplicate outputs
C.Use exactly-once processing for all transforms
D.Use at-least-once delivery with deduplication in the pipeline
E.Use event time processing only for batch pipelines
AnswersA, B, D

Event time processing supports out-of-order data and ensures accurate windowing.

Why this answer

In streaming pipelines, event time processing with watermarks and allowed lateness is essential for handling out-of-order data. Watermarks track the progress of event time, and allowed lateness specifies how long to wait for late-arriving data before considering it as late, ensuring accurate windowed aggregations.

Exam trap

Google Cloud often tests the misconception that exactly-once processing must be applied uniformly across all pipeline transforms, when in practice it is only required at sinks and can be replaced by at-least-once with deduplication for better performance.

428
MCQeasy

A startup is building a real-time dashboard that shows aggregated metrics from social media feeds. They expect up to 10,000 events per second. The data must be near-real-time (< 30 seconds latency) and stored in BigQuery for historical analysis. They have limited experience managing infrastructure. The CTO suggests using Apache Kafka on Compute Engine for ingestion. However, the data engineer recommends a fully managed solution. Which approach should the team adopt?

A.Use Cloud Functions to ingest events directly into BigQuery
B.Use Apache Kafka on Compute Engine for ingestion, then use Dataflow to write to BigQuery
C.Use Cloud Pub/Sub for ingestion and Cloud Dataflow for streaming into BigQuery
D.Use App Engine to receive events and write to BigQuery
AnswerC

Fully managed, scales automatically, low operations overhead.

Why this answer

Cloud Pub/Sub provides a fully managed, scalable ingestion service that can handle 10,000+ events per second without infrastructure management, and Cloud Dataflow offers exactly-once, auto-scaling streaming into BigQuery with sub-30-second latency. This combination meets the near-real-time requirement while eliminating operational overhead, aligning with the data engineer's recommendation for a fully managed solution.

Exam trap

The trap here is that candidates may choose Option B (Kafka on Compute Engine) because Kafka is a common streaming tool, but the question emphasizes limited infrastructure experience and a fully managed solution, making the self-managed Kafka approach a distraction that ignores operational overhead.

How to eliminate wrong answers

Option A is wrong because Cloud Functions has a maximum invocation timeout of 9 minutes and is designed for event-driven, short-lived tasks, not sustained high-throughput ingestion of 10,000 events per second; it would also lack buffering and retry mechanisms for streaming into BigQuery. Option B is wrong because managing Apache Kafka on Compute Engine requires significant operational expertise for cluster setup, partitioning, and monitoring, contradicting the team's limited experience and the goal of a fully managed solution. Option D is wrong because App Engine is a web application platform, not a streaming ingestion service; it would introduce HTTP overhead and scaling bottlenecks for high-velocity event streams, and writing directly to BigQuery from App Engine would risk data loss without a buffer.

429
MCQeasy

Given the query plan, what is the most likely reason this query is efficient despite processing 10 billion rows?

A.The query uses a wildcard function.
B.The table is partitioned by sale_date.
C.The table is materialized.
D.The table is clustered by product_id.
AnswerB

Partition pruning removes irrelevant partitions, reducing scanned data from billions of rows to only those in the date range.

Why this answer

Partitioning by sale_date enables partition pruning, which allows the query engine to scan only the relevant partitions instead of the entire 10-billion-row table. This drastically reduces the amount of data read and processed, making the query efficient even with a large total row count.

Exam trap

Google Cloud often tests the distinction between partitioning (which reduces scanned rows via pruning) and clustering (which only improves sorting and compression within partitions), leading candidates to mistakenly choose clustering as the primary efficiency driver.

How to eliminate wrong answers

Option A is wrong because using a wildcard function (e.g., SELECT *) typically increases I/O and processing overhead by reading all columns, which would not improve efficiency. Option C is wrong because a materialized table is a precomputed snapshot that can speed up queries, but it does not inherently reduce the number of rows scanned; the efficiency gain here comes from partition pruning, not materialization. Option D is wrong because clustering by product_id organizes data within partitions for better compression and filter performance, but without partition pruning, the query would still need to scan all 10 billion rows, so clustering alone does not explain the efficiency.

430
MCQmedium

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

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

Access filters dynamically restrict data rows based on user attributes, providing row-level security.

Why this answer

Access filters in LookML allow dynamic filtering based on user attributes from the authentication system. Required access grants are for permissions, not dynamic filtering.

431
MCQmedium

Your Dataflow streaming pipeline is reading from Cloud Pub/Sub and writing to BigQuery. Users report occasional data duplication in the BigQuery table. You verify the pipeline uses exactly-once processing and idempotent writes. The Dataflow monitoring shows no errors, but the pipeline has occasional worker restarts. What is the most likely cause of the duplicates?

A.The pipeline is using a global window with an early trigger, causing late data to be reprocessed.
B.The Pub/Sub subscription is configured with at-least-once delivery, causing duplicate messages.
C.The BigQuery table has a time-based partitioning column that is not aligned with the event timestamp.
D.The pipeline does not set the insertId parameter in the BigQuery streaming output.
AnswerD

BigQuery streaming inserts use insertId for deduplication. Without it, retried inserts may create duplicate rows.

Why this answer

BigQuery's streaming API uses the `insertId` parameter to deduplicate records within the streaming buffer. Without a unique `insertId`, BigQuery cannot detect and discard duplicate inserts that may occur when Dataflow retries a write after a worker restart. Even with exactly-once processing in the pipeline, the BigQuery streaming endpoint itself is at-least-once, so the `insertId` is essential for deduplication.

Exam trap

Google Cloud often tests the misconception that exactly-once processing in the pipeline (Dataflow) automatically guarantees exactly-once delivery to the sink (BigQuery), ignoring that the sink itself may require explicit deduplication parameters like `insertId`.

How to eliminate wrong answers

Option A is wrong because a global window with an early trigger would cause multiple emissions per window, but the pipeline uses exactly-once processing and idempotent writes, so any late data would be handled without duplication. Option B is wrong because Pub/Sub subscriptions are inherently at-least-once, but Dataflow's exactly-once processing (via checkpointing and deduplication) handles this; the issue is downstream at BigQuery. Option C is wrong because time-based partitioning misalignment would cause data to land in the wrong partition, not duplicate rows; duplication is a separate concern related to insert identification.

432
MCQeasy

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

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

A view in LookML maps to a database table and defines dimensions and measures.

Why this answer

In LookML, a view defines the mapping to a database table (or derived table) and contains dimensions and measures.

433
MCQhard

A data engineer is building a production ML pipeline on Vertex AI. The pipeline must preprocess features (e.g., scaling, encoding) and then train a model. The preprocessing logic must be reusable for serving predictions. Which Vertex AI component should they use?

A.Vertex AI Feature Transform
B.Dataflow with Apache Beam
C.Vertex AI Feature Store
D.Vertex AI Pipelines
AnswerA

Feature Transform provides managed, reusable transformations that can be applied consistently in training and serving.

Why this answer

Vertex AI Feature Transform is a managed service that allows you to define transformations using TFX Transform or BigQuery SQL, which are then applied consistently during training and serving. Vertex AI Pipelines can orchestrate but does not itself provide reusable transformations. Dataflow would require custom code.

Vertex AI Feature Store serves pre-computed features, not transformations.

434
Multi-Selectmedium

A company wants to use Eventarc to trigger a Cloud Run service when new objects are created in a GCS bucket. They also need to filter events for a specific bucket and object prefix. Which THREE resources must exist or be created?

Select 3 answers
A.Cloud Storage bucket
B.Pub/Sub topic
C.Cloud Scheduler job
D.Eventarc trigger
E.Cloud Run service
AnswersA, D, E

The source of events.

Why this answer

Eventarc trigger, Cloud Run service, and the GCS bucket. The trigger references the bucket and prefix.

435
MCQeasy

A company needs a messaging service for event-driven applications that require low cost for high-throughput, but can tolerate occasional message loss. Which Pub/Sub product should they choose?

A.Pub/Sub with pull subscriptions
B.Pub/Sub with dead letter topics
C.Pub/Sub with push subscriptions
D.Pub/Sub Lite
AnswerD

Pub/Sub Lite offers lower cost with reduced durability guarantees, acceptable for tolerant workloads.

Why this answer

Pub/Sub Lite is designed for cost-sensitive workloads with relaxed durability. Standard Pub/Sub offers at-least-once delivery and high durability. Push vs pull is irrelevant to cost.

436
MCQmedium

Your organization has a BigQuery flat-rate reservation with 2000 slots. During peak hours, query performance degrades because concurrent queries exceed the available slots. You want to handle these bursts without changing the base reservation. What should you do?

A.Enable autoscaling on the reservation to automatically add slots up to a maximum.
B.Purchase committed use discounts to increase the base reservation to 3000 slots.
C.Change the pricing model to on-demand to allow unlimited slots.
D.Purchase flex slots during peak hours to add capacity temporarily.
AnswerD

Flex slots are short-term, pay-as-you-go slots that can be added to a reservation for burst capacity, then released.

Why this answer

Flex slots allow you to temporarily add capacity to a BigQuery flat-rate reservation without committing to a permanent increase. This handles burst workloads during peak hours by adding slots on demand, and you only pay for the time they are used. The base reservation of 2000 slots remains unchanged, meeting the requirement.

Exam trap

Google PDE often tests the distinction between permanent capacity changes (committed use discounts) and temporary capacity additions (flex slots), trapping candidates who confuse autoscaling (which modifies the reservation's behavior) with the requirement to keep the base reservation unchanged.

How to eliminate wrong answers

Option A is wrong because autoscaling automatically adds slots up to a maximum, but it changes the base reservation by enabling a dynamic scaling mechanism that can incur costs even when not needed, and it does not preserve the original 2000-slot base reservation as a fixed baseline. Option B is wrong because purchasing committed use discounts increases the base reservation permanently to 3000 slots, which contradicts the requirement to not change the base reservation. Option C is wrong because switching to on-demand pricing removes the reservation entirely and uses unlimited slots, but it changes the pricing model and does not preserve the flat-rate reservation structure.

437
Multi-Selecthard

An MLOps team manages a pipeline that retrains an XGBoost classifier weekly using BigQuery data. The pipeline is orchestrated with Cloud Composer and deploys the new model to Vertex AI Endpoint if validation metrics (AUC > 0.9) are met. Over the past month, the deployed model's AUC has dropped from 0.95 to 0.88, despite the training pipeline consistently reporting AUC > 0.9. Which THREE steps should the team take to diagnose and fix this issue?

Select 3 answers
A.Review the training pipeline's hyperparameter tuning configuration to ensure it is not overfitting to stale data.
B.Add a canary deployment step where new model version receives a small percentage of traffic before full rollout.
C.Compare feature distributions between the training data and online serving data using Vertex AI Model Monitoring.
D.Retrain the model using a longer training history to include older data that may still be relevant.
E.Implement model validation on the deployed endpoint by logging predictions and comparing against actuals for a sample of traffic using Vertex Explainable AI.
AnswersB, C, E

Canary testing can catch performance issues early before the model is fully deployed.

Why this answer

A canary deployment allows the team to gradually roll out the new model to a small percentage of traffic, enabling early detection of performance degradation in production before a full rollout. This step directly addresses the discrepancy between training metrics and live performance by exposing the model to real-world data patterns that may differ from the training set. In Cloud Composer and Vertex AI, canary deployments can be implemented by routing a fraction of requests to the new model version and monitoring its AUC in real time.

Exam trap

A common mistake is assuming that retraining with more historical data (Option D) or tuning hyperparameters (Option A) will solve the performance drop. However, the real issue is often data drift or a mismatch between training and serving environments. In Google Cloud, the correct approach is to use Vertex AI Model Monitoring to compare feature distributions, implement a canary deployment with Cloud Composer to test new models against live traffic, and validate predictions using Vertex Explainable AI to log and compare against actual outcomes.

438
Multi-Selectmedium

You are designing a streaming Dataflow pipeline that processes high-throughput data. Which two features can help minimize cost? (Choose TWO.)

Select 2 answers
A.Enable autoscaling based on CPU utilization
B.Use batch loads to BigQuery for streaming inserts
C.Enable Streaming Engine to decouple compute and storage
D.Use preemptible VMs for all workers
E.Use a global window and batch output to BigQuery every hour
AnswersA, C

Autoscaling adjusts the number of workers to meet demand, avoiding over-provisioning and reducing cost.

Why this answer

Enabling autoscaling based on CPU utilization allows the Dataflow pipeline to dynamically adjust the number of worker instances in response to the actual processing load. This prevents over-provisioning during low-throughput periods, directly reducing compute cost while maintaining performance during spikes.

Exam trap

Google Cloud often tests the misconception that preemptible VMs are always cost-effective for streaming workloads, but the trap here is that preemptible VMs are unsuitable for stateful streaming pipelines due to frequent preemption causing data reprocessing and instability.

439
Multi-Selectmedium

A company uses BigQuery partitioned tables with daily partitions for log data. They want to automatically delete partitions older than 90 days and ensure that current month data is in a specific dataset with a set expiration. Which TWO actions should they take? (Choose 2)

Select 2 answers
A.Set partition expiration to 90 days on the table
B.Cluster the table on a timestamp column
C.Create the table as a partitioned table by ingestion time
D.Set the table's default partition expiration to 90 days
E.Set a lifecycle management rule on Cloud Storage to delete objects older than 90 days
AnswersA, C

Correct. Setting partition expiration to 90 days on the table will automatically delete partitions older than that.

Why this answer

To automatically delete partitions older than 90 days, the table must be partitioned (option C creates a partitioned table by ingestion time) and have partition expiration set to 90 days (option A). Option D also sets partition expiration, but it's functionally identical to A. Since the question asks for two distinct actions, the correct choices are A and C, which together achieve the goal.

440
MCQeasy

An application needs to store user profile data in a document database with flexible schema. The data is accessed frequently from a mobile app. Which Google Cloud database is BEST suited?

A.Cloud Bigtable
B.BigQuery
C.Cloud Spanner
D.Cloud Firestore
AnswerD

Firestore stores JSON documents, ideal for flexible schema mobile apps.

Why this answer

Cloud Firestore is a NoSQL document database designed for mobile and web app development, offering flexible schema, real-time data synchronization, and automatic scaling. It directly supports frequent reads from mobile apps through its client SDKs and offline persistence, making it the best fit for storing user profile data with varying attributes.

Exam trap

The trap here is that candidates often confuse Cloud Firestore with Cloud Bigtable because both are NoSQL, but Bigtable lacks document flexibility, real-time sync, and mobile SDK support, which are essential for the described use case.

How to eliminate wrong answers

Option A is wrong because Cloud Bigtable is a wide-column NoSQL database optimized for high-throughput analytical and operational workloads (e.g., time-series, IoT), not for flexible document storage or mobile app real-time access. Option B is wrong because BigQuery is a serverless data warehouse for running SQL-based analytics on large datasets, not a transactional database for user profile reads/writes. Option C is wrong because Cloud Spanner is a globally distributed relational database with strong consistency and SQL support, but its rigid schema and higher latency for simple document operations make it overkill and less suitable for flexible schema mobile app data.

441
MCQhard

A data analyst frequently queries a BigQuery table that contains an array of structs representing product purchases. The query below runs slowly: SELECT customer_id, COUNT(purchase) as total_purchases FROM sales, UNNEST(purchases) as purchase GROUP BY customer_id What change would most improve query performance?

A.Create a materialized view that pre-aggregates by customer_id and purchase count
B.Partition the table by transaction date
C.Use a subquery to filter purchases first
D.Cluster the table by purchases.product_id
AnswerA

A materialized view pre-computes the aggregation, so queries read the view instead of scanning the full table.

Why this answer

The query runs slowly because it must unnest the `purchases` array for every row and then aggregate. A materialized view pre-aggregates the data by `customer_id` and purchase count, avoiding repeated full scans and unnesting. This is the most impactful optimization because it eliminates the compute cost of UNNEST and GROUP BY at query time.

Exam trap

Google Cloud often tests the misconception that any indexing or partitioning strategy (like clustering or partitioning) universally speeds up all queries, when in fact the fix must target the specific expensive operation — here, the UNNEST and GROUP BY — rather than adding a generic optimization.

How to eliminate wrong answers

Option B is wrong because partitioning by transaction date does not help this query — there is no WHERE clause filtering by date, so all partitions would still be scanned. Option C is wrong because a subquery to filter purchases first does not reduce the amount of data that must be unnested or aggregated; it adds a nested scan without addressing the core performance bottleneck. Option D is wrong because clustering by purchases.product_id would only improve queries that filter or group by that field, but this query groups by customer_id, not product_id.

442
MCQeasy

You are deploying a machine learning model to production using Vertex AI. The model requires GPU acceleration for low-latency predictions. You need to minimize costs while ensuring availability during a defined business hours window (8 AM to 6 PM). Which deployment strategy should you use?

A.Deploy to an endpoint with manual scaling, set min nodes to zero and max nodes to 10, and use a cron job to adjust during business hours.
B.Use a custom prediction routine (CPR) that dynamically requests GPUs from the cluster.
C.Deploy to a dedicated endpoint with a GPU machine and configure autoscaling.
D.Use Cloud Functions to invoke the model, and let Google Cloud manage the underlying GPU infrastructure.
AnswerA

Manual scaling allows setting min to zero, stopping all nodes outside hours, and auto-scheduling via cron or Cloud Scheduler to scale up before 8 AM and down after 6 PM, minimizing cost.

Why this answer

It uses manual scaling with a cron job to set min nodes to zero outside business hours (8 AM–6 PM) and scale up to a maximum of 10 nodes during business hours, ensuring GPU availability when needed while minimizing costs by running zero instances when the model is not required. This approach directly addresses the requirement for low-latency GPU predictions during a defined window without paying for idle GPU resources outside that window.

Exam trap

Google Cloud often tests the misconception that autoscaling alone is sufficient for cost optimization, but the trap here is that autoscaling with a GPU machine typically requires a minimum of one replica, which still incurs 24/7 GPU costs, whereas manual scaling with a cron job to set min nodes to zero is the only way to completely eliminate GPU costs outside the defined business hours.

How to eliminate wrong answers

Option B is wrong because a custom prediction routine (CPR) is a way to package custom logic for serving predictions, not a deployment strategy for managing GPU scaling or scheduling; it does not inherently control when GPUs are requested or released based on a business hours window. Option C is wrong because deploying to a dedicated endpoint with a GPU machine and autoscaling will keep at least one instance running continuously (autoscaling typically has a minimum of 1 node), incurring costs 24/7 even when the model is not needed outside business hours. Option D is wrong because Cloud Functions does not support GPU acceleration; it is a serverless compute platform for lightweight, stateless functions and cannot attach GPUs for model inference.

443
MCQmedium

A data team uses Cloud Dataproc to run nightly Spark jobs. The job volume has increased, and the cluster is often underutilized during the day. They want to reduce costs while ensuring jobs can scale when needed. Which strategy should they adopt?

A.Use preemptible workers for both primary and secondary nodes to minimize cost.
B.Manually scale the cluster up before nightly jobs and down after.
C.Use a cluster with a small number of primary workers and a large pool of preemptible workers, and enable autoscaling.
D.Use custom machine types with local SSDs for primary workers to improve I/O.
AnswerC

Preemptible workers are cheap, and autoscaling adjusts to load.

Why this answer

It combines a small number of primary (non-preemptible) workers for reliability with a large pool of preemptible workers for cost-effective scaling, and enables autoscaling to dynamically adjust the cluster size based on workload. This minimizes cost during idle periods (preemptible instances are ~80% cheaper) while ensuring jobs can scale up quickly when needed, as autoscaling adds preemptible workers automatically. Preemptible workers are ideal for fault-tolerant Spark jobs that can handle node preemptions.

Exam trap

Google Cloud often tests the misconception that preemptible instances can be used for all nodes, but the trap here is that primary nodes require non-preemptible instances for cluster stability, while preemptible workers are only suitable for secondary (task) nodes in a fault-tolerant framework.

How to eliminate wrong answers

Option A is wrong because using preemptible workers for primary nodes is not allowed in Cloud Dataproc—primary nodes must be non-preemptible to ensure cluster stability and avoid data loss from coordinator failures. Option B is wrong because manual scaling is inefficient and error-prone for a nightly job pattern; it requires human intervention and cannot react to sudden workload spikes, leading to either underutilization or job delays. Option D is wrong because custom machine types with local SSDs improve I/O performance but do not address cost reduction or scaling needs; they increase cost without solving underutilization during the day.

444
Multi-Selecthard

A company trains a model using Cloud TPUs. The model is deployed to AI Platform Prediction using a custom container with TensorFlow. Which THREE considerations are most important when serving this model?

Select 3 answers
A.The model should be retrained using GPU to ensure identical performance on serving hardware.
B.The serving container must have the same TensorFlow version that was used during training to avoid compatibility issues.
C.The model should be quantized to reduce memory footprint before deployment.
D.The serving infrastructure must use GPU or CPU, as AI Platform Prediction does not support TPU serving.
E.The model must be exported as a TensorFlow SavedModel and packaged in a custom container with proper dependencies.
AnswersB, D, E

Version mismatch can cause errors or different behavior.

Why this answer

TensorFlow models are tightly coupled to the specific version of TensorFlow used during training. Serving with a different version can lead to incompatibilities in graph serialization, op definitions, or checkpoint formats, causing runtime errors or silent prediction failures. AI Platform Prediction's custom container must therefore match the training environment's TensorFlow version to ensure the model loads and executes correctly.

Exam trap

Google Cloud often tests the misconception that hardware must match between training and serving, but the real requirement is software version compatibility, not hardware identity.

445
MCQeasy

Which Google Cloud service is designed to replicate data from MySQL, PostgreSQL, and Oracle databases to BigQuery or Cloud Storage in near real-time?

A.Cloud Data Fusion
B.Datastream
C.Dataflow
D.Pub/Sub
AnswerB

Why this answer

Datastream is a serverless CDC service that ingests change data from relational databases into GCS or BigQuery.

446
MCQmedium

A mobile app uses Firestore to store user profiles. The app allows offline data creation and syncing when connectivity resumes. Which Firestore feature should the developer enable?

A.Set up a Firestore trigger to cache data in Cloud Memorystore
B.Enable offline persistence in the Firestore client SDK
C.Use Cloud Storage signed URLs for offline access
D.Enable Firestore multi-region replication
AnswerB

Offline persistence allows local reads/writes and later syncs.

Why this answer

Firestore's offline persistence feature allows the client SDK to automatically cache data locally on the device. When the app creates or modifies data while offline, the SDK stores the changes in a local queue and syncs them with the Firestore backend once connectivity is restored. This is the correct and built-in mechanism for offline data creation and syncing.

Exam trap

Candidates often confuse Firestore's client-side offline persistence with server-side replication or caching features like multi-region replication or Cloud Memorystore, which are not designed for client-side offline data creation and syncing.

How to eliminate wrong answers

Option A is wrong because Cloud Memorystore is a managed Redis or Memcached service for caching in server-side applications, not a client-side offline cache; Firestore triggers are server-side functions that cannot cache data in Memorystore for offline client access. Option C is wrong because Cloud Storage signed URLs provide temporary, authenticated access to objects in Cloud Storage, not to Firestore documents, and they are used for online access, not offline data creation and syncing. Option D is wrong because multi-region replication improves availability and durability for Firestore databases but does not enable client-side offline caching or queuing of writes.

447
Multi-Selecteasy

You need to implement data quality rules on a Dataplex lake to ensure that critical columns are not null and meet certain constraints. Which two Dataplex features can you use? (Choose TWO)

Select 2 answers
A.Tag Templates
B.Auto Data Quality
C.Data Catalog
D.Data Quality Tasks
E.Data Scan
AnswersB, D

Auto Data Quality automatically profiles data and suggests quality rules.

Why this answer

Dataplex Data Quality Tasks allow you to define and run data quality checks. Dataplex Auto Data Quality automates profiling and monitoring. The other options are not specific to quality: Catalog is for discovery, Scans for security, and Tag Templates for metadata.

448
Multi-Selectmedium

A company wants to use Dataproc Metastore to manage metadata for their Spark jobs. Which TWO benefits does Dataproc Metastore provide?

Select 2 answers
A.Automatic scaling of compute resources
B.High availability with automatic failover
C.Fully managed Hive metastore service
D.Integration with BigQuery
E.Built-in data lineage tracking
AnswersB, C

Yes, it provides HA.

Why this answer

Dataproc Metastore offers a managed Hive metastore with high availability and compatibility.

449
MCQeasy

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

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

BigQuery has a built-in lineage API that tracks table dependencies.

Why this answer

BigQuery lineage API and Dataplex lineage both provide data lineage tracking. BigQuery lineage is built-in, while Dataplex extends it across the data lake.

450
Multi-Selecthard

A multinational corporation needs a globally distributed database that supports strong consistency, SQL queries, and automatic failover across regions. They also want to optimize join performance for parent-child relationships. Which TWO features of Cloud Spanner should they use?

Select 2 answers
A.Strong consistency and automatic failover across regions
B.Secondary indexes
C.Bigtable as a caching layer
D.Read replicas for global distribution
E.Interleaved tables
AnswersA, E

Spanner's core features: globally consistent and automatic failover.

Why this answer

Cloud Spanner provides strong consistency and automatic failover across regions as core features. Strong consistency ensures that all reads return the most recent write, which is critical for globally distributed databases that require ACID transactions. Automatic failover across regions is built into Spanner's architecture using synchronous replication and Paxos-based consensus, enabling high availability without manual intervention.

Exam trap

Google often tests the distinction between secondary indexes and interleaved tables, where candidates mistakenly believe secondary indexes optimize parent-child joins, but interleaved tables are the correct feature for physical co-location and join performance.

Page 5

Page 6 of 12

Page 7