Google Professional Cloud Developer (PCD) — Questions 901975

980 questions total · 14pages · All types, answers revealed

Page 12

Page 13 of 14

Page 14
901
MCQhard

Your company runs a multi-tier web application on Google Kubernetes Engine (GKE). The application consists of a frontend service, a backend API service, and a PostgreSQL database managed by Cloud SQL. Recently, users have been reporting intermittent slow response times during peak hours (10 AM - 12 PM). You have set up Cloud Monitoring dashboards and alerts. Cloud Trace shows that the backend API service has high latency, but only for certain requests. You notice that the backend service's CPU utilization is around 60% during peak hours, and memory usage is normal. The Cloud SQL instance's CPU utilization is at 90% and the query latency is high. You have also observed that the backend service makes multiple database queries per request, some of which are repeated. What is the most effective course of action to reduce latency?

A.Increase the CPU and memory of the Cloud SQL instance to handle the load
B.Scale up the backend API service by increasing the number of replicas
C.Scale up the frontend service by increasing the number of replicas
D.Implement a caching layer using Memorystore for Redis to cache database query results
AnswerA

The database is at 90% CPU, so increasing its resources directly reduces query latency.

Why this answer

The primary bottleneck is the Cloud SQL instance, which is running at 90% CPU with high query latency. Since the backend service's CPU is only at 60% and memory is normal, scaling the database directly addresses the root cause. Increasing the Cloud SQL instance's CPU and memory provides more processing power and connection capacity to handle the peak load, reducing query latency and overall response times.

Exam trap

Google Cloud often tests the misconception that scaling application replicas (horizontal scaling) always improves performance, but here the bottleneck is the database, not the application, so vertical scaling of the database is required.

How to eliminate wrong answers

Option B is wrong because scaling the backend API service replicas would increase the number of concurrent database connections, further stressing the already overloaded Cloud SQL instance and potentially worsening latency. Option C is wrong because the frontend service is not the bottleneck; Cloud Trace indicates high latency originates from the backend API and database, not the frontend. Option D is wrong because while caching can reduce repeated queries, the database CPU is at 90% and query latency is high for all requests, not just repeated ones; caching would not alleviate the underlying CPU saturation on the Cloud SQL instance.

902
MCQhard

You are using Cloud Bigtable to store time-series financial market data. To ensure high availability across zones, you configure cluster replication. What is the recommended replication topology for automatic failover?

A.Two clusters in the same zone
B.Single cluster with multi-node configuration
C.Two clusters in different zones with replication enabled and multi-cluster routing
D.Three clusters in three regions
AnswerC

This setup allows automatic failover if one cluster becomes unavailable.

Why this answer

Bigtable supports replication across clusters in different zones within a region (or across regions). For automatic failover, you should use primary-secondary (also called single-cluster routing with failover) or multi-cluster routing. The recommended HA setup is to have two clusters in different zones with replication enabled.

903
MCQhard

A security engineer applied the IAM policy above to a Cloud Storage bucket. The service account "my-sa" is used by an application that needs to read and write files to the bucket. The application reports that it cannot write files. What is the issue?

A.The policy is missing the "roles/storage.objectAdmin" role.
B.The "roles/storage.objectCreator" role only allows creating new objects, but not overwriting existing ones.
C.The service account lacks permission to list bucket contents.
D.The policy has duplicate bindings that cause a conflict.
AnswerB

objectCreator allows creating new objects but not modifying or overwriting existing objects. To overwrite, the service account needs objectAdmin or objectOwner.

Why this answer

The 'roles/storage.objectCreator' role grants permission to create new objects in a Cloud Storage bucket, but it does not allow overwriting existing objects. To overwrite objects, the 'roles/storage.objectAdmin' or 'roles/storage.legacyObjectOwner' role is required, which includes the storage.objects.update permission. Since the application needs to both read and write (including overwrite) files, the objectCreator role is insufficient.

Exam trap

The PCD exam often tests the distinction between create and update permissions in Cloud Storage IAM roles, trapping candidates who assume that 'write' access includes overwriting existing objects.

How to eliminate wrong answers

Option A is wrong because 'roles/storage.objectAdmin' is not missing; the issue is that the current role (objectCreator) lacks the update permission, not that a different role is absent. Option C is wrong because listing bucket contents (storage.objects.list) is not required for writing files; the application's inability to write is due to missing update permission, not list permission. Option D is wrong because duplicate bindings in an IAM policy do not cause conflicts; IAM policies are additive and duplicates are simply ignored, so they would not prevent write operations.

904
Multi-Selectmedium

A company is migrating an on-premises Oracle database to Cloud SQL for PostgreSQL using Database Migration Service. They need to convert stored procedures and ensure data type compatibility. Which TWO tools or steps are essential?

Select 2 answers
A.Use Cloud SQL Auth Proxy for source connectivity.
B.Use Database Migration Service for data migration.
C.Use Ora2Pg to convert PL/SQL to PL/pgSQL.
D.Use pg_dump to export the Oracle database.
E.Manually rewrite all triggers using MySQL syntax.
AnswersB, C

DMS performs the actual data migration with options for continuous replication.

Why this answer

Ora2Pg is the standard tool for Oracle to PostgreSQL schema conversion, including stored procedures. DMS handles the data migration with CDC for minimal downtime.

905
MCQeasy

A company uses Cloud SQL for MySQL to store customer data. They have enabled automatic backups and a read replica for reporting. The application experiences timeouts during peak hours because the primary instance cannot handle the write load. The team needs to improve write performance without losing the ability to read from replicas. What should they do?

A.Increase the size of the read replica to handle writes.
B.Promote the read replica to a standalone instance and redirect writes.
C.Increase the number of vCPUs on the primary instance.
D.Use Cloud Spanner instead of Cloud SQL for better write scalability.
AnswerC

Scaling up the primary instance improves write throughput.

Why this answer

Option C is correct because increasing the number of vCPUs on the primary Cloud SQL for MySQL instance directly improves its processing capacity to handle higher write throughput. This addresses the root cause of timeouts during peak hours without disrupting the existing read replica architecture, which continues to serve reporting queries. Cloud SQL allows vertical scaling of the primary instance by adjusting machine type, and this change does not affect the ability to read from replicas.

Exam trap

The trap here is that candidates may assume read replicas can be used to offload writes (Option A) or that promoting a replica is a valid scaling strategy (Option B), but Cloud SQL read replicas are strictly read-only and cannot accept write traffic, making these options invalid for improving write performance.

How to eliminate wrong answers

Option A is wrong because read replicas in Cloud SQL for MySQL are read-only and cannot accept write traffic; increasing their size does not improve write performance on the primary instance. Option B is wrong because promoting the read replica to a standalone instance and redirecting writes would eliminate the read replica's ability to serve reporting queries, breaking the requirement to retain read capability from replicas. Option D is wrong because migrating to Cloud Spanner is an unnecessary and complex architectural change; the problem can be solved by vertically scaling the existing Cloud SQL primary instance, which is a simpler and more cost-effective solution.

906
MCQmedium

A company uses Cloud SQL MySQL for transactional workloads, BigQuery for analytics, and wants to stream real-time changes from Cloud SQL to BigQuery with minimal latency and no custom code. Which approach is most appropriate?

A.Set up a Cloud Function that queries Cloud SQL periodically and loads results into BigQuery via the streaming API.
B.Configure Cloud Scheduler to run an export of the Cloud SQL database every minute and load into BigQuery.
C.Create a Dataflow pipeline with a Pub/Sub topic and a change data capture connector for Cloud SQL.
D.Use Datastream to capture CDC events from Cloud SQL MySQL and replicate them directly to BigQuery.
AnswerD

Datastream is serverless and purpose-built for CDC replication to BigQuery, meeting the requirements.

Why this answer

Datastream is purpose-built for minimal-latency, serverless change data capture (CDC) from sources like Cloud SQL MySQL to BigQuery. It uses log-based replication (reading the MySQL binary log) to stream row-level changes directly into BigQuery without requiring custom code or intermediate processing. This approach meets the requirements of real-time streaming with no custom code and minimal latency.

Exam trap

Cisco often tests the distinction between batch-oriented tools (Cloud Scheduler, Cloud Functions with polling) and true streaming CDC services (Datastream), trapping candidates who think periodic polling or custom pipelines satisfy 'minimal latency and no custom code'.

How to eliminate wrong answers

Option A is wrong because a Cloud Function that periodically queries Cloud SQL introduces polling latency (at least the interval between queries) and cannot capture real-time changes; it also requires custom code to implement the query and streaming logic. Option B is wrong because Cloud Scheduler running an export every minute introduces at least 60 seconds of latency and is a batch, not streaming, approach; it also requires manual loading into BigQuery and cannot capture individual row-level changes in real time. Option C is wrong because while a Dataflow pipeline with Pub/Sub and a CDC connector can stream changes, it requires custom code to set up the connector and manage the pipeline, violating the 'no custom code' requirement; Datastream is the serverless alternative that eliminates this overhead.

907
MCQeasy

A developer needs to connect a Cloud SQL MySQL instance from an application running on Compute Engine without whitelisting IP addresses. Which method should they use?

A.Connect via Cloud Shell using the mysql client.
B.Configure the application to use Cloud SQL Auth Proxy.
C.Set up a Cloud SQL private IP connection.
D.Use SSL/TLS connection with the public IP address.
AnswerB

Auth Proxy uses IAM for authentication and encrypts connections without IP allowlisting.

Why this answer

Cloud SQL Auth Proxy provides secure access using IAM permissions, avoiding the need to whitelist IP addresses. SSL without proxy still requires IP allowlisting. Private IP requires VPC peering and is not automatically connected.

Cloud Shell is not for application connectivity.

908
MCQhard

A company uses Memorystore for Redis as a session store. They observe that sessions are evicted before their TTL expires, causing users to be logged out prematurely. Which action should they take?

A.Enable persistence (RDB/AOF)
B.Increase the memory size of the instance
C.Change the eviction policy to volatile-ttl
D.Increase the maxmemory-policy to allkeys-lru
AnswerB

More memory prevents eviction of active sessions.

Why this answer

Memorystore evicts keys when memory is full. Increasing memory size allows more keys to be stored without eviction. Changing eviction policy to 'allkeys-lru' might help but could still evict sessions.

Increasing memory is the direct solution.

909
MCQeasy

A developer needs to connect a Cloud Run application to a Cloud SQL for MySQL database securely without managing IP allowlists or SSL certificates. Which method should they use?

A.Create a Compute Engine instance with a VPN to Cloud SQL and connect from Cloud Run via VPC peering.
B.Use the public IP of the Cloud SQL instance and add the Cloud Run service's IP range to the authorized networks.
C.Enable the 'require_ssl' flag and distribute the server certificate to the Cloud Run service.
D.Deploy the Cloud SQL Auth Proxy as a sidecar container in Cloud Run.
AnswerD

The Cloud SQL Auth Proxy runs as a sidecar and provides secure, IAM-authenticated connections without IP allowlisting or SSL config.

Why this answer

The Cloud SQL Auth Proxy provides secure authentication and encryption without requiring authorized networks or SSL certificate management. It uses IAM for authentication and encrypts connections.

910
Multi-Selecteasy

A company is designing a web application that must scale horizontally to handle variable traffic. Which two practices should they implement to ensure the application is stateless and can scale without issues?

Select 2 answers
A.Persist session data in Cloud SQL to ensure durability.
B.Offload session state to the user's browser using encrypted cookies.
C.Deploy the application across multiple regional managed instance groups.
D.Store session state in an external cache such as Memorystore.
E.Use sticky sessions to maintain client affinity.
AnswersB, D

Storing session data on the client side through cookies eliminates server-side state, making the application fully stateless.

Why this answer

To achieve statelessness, session state should either be stored in an external cache (e.g., Memorystore) or offloaded to the client (e.g., using cookies). Sticky sessions tie a client to a specific instance, preventing scaling. Using a database like Cloud SQL for session persistence creates a bottleneck.

Regional managed instance groups improve availability but do not directly address statelessness.

911
MCQmedium

An organization is migrating from Oracle to Cloud SQL for PostgreSQL using Ora2Pg. After conversion, several stored procedures fail to compile. Which step should they take to identify and fix the issues?

A.Manually rewrite all procedures from PL/SQL to PL/pgSQL.
B.Use Database Migration Service continuous migration to replicate the procedures.
C.Convert the Oracle database to PostgreSQL using pgloader instead.
D.Re-run Ora2Pg with the --debug flag to get detailed error output.
AnswerD

The debug flag provides detailed logs to pinpoint conversion errors.

Why this answer

Ora2Pg provides a log file with conversion details and error messages. Reviewing this log helps identify syntax differences and unsupported features that need manual adjustment.

912
MCQmedium

A company is migrating from MySQL 5.7 to Cloud SQL for MySQL 8.0. They have stored procedures that use GROUP BY with non-aggregated columns. In MySQL 5.7, this is allowed. What change might they need to make?

A.Switch to Cloud Spanner
B.Downgrade to MySQL 5.7 on Cloud SQL
C.Use ANY_VALUE() for non-aggregated columns in SELECT
D.No changes needed; MySQL 8.0 is backward compatible
AnswerC

ANY_VALUE() is a MySQL 8.0 function that suppresses the ONLY_FULL_GROUP_BY error.

Why this answer

MySQL 8.0 enables strict SQL mode by default and the ONLY_FULL_GROUP_BY mode, which disallows SELECTing non-aggregated columns not in GROUP BY. The procedures must be updated to comply or SQL mode changed.

913
MCQmedium

A company needs to store petabytes of time-series IoT sensor data and query it with single-digit millisecond latency at millions of reads per second. The data has a simple key-value structure with timestamps. Which Google Cloud database is MOST appropriate?

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

Bigtable is the correct choice: wide-column NoSQL, designed for time-series and IoT workloads, single-digit ms latency, and scales to millions of QPS with additional nodes.

Why this answer

Cloud Bigtable is designed for exactly this use case — petabyte-scale, low-latency (single-digit ms), high-throughput NoSQL storage for time-series, IoT, and financial data. It scales horizontally by adding nodes. BigQuery is optimised for analytics (seconds-to-minutes latency), Cloud SQL is for OLTP (limited to tens of thousands of QPS), and Firestore is for document data with hierarchical structure.

914
MCQmedium

A company uses Cloud Monitoring to create an uptime check for their external HTTP endpoint. The check fails periodically even though the service is healthy. What is the most likely cause?

A.The service is down during those periods
B.The SSL certificate is expired
C.The firewall is blocking the uptime check IP ranges
D.The endpoint has high latency
AnswerC

Uptime checks come from specific Google IP ranges that must be allowed.

Why this answer

The most likely cause is that the firewall is blocking the uptime check IP ranges. Cloud Monitoring uses specific source IP ranges for its uptime checks, and if these are not explicitly allowed through the firewall, the checks will fail even though the service itself is healthy. This is a common configuration issue where the firewall rules are not updated to include the monitoring system's probe IPs.

Exam trap

The trap here is that candidates often assume an expired SSL certificate is the cause, but the periodic nature of the failure points to a network filtering issue rather than a consistent certificate problem.

How to eliminate wrong answers

Option A is wrong because the question explicitly states the service is healthy, so the failure is not due to the service being down. Option B is wrong because an expired SSL certificate would cause a TLS handshake failure, which would be a consistent error, not a periodic one, and the check would likely report a certificate error rather than a simple failure. Option D is wrong because high latency would cause the check to be slow or timeout, but it would not cause a periodic failure; the check would still succeed if the endpoint responds within the timeout period.

915
MCQeasy

A startup has deployed a Python web application on Compute Engine. They have installed the Cloud Monitoring agent and can see basic system metrics like CPU and disk usage. However, they want to track custom application metrics, such as number of active users and request latency, to monitor performance. They have added OpenCensus code to export metrics but notice that custom metrics are not appearing in Cloud Monitoring. The application runs under a custom service account with the 'Monitoring Metric Writer' role assigned. What is the most likely cause?

A.The OpenCensus exporter is not configured to send to the Cloud Monitoring endpoint.
B.The Cloud Monitoring agent needs to be restarted after adding OpenCensus.
C.The service account has not been granted the 'Monitoring Viewer' role.
D.The application is not exporting metrics to the correct Cloud Monitoring project.
AnswerA

Without correct exporter configuration, metrics are not sent to Cloud Monitoring, even with the correct service account.

Why this answer

Option A is correct because OpenCensus requires explicit configuration to export metrics to a specific backend. Even though the service account has the 'Monitoring Metric Writer' role, the OpenCensus exporter must be configured with the correct Cloud Monitoring endpoint (e.g., 'monitoring.googleapis.com') and project ID. Without this configuration, the metrics are collected by OpenCensus but never sent to Cloud Monitoring.

Exam trap

The PCD exam often tests the misconception that assigning IAM roles alone is sufficient for custom metric export, when in fact the application code must explicitly configure the exporter to send data to the correct endpoint.

How to eliminate wrong answers

Option B is wrong because the Cloud Monitoring agent is not involved in custom metric collection via OpenCensus; OpenCensus exports directly to the Cloud Monitoring API via gRPC, independent of the agent. Option C is wrong because the 'Monitoring Viewer' role is only needed to read/view metrics in the Cloud Monitoring console, not to write custom metrics; the 'Monitoring Metric Writer' role is sufficient for exporting. Option D is wrong because the question states the application runs under a custom service account with the correct role, and there is no indication the metrics are being sent to the wrong project; the most likely issue is the exporter configuration, not the project destination.

916
Multi-Selectmedium

A company is deploying a microservices application on Google Cloud. They need a database for each service: one for user profiles (relational, high availability), one for product catalog (NoSQL, low latency), and one for session caching. Which THREE services should they use? (Select 3 answers)

Select 3 answers
A.Firestore
B.Cloud Spanner
C.Bigtable
D.Memorystore
E.Cloud SQL
AnswersA, D, E

NoSQL document database with low latency for product catalog.

Why this answer

Cloud SQL for relational user profiles with HA, Firestore for NoSQL product catalog with low latency, Memorystore for session caching.

917
MCQeasy

A developer deploys a containerized application on Cloud Run. The application needs to access a Cloud SQL instance securely without exposing it to the internet. What is the best practice?

A.Whitelist the Cloud Run IP range in Cloud SQL authorized networks.
B.Use Cloud Run's VPC connector and configure private IP for Cloud SQL.
C.Use a Cloud SQL proxy sidecar container in the same pod.
D.Use Cloud NAT to route traffic.
AnswerB

This is the best practice for secure access.

Why this answer

Option B is correct because Cloud Run services cannot directly connect to Cloud SQL using private IP without a VPC connector. The VPC connector allows Cloud Run to send traffic to a VPC network, where the Cloud SQL instance with a private IP resides, ensuring traffic never traverses the public internet. This is the recommended pattern for secure, low-latency access to Cloud SQL from serverless environments.

Exam trap

The PCD exam often tests the misconception that Cloud SQL proxy can be run as a sidecar in Cloud Run, but Cloud Run's single-container-per-instance model means the proxy must be bundled into the same container image or deployed as a separate service, not as a sidecar in the Kubernetes sense.

How to eliminate wrong answers

Option A is wrong because Cloud Run does not have a static, whitelistable IP range; its egress IPs are ephemeral and shared, making IP-based allowlisting unreliable and insecure. Option C is wrong because Cloud Run does not support sidecar containers in the same pod; it runs a single container per instance, and the Cloud SQL proxy must be deployed as a separate service or within the same container image, not as a sidecar. Option D is wrong because Cloud NAT is used for outbound internet access from private VMs, not for routing traffic to Cloud SQL private IP; it does not enable connectivity from serverless services like Cloud Run to a VPC.

918
Multi-Selectmedium

A company is using Cloud SQL for MySQL with automated backups enabled. They need to ensure they can recover to any point in time within the last 7 days. The database experiences high write throughput. Which TWO settings should they configure?

Select 2 answers
A.Disable binary logging to reduce storage costs.
B.Set the automated backup retention to 7 days.
C.Enable high availability (HA) configuration.
D.Set the binary log expiration period to 1 day to save disk space.
E.Enable binary logging (binlog) with a retention period of at least 7 days.
AnswersB, E

Automated backups must be retained for at least 7 days to allow PITR within that window.

Why this answer

Option B is correct because setting the automated backup retention to 7 days ensures that daily automated backups are kept for the required recovery window. Option E is correct because point-in-time recovery (PITR) in Cloud SQL for MySQL requires binary logging (binlog) to be enabled, and the binlog retention period must be at least 7 days to allow recovery to any point within that window. Without sufficient binlog retention, PITR cannot replay transactions beyond the retained binary logs.

Exam trap

Cisco often tests the distinction between automated backup retention (which covers full backups) and binary log retention (which covers transaction logs for PITR), leading candidates to confuse the two or assume that enabling HA alone satisfies recovery requirements.

919
MCQmedium

You are building a data pipeline that ingests streaming data from thousands of IoT devices. The devices send JSON payloads to a Cloud Pub/Sub topic. You want to process the data in near real-time and store the results in BigQuery for analytics. You also need to handle occasional schema changes in the incoming data (new fields added) without manual intervention. You have set up a Dataflow streaming pipeline using Apache Beam to read from Pub/Sub and write to BigQuery. The pipeline uses the `WriteToBigQuery` transform with `createDisposition=CREATE_NEVER` and `writeDisposition=WRITE_APPEND`. Recently, a batch of devices started sending a new field `temperature_celsius` that does not exist in the BigQuery schema. The pipeline logs errors and the data is not written. You need to modify the pipeline to automatically handle such schema evolution. What should you do?

A.Change `createDisposition` to `CREATE_IF_NEEDED` and ensure the BigQuery table schema has `autodetect=true` or is updated to allow new fields.
B.Manually update the BigQuery table schema to include the new field and then restart the pipeline.
C.Write the raw JSON payloads to Cloud Storage and use a Cloud Function to load them into BigQuery every 10 minutes with schema autodetect.
D.Use a `ParDo` transform to flatten all JSON fields into a fixed schema by ignoring unknown fields.
AnswerA

`CREATE_IF_NEEDED` will add new columns automatically if the schema is flexible.

Why this answer

Option A is correct because with `createDisposition=CREATE_IF_NEEDED`, BigQuery will automatically add new fields if the schema allows updates. This is the simplest approach. Option B is wrong because storing raw data in Cloud Storage and then loading later loses real-time capability.

Option C is wrong because Dataflow does not have a transform that automatically flattens schemas without modification. Option D is wrong because updating the table schema manually defeats the purpose of automation.

920
MCQhard

What conclusion can be drawn from these traces?

A.The overall request latency is 300ms.
B.The sendConfirmation span is failing.
C.The processPayment span is the bottleneck.
D.The validateCart span has errors.
AnswerC

It accounts for half the total latency, making it the primary contributor.

Why this answer

The trace shows that the 'processPayment' span has the longest duration (300ms) compared to the other spans, indicating it is the primary contributor to the overall latency. In distributed tracing, the span with the highest execution time is typically the bottleneck, as it delays the completion of the entire request. The other spans complete quickly, so optimizing 'processPayment' would yield the greatest performance improvement.

Exam trap

The PCD exam often tests the misconception that the longest span in a trace is always the bottleneck, but the trap here is that candidates might confuse total request latency with span duration or overlook parallel execution, leading them to pick the overall latency value (Option A) instead of identifying the specific slow span.

How to eliminate wrong answers

Option A is wrong because the overall request latency is the sum of the spans' durations, but the trace shows overlapping spans (e.g., 'validateCart' and 'sendConfirmation' run in parallel), so the total latency is not simply 300ms; it is the end-to-end time from the root span start to finish, which is 300ms in this case, but the question asks for a conclusion about bottlenecks, not a direct latency value. Option B is wrong because the 'sendConfirmation' span completes successfully with no error status or exception logged; a failing span would show an error tag or a non-zero status code. Option D is wrong because the 'validateCart' span has no error indicators (e.g., no error tag, no exception, and its duration is normal), so there is no evidence of errors in that span.

921
MCQhard

During an Oracle to Cloud SQL for PostgreSQL migration using DMS, the full dump phase completes successfully, but the CDC phase fails with a 'missing table' error. What is the most likely cause?

A.The source Oracle database does not have archivelog enabled.
B.The Cloud SQL instance does not have enough storage to accommodate CDC logs.
C.The DMS connection profile for the source is misconfigured.
D.Some tables in the source database lack primary keys or a valid replica identity.
AnswerD

CDC requires a primary key or replica identity to track changes; without it, DMS cannot replicate changes.

Why this answer

CDC typically requires a primary key or replica identity on each table to track changes. If tables lack these, CDC may fail. DMS expects tables to have primary keys or a valid replica identity for logging.

922
MCQmedium

You are designing a CI/CD pipeline using Cloud Build. You want to automatically trigger a build when code is pushed to a specific branch in Cloud Source Repositories. What is the correct configuration?

A.Create a Cloud Function that invokes Cloud Build via API when a push event occurs.
B.Add a build step in cloudbuild.yaml that polls the repository.
C.Configure a Cloud Pub/Sub topic to notify Cloud Build on push events.
D.Create a build trigger in Cloud Build with a regex pattern for the branch name.
AnswerD

Build triggers with branch patterns are the correct approach.

Why this answer

Option D is correct because Cloud Build natively supports build triggers that can be configured to automatically start a build when code is pushed to a specific branch in Cloud Source Repositories. The trigger uses a regex pattern to match the branch name, and Cloud Build listens for repository push events directly without requiring additional services.

Exam trap

The PCD exam often tests the misconception that Cloud Pub/Sub is always required for event-driven triggers, but Cloud Build has a native trigger integration with Cloud Source Repositories that bypasses Pub/Sub entirely.

How to eliminate wrong answers

Option A is wrong because creating a Cloud Function to invoke Cloud Build via API is an unnecessary workaround; Cloud Build already has built-in trigger functionality for Cloud Source Repositories. Option B is wrong because adding a build step that polls the repository is inefficient and violates the event-driven design of CI/CD; Cloud Build triggers are event-driven, not polling-based. Option C is wrong because while Cloud Pub/Sub can be used with Cloud Build, it is not required for Cloud Source Repositories; Cloud Build directly integrates with Cloud Source Repositories via its own trigger system without needing a Pub/Sub topic.

923
MCQmedium

A company needs to run AlloyDB for PostgreSQL with a read pool that can automatically scale based on load. They also need to run a local instance on-premises for disaster recovery. Which features should they use?

A.Use AlloyDB with read replicas in the same region and Cloud SQL for on-premises
B.Use AlloyDB with a single instance and use Bigtable for on-premises
C.Use AlloyDB with cross-region replication to another cloud region
D.Use AlloyDB with auto-scaling read pool and AlloyDB Omni for on-premises
AnswerD

AlloyDB read pools auto-scale, and AlloyDB Omni can replicate to on-premises.

Why this answer

AlloyDB read pools support auto-scaling. For on-premises disaster recovery, AlloyDB Omni provides a downloadable version that can run on-premises and replicate from the cloud. Cross-region replication is for cloud-to-cloud, not on-premises.

924
MCQmedium

A gaming company uses Cloud Spanner for its global leaderboard. The leaderboard is updated frequently by millions of users. They notice that write latency spikes during peak hours due to hotspotting on the leaderboard table. Which schema change would best mitigate this?

A.Prefix the primary key with a server ID or hash of the user ID
B.Use UUID as the primary key
C.Add a secondary index on the rank column
D.Enable leaderboard caching with Memorystore
AnswerA

This distributes writes across multiple splits, reducing contention.

Why this answer

Using a composite primary key with a hash prefix (e.g., server_id) as the first part distributes writes across splits, reducing hotspots. A monotonically increasing key (like rank) causes hotspotting.

925
MCQeasy

A company is migrating from Snowflake to BigQuery. They have a large amount of historical data. What is the recommended service to automate the data transfer?

A.Database Migration Service
B.Cloud Storage Transfer Service
C.Cloud Data Fusion
D.BigQuery Data Transfer Service
AnswerD

DTS for Snowflake is the native service for this migration.

Why this answer

BigQuery Data Transfer Service supports Snowflake as a source, allowing scheduled and automated transfers of data to BigQuery.

926
Multi-Selectmedium

Your company is migrating a 2 TB Oracle database to Cloud SQL for PostgreSQL using Database Migration Service (DMS). The source database is behind a firewall and only allows connections from specific IP ranges. The migration must have minimal downtime. Which TWO actions should you take? (Choose 2 options.)

Select 2 answers
A.Set up a Compute Engine VM as a proxy and whitelist its static IP in the source firewall.
B.Create a continuous migration job in Database Migration Service.
C.Use Cloud SQL Auth Proxy to connect DMS to the source database.
D.Expose the source database on a public IP with SSL.
E.Configure Database Migration Service to use a one-time migration job.
AnswersA, B

This allows DMS to connect via the proxy with a known IP.

Why this answer

For minimal downtime, continuous migration is needed. To connect to the source behind a firewall, you need either VPC peering with a VPN or a Compute Engine forwarding proxy with a whitelisted IP. Cloud SQL Auth Proxy is for connecting to Cloud SQL, not for source connectivity.

A one-time migration would cause downtime.

927
MCQeasy

An engineer needs to create a Cloud SQL instance with SSD storage. Which storage type should they select for best performance?

A.HDD (hard disk drive)
B.Local SSD
C.Persistent disk standard
D.SSD (solid-state drive)
AnswerD

SSD provides the best performance for databases.

Why this answer

Option D is correct because SSD (solid-state drive) is the recommended storage type for Cloud SQL instances when best performance is required. SSD provides lower latency and higher IOPS compared to HDD, making it suitable for transactional workloads and real-time applications. Cloud SQL supports both SSD and HDD, but SSD is the default and optimal choice for production databases.

Exam trap

Cisco often tests the misconception that Local SSD is available for Cloud SQL, but it is only an option for Compute Engine instances, not for managed database services like Cloud SQL.

How to eliminate wrong answers

Option A is wrong because HDD (hard disk drive) offers significantly lower IOPS and higher latency than SSD, making it unsuitable for performance-sensitive database workloads in Cloud SQL. Option B is wrong because Local SSD is not supported as a storage type for Cloud SQL instances; it is used with Compute Engine instances for ephemeral, high-performance scratch storage. Option C is wrong because Persistent disk standard is a general-purpose block storage option for Compute Engine, but Cloud SQL does not offer it as a selectable storage type; Cloud SQL only provides SSD and HDD options.

928
MCQmedium

A company plans to migrate a 200 GB Oracle database to Cloud SQL for PostgreSQL with minimal downtime. The source database has complex stored procedures and triggers. Which approach should the company use?

A.Use DMS with a one-time migration job and schedule downtime.
B.Export the Oracle database to a dump file and import into Cloud SQL using pg_restore.
C.Use DMS with continuous migration but skip Ora2Pg; DMS automatically converts PL/SQL to PL/pgSQL.
D.Use DMS with a continuous migration job, use Ora2Pg for schema conversion, and connect via Cloud SQL Auth Proxy.
AnswerD

Continuous migration with CDC achieves minimal downtime; Ora2Pg converts schema; Cloud SQL Auth Proxy connects securely.

Why this answer

Database Migration Service supports continuous migration with CDC for minimal downtime. Ora2Pg is used for schema conversion including stored procedures. Cloud SQL Auth Proxy provides secure connectivity without VPC peering.

929
MCQmedium

You need to back up a Cloud Spanner database and store it in a different region for disaster recovery. The backup should be a full database export. What is the recommended method?

A.Use the gcloud command to export the database to Cloud Storage as Avro
B.Use pg_dump to export Spanner data
C.Use Bigtable managed backups
D.Use Cloud SQL automated backups
AnswerA

gcloud spanner databases export exports to Avro in GCS; can be restored in another region.

Why this answer

The recommended method for backing up a Cloud Spanner database for disaster recovery is to use the `gcloud` command to export the database to Cloud Storage in Avro format. This creates a full database export that can be stored in a different region, enabling restoration in case of a regional failure. Cloud Spanner does not support native backup to other regions; instead, you must export the data to Cloud Storage and then import it into a new instance in the target region.

Exam trap

Cisco often tests the distinction between database services by presenting backup methods from other Google Cloud databases (Cloud SQL, Bigtable) as plausible options, exploiting the candidate's confusion about which tool applies to Cloud Spanner.

How to eliminate wrong answers

Option B is wrong because pg_dump is a PostgreSQL utility and Cloud Spanner is not PostgreSQL-based; it uses Google's proprietary distributed SQL engine, so pg_dump cannot connect to or export Spanner data. Option C is wrong because Bigtable managed backups are designed for Cloud Bigtable, a NoSQL wide-column database, not for Cloud Spanner's relational SQL database. Option D is wrong because Cloud SQL automated backups are for Cloud SQL (MySQL, PostgreSQL, SQL Server), not for Cloud Spanner, which has its own export/import mechanism via gcloud or the console.

930
Multi-Selectmedium

A company is building a data processing pipeline that needs to ingest events from multiple sources, process them in order, and handle failures with retry. They also need to schedule periodic tasks. Which THREE services should they use? (Choose 3)

Select 3 answers
A.Cloud Scheduler
B.Cloud Tasks
C.Cloud Workflows
D.Cloud Pub/Sub
E.Cloud Logging
AnswersA, B, D

Cloud Scheduler can trigger periodic tasks.

Why this answer

Cloud Pub/Sub for ingesting events with ordering, Cloud Tasks for retry handling, and Cloud Scheduler for scheduling periodic tasks. Cloud Workflows is for orchestration, Cloud Logging is for logs.

931
MCQhard

You are deploying a critical application on Compute Engine. The application requires high availability and must survive a zonal failure. You have created a managed instance group (MIG) with autoscaling across two zones. The application state is stored in a Cloud SQL instance with a read replica in another region. The application also uses a shared static IP address for client access. During a test, you simulate a failure of zone us-central1-a. You observe that the MIG automatically creates new instances in the remaining zone, but the application becomes unreachable for several minutes. What is the most likely cause of the downtime?

A.The load balancer's health check interval and timeout caused a delay in marking the backend instances as unhealthy and routing traffic to the new zone.
B.The static IP address was not configured to failover to the remaining zone.
C.The Cloud SQL read replica did not promote to primary quickly enough.
D.The managed instance group's autoscaler took too long to create new instances in the remaining zone.
AnswerA

Health checks need time to detect failure and update routing.

Why this answer

The most likely cause is that the load balancer's health check interval and timeout delayed the detection of unhealthy instances in the failed zone, preventing traffic from being rerouted to the new instances in the remaining zone. Even though the MIG created new instances quickly, the load balancer continued sending requests to the failed zone until the health check marked those backends as unhealthy, causing the application to be unreachable during that window.

Exam trap

The trap here is that candidates often assume the MIG's autoscaling speed is the bottleneck, but Cisco tests the understanding that the load balancer's health check configuration is the critical factor in traffic rerouting during a zonal failure.

How to eliminate wrong answers

Option B is wrong because a static IP address is regional and does not require failover configuration; it is associated with the load balancer, which handles traffic distribution across zones. Option C is wrong because the Cloud SQL read replica is in another region and is used for read scaling or disaster recovery, not for immediate failover during a zonal failure; the primary instance in the same region remains unaffected. Option D is wrong because the MIG's autoscaler created new instances in the remaining zone as observed, so the delay was not due to instance creation time but due to the load balancer's health check configuration.

932
Multi-Selectmedium

A company is using Datastream to continuously replicate data from an on-premises MySQL database to BigQuery. They notice that some schema changes (e.g., adding a column) on the source are not being propagated. Which TWO actions should they take to ensure schema changes are captured? (Choose two.)

Select 2 answers
A.Enable DDL event replication in the Datastream connection profile
B.Run a backfill job after each schema change
C.Set binlog_row_image=FULL on the MySQL source
D.Use Dataflow to detect schema changes and apply them to BigQuery
E.Set binlog_format=STATEMENT on the MySQL source
AnswersA, C

Datastream can be configured to capture DDL changes if supported by the source.

Why this answer

Option A is correct because Datastream requires explicit DDL event replication to capture schema changes like adding a column. By enabling DDL event replication in the Datastream connection profile, the service will monitor the MySQL binary log for DDL statements and propagate them to BigQuery. Without this setting, only DML changes (INSERT, UPDATE, DELETE) are replicated.

Exam trap

Cisco often tests the misconception that Dataflow can handle schema detection and evolution, but in this context, Datastream is the service responsible for capturing and applying DDL changes from the source database.

933
MCQmedium

A team created the instance template above and used it in a managed instance group. However, instances fail to serve web traffic. What is the most likely cause?

A.The startup script does not configure a firewall rule to allow HTTP traffic.
B.The image family debian-11 does not have the necessary packages.
C.The machine type e2-medium is too small for Nginx.
D.The instance template is missing a service account.
AnswerA

The default VPC firewall rules only allow SSH and ICMP. An ingress rule for HTTP (port 80) is needed for Nginx to serve traffic.

Why this answer

The instance template likely includes a startup script that installs and starts Nginx, but does not configure a firewall rule (e.g., via `gcloud compute firewall-rules create` or `iptables`) to allow inbound HTTP traffic on port 80. By default, GCP VPC firewall rules deny all ingress traffic unless explicitly allowed, so even if Nginx is running, external requests will be blocked. This is the most common reason why a managed instance group fails to serve web traffic despite the application being installed.

Exam trap

The PCD exam often tests the misconception that installing and starting a web server (like Nginx) is sufficient to serve traffic, ignoring the separate requirement for network-level firewall rules to allow inbound connections.

How to eliminate wrong answers

Option B is wrong because the Debian 11 image family includes all necessary packages to install Nginx via `apt-get`, and the startup script can install them; the image itself does not need to have Nginx pre-installed. Option C is wrong because e2-medium (2 vCPUs, 4 GB memory) is more than sufficient to run Nginx, which has minimal resource requirements. Option D is wrong because a service account is not required for a startup script to install and run Nginx; it is only needed if the script needs to call GCP APIs (e.g., to create firewall rules), but the failure to serve traffic is due to missing firewall rules, not the absence of a service account.

934
Multi-Selectmedium

You are designing a globally distributed ecommerce platform that uses Cloud Spanner for order processing. The platform needs to support high read throughput with low latency for product catalog queries. Which two features should you use? (Choose TWO.)

Select 2 answers
A.Stale reads with bounded staleness
B.Global secondary indexes
C.Interleaved tables
D.Local secondary indexes
E.Strong reads
AnswersA, D

Stale reads can be served by read-only replicas, improving read throughput and latency for non-critical queries.

Why this answer

Stale reads with bounded staleness (Option A) allow Cloud Spanner to serve read requests from any replica within a configurable time window (e.g., up to 15 seconds), avoiding the latency of contacting the leader replica. This dramatically increases read throughput for product catalog queries where near-real-time data is acceptable. Local secondary indexes (Option D) are co-located with the base table data in the same split, enabling efficient, low-latency queries on attributes within a single region without cross-node coordination.

Exam trap

Cisco often tests the misconception that all secondary indexes are global and that strong reads are always required for consistency, but the trap here is that for high-throughput, low-latency catalog queries, stale reads and local secondary indexes are the correct choices because they avoid leader bottlenecks and cross-split coordination.

935
MCQmedium

A team notices that a Cloud Run service occasionally returns HTTP 500 errors. They have enabled Cloud Error Reporting. What is the best way to rapidly diagnose the root cause of these errors?

A.Search Cloud Logging manually for '500' events.
B.View the Cloud Trace dashboard for error traces.
C.Create a Cloud Monitoring dashboard for 5xx metrics.
D.Examine the error group details in Cloud Error Reporting.
AnswerD

Error Reporting aggregates errors and links to Stackdriver.

Why this answer

Cloud Error Reporting automatically groups similar errors (like HTTP 500s) into error groups, providing stack traces, request details, and occurrence timelines. Examining the error group details is the fastest path to root cause because it surfaces the exact exception and context without requiring manual log filtering or metric setup.

Exam trap

The PCD exam often tests the distinction between monitoring (Cloud Monitoring metrics) and error diagnosis (Cloud Error Reporting), tempting candidates to choose a metric dashboard when the question explicitly asks for rapid root cause diagnosis.

How to eliminate wrong answers

Option A is wrong because manually searching Cloud Logging for '500' events is time-consuming and lacks automatic grouping, stack traces, and deduplication that Error Reporting provides. Option B is wrong because Cloud Trace focuses on latency and distributed tracing for requests, not on aggregating or diagnosing HTTP 500 error details. Option C is wrong because a Cloud Monitoring dashboard for 5xx metrics shows trends and alerting but does not provide the specific error messages, stack traces, or request context needed to identify the root cause.

936
MCQmedium

A team plans to migrate an Oracle database to Cloud SQL for PostgreSQL. They have identified complex PL/SQL packages that need conversion. Which open-source tool is specifically designed to assist with schema conversion from Oracle to PostgreSQL?

A.Ora2Pg
B.Database Migration Service
C.pgloader
D.Liquibase
AnswerA

Ora2Pg converts Oracle schemas to PostgreSQL, including PL/SQL to PL/pgSQL.

Why this answer

Ora2Pg is an open-source tool specifically designed to automate the migration of Oracle databases to PostgreSQL. It converts Oracle PL/SQL code, including complex packages, procedures, and functions, into PostgreSQL-compatible PL/pgSQL, and also handles schema objects like tables, views, sequences, and indexes. This makes it the correct choice for the team's need to convert complex PL/SQL packages.

Exam trap

The trap here is that candidates may confuse pgloader's data loading capabilities with schema conversion, or assume Database Migration Service is open-source, when in fact the question specifically asks for an open-source tool designed for schema conversion from Oracle to PostgreSQL.

How to eliminate wrong answers

Option B is wrong because Database Migration Service (DMS) is a fully managed service for migrating databases to Google Cloud, but it is not an open-source tool; it is a proprietary Google Cloud service. Option C is wrong because pgloader is an open-source tool for loading data into PostgreSQL, but it focuses on data migration from sources like MySQL, SQLite, and MS SQL Server, not on converting Oracle PL/SQL packages or schema objects. Option D is wrong because Liquibase is an open-source database schema change management tool that uses changelogs to track and apply schema modifications, but it does not specialize in converting Oracle PL/SQL to PostgreSQL syntax.

937
MCQhard

You need to migrate an Oracle database to Cloud SQL for PostgreSQL. The schema must be converted using Oracle to PostgreSQL migration tools. Which tool should you use to automate schema conversion?

A.Cloud Dataflow
B.pg_dump
C.Ora2Pg
D.Database Migration Service (DMS)
AnswerC

Ora2Pg is the standard tool for converting Oracle schemas to PostgreSQL.

Why this answer

Ora2Pg is an open-source tool for converting Oracle schemas, data, and procedures to PostgreSQL.

938
MCQhard

A financial trading application uses Cloud Spanner for order processing. To reduce latency for read-heavy operations, the team wants to allow stale reads with a bounded staleness of 10 seconds. Which Spanner API or method should they use to achieve this?

A.Set the session to read-only mode
B.Use the `timestamp_bound` parameter with `max_staleness` set to 10 seconds
C.Configure an index with the `STORING` clause to avoid index joins
D.Use mutations API instead of DML for writes
AnswerB

Spanner's API allows setting `max_staleness` for bounded stale reads, reducing latency.

Why this answer

Spanner supports stale reads (bounded staleness) by setting a read timestamp. The read timestamp can be set to a past time within the maximum staleness. The `max_staleness` option in the client libraries or the `read_timestamp` parameter in gRPC API allow bounded staleness.

939
MCQhard

You are building a data pipeline using Cloud Dataflow (Apache Beam). The pipeline reads from Pub/Sub, performs aggregations, and writes to BigQuery. Occasionally, you see duplicates in the BigQuery output, even though the pipeline uses .withInsertId() in the BigQuery write transform. What could be causing these duplicates?

A.You are not using the exactly-once sink option for BigQuery
B.You have set .withOutputParallelization() to false
C.The pipeline is using at-least-once mode and bundles are being retried, but the insertId is not being reused across retry attempts
D.You need to enable Dataflow's built-in deduplication using the .withIdAttribute() in Pub/Sub read
AnswerC

If the insertId is generated per element per attempt, duplicates can occur on retry.

Why this answer

Option C is correct because Cloud Dataflow (Apache Beam) operates in at-least-once mode by default, meaning bundles may be retried during processing. When a bundle is retried, the insertId set via .withInsertId() must be reused across retry attempts to enable BigQuery's deduplication. If the insertId is not reused (e.g., because it's generated per attempt or not properly propagated), BigQuery treats each write as a separate row, resulting in duplicates.

Exam trap

The PCD exam often tests the misconception that .withInsertId() alone guarantees exactly-once delivery, when in fact it requires the insertId to be stable across retries, and candidates may overlook the default at-least-once processing mode of Dataflow.

How to eliminate wrong answers

Option A is wrong because BigQuery's exactly-once sink is not a configurable option; BigQuery uses insertId-based deduplication for streaming inserts, and there is no separate 'exactly-once sink' toggle. Option B is wrong because .withOutputParallelization() controls whether output is parallelized across workers, not retry behavior or deduplication; setting it to false would not cause duplicates. Option D is wrong because .withIdAttribute() in Pub/Sub read is used to extract a unique message ID for deduplication within the pipeline, but the question specifically states duplicates appear in BigQuery output despite using .withInsertId(), indicating the issue is with insertId reuse across retries, not with Pub/Sub message deduplication.

940
MCQeasy

A development team needs a serverless NoSQL document database for a new mobile application that requires offline synchronization for users. The database should scale automatically and integrate with Firebase Authentication. Which Google Cloud database meets these requirements?

A.Memorystore for Redis
B.Cloud SQL
C.Firestore
D.Cloud Bigtable
AnswerC

Firestore is the correct choice: serverless, document-based, with offline sync and FirebaseAuth integration.

Why this answer

Firestore provides serverless NoSQL document storage, automatic scaling, offline sync, and integration with Firebase Authentication.

941
MCQmedium

A team is investigating increased latency in a web application deployed on Google Kubernetes Engine (GKE). They want to identify which specific service calls are slow. Which Google Cloud tool should they use?

A.Cloud Trace
B.Cloud Monitoring dashboards
C.Cloud Profiler
D.Cloud Logging
AnswerA

Trace enables end-to-end latency analysis across services.

Why this answer

Cloud Trace is the correct tool because it provides end-to-end latency tracking for requests in distributed systems, including GKE. It captures detailed spans for each service call, allowing the team to pinpoint which specific microservice or API call is causing the increased latency. This aligns directly with the need to identify slow service calls in a web application.

Exam trap

The trap here is that candidates confuse Cloud Monitoring dashboards (which show aggregate metrics) with Cloud Trace (which provides per-request latency breakdowns), leading them to choose a tool that cannot isolate specific slow service calls.

How to eliminate wrong answers

Option B is wrong because Cloud Monitoring dashboards aggregate metrics like CPU, memory, and request counts but do not provide per-request trace data or identify which specific service calls are slow. Option C is wrong because Cloud Profiler focuses on identifying CPU and memory hotspots within application code, not on tracing the latency of individual service calls across distributed services. Option D is wrong because Cloud Logging collects and stores log entries but lacks the distributed tracing capability to correlate latency across service boundaries.

942
MCQmedium

An engineer notices high CPU utilization on a Cloud Spanner instance and wants to identify the queries consuming the most resources. Which tool should they use?

A.Cloud Monitoring (Stackdriver) dashboards for Spanner.
B.Key Visualizer for Bigtable.
C.Cloud Logging with query logs.
D.Query Insights for Spanner.
AnswerD

Query Insights provides detailed per-query metrics including CPU and latency.

Why this answer

Cloud Spanner's Query Insights provides query performance statistics, including CPU usage, latency, and execution counts. It helps identify problematic queries. Stackdriver (Cloud Monitoring) shows overall metrics but not per-query details.

Key Visualizer is for Bigtable. Cloud Logging can show logs but not specific query resource consumption.

943
MCQeasy

A data engineering team needs to migrate a 10 TB Teradata data warehouse to BigQuery. They want to automate the migration of historical data and ongoing changes. Which Google Cloud service should they use?

A.Dataproc
B.Cloud Data Fusion
C.BigQuery Data Transfer Service
D.Cloud SQL for PostgreSQL
AnswerC

BigQuery Data Transfer Service supports scheduled transfers from Teradata, including incremental loads.

Why this answer

BigQuery Data Transfer Service can automate data transfers from Teradata (and other sources) into BigQuery. It handles both historical and incremental loads.

944
MCQmedium

An organization is migrating a Teradata data warehouse to BigQuery. They want to minimize manual SQL rewriting. Which approach is most effective for converting Teradata SQL to BigQuery-compatible SQL?

A.Use BigQuery Data Transfer Service for Teradata to automate migration.
B.Use gcloud command-line tool to export Teradata data and import into BigQuery.
C.Manually rewrite all Teradata SQL queries to BigQuery syntax.
D.Use Cloud SQL to create a linked server to Teradata.
AnswerA

Data Transfer Service supports Teradata and automates schema and SQL conversion.

Why this answer

BigQuery Data Transfer Service can automate migration from Teradata, including schema and SQL conversion. It handles dialect differences and reduces manual effort.

945
MCQhard

A DevOps engineer is designing a row key for a Bigtable table storing user activity logs. The pattern is: user_id (UUID) + timestamp. On a cluster with 10 nodes, they observe severe hotspotting on a single node during peak writes. Which row key design change would likely resolve this issue?

A.Use a hash of the user_id as the prefix
B.Use a single table with no row key change
C.Increase the number of nodes to 20
D.Use a composite key: timestamp + user_id
AnswerA, D

Salting with a hash is also a valid technique, but the question expects one answer. Reversing the key is more common and directly addresses the issue. However, since both could be correct, the best answer is A.

Why this answer

Option A is correct because prepending a hash of the user_id distributes writes uniformly across all Bigtable tablets. Bigtable uses the row key prefix to determine tablet assignment; a UUID prefix is random but sequential UUIDs (e.g., time-based) can cluster writes. A hash function (e.g., MD5 or CRC32) ensures even distribution, eliminating hotspotting on a single node.

Exam trap

Cisco often tests the misconception that reversing the key order (timestamp + user_id) improves distribution, but in reality it creates a hotspot on the tablet handling the current timestamp range.

How to eliminate wrong answers

Option B is wrong because keeping the same row key pattern (user_id + timestamp) does not address the hotspotting; if user_ids are sequential or timestamp-heavy, writes still concentrate on one tablet server. Option C is wrong because increasing nodes to 20 does not fix the root cause—hotspotting is a data distribution problem, not a capacity issue; more nodes will still see skewed load if the row key design is poor. Option D is wrong because swapping to timestamp + user_id makes the timestamp the prefix, which causes all writes at the same time to hit the same tablet, worsening hotspotting rather than resolving it.

946
MCQeasy

A company is migrating a stateful application to Google Cloud. They need high availability with automatic failover across zones within a region. Which compute option should they choose?

A.App Engine Standard Environment
B.Cloud Run
C.Google Kubernetes Engine with Regional Persistent Disk
D.Compute Engine with standard persistent disk
AnswerC

Regional Persistent Disk provides synchronous replication across zones, enabling automatic failover for stateful workloads on GKE.

Why this answer

Google Kubernetes Engine (GKE) with Regional Persistent Disk is the correct choice because it provides synchronous replication of data across multiple zones within a region, enabling automatic failover for stateful applications. When a pod or node fails in one zone, the Regional Persistent Disk can be immediately attached to a pod in another zone, ensuring high availability without data loss. This meets the requirement for stateful workloads that need zone-level resilience.

Exam trap

The PCD exam often tests the misconception that any managed service (like Cloud Run or App Engine) inherently provides high availability for stateful workloads, but candidates must remember that stateful applications require persistent, zone-redundant storage, which only GKE with Regional Persistent Disk offers among these options.

How to eliminate wrong answers

Option A is wrong because App Engine Standard Environment is a fully managed, stateless platform that does not support persistent storage or automatic failover across zones for stateful applications. Option B is wrong because Cloud Run is a serverless compute platform designed for stateless containers; it lacks native support for persistent disks and automatic cross-zone failover for stateful data. Option D is wrong because Compute Engine with standard persistent disk stores data only within a single zone; if that zone fails, the disk becomes inaccessible, and there is no built-in automatic failover mechanism.

947
MCQmedium

A team is designing a Cloud Bigtable schema for a time-series application that records sensor readings every second. They need to avoid write hotspots. Which row key design is most appropriate?

A.Use a salted timestamp where salt is the sensor ID modulo a small number
B.Use a composite key with sensor ID followed by reversed timestamp
C.Use a UUID as the row key
D.Use a monotonically increasing timestamp as the row key
AnswerB

Sensor ID spreads data, and reversed timestamp avoids sequential writes to the same tablet.

Why this answer

To avoid hotspots, row keys should be designed to distribute writes across tablets. Reversing the timestamp (e.g., `[timestamp reversed]#[sensor_id]`) spreads new writes across different tablets, rather than appending to the same tablet.

948
MCQmedium

A social media app uses Firestore in Native mode. The app has a feature that shows a user's recent posts. The query sorts by timestamp descending and limits to 10 results. As the user base grows, the queries become slow. Which optimization should you implement FIRST?

A.Increase the Firestore quota for reads
B.Create a composite index on (user_id, timestamp) for the posts collection
C.Use Cloud SQL for this query instead of Firestore
D.Denormalize the user’s recent posts into a subcollection
AnswerB

A composite index on (user_id, timestamp) allows Firestore to efficiently filter by user and order by timestamp.

Why this answer

Option B is correct because the query filters by `user_id` and sorts by `timestamp` descending, which requires a composite index on `(user_id, timestamp DESC)` to avoid a full collection scan. Without this index, Firestone performs a sort in memory, which becomes slow as the dataset grows. Creating the composite index allows Firestore to serve the query directly from the index, dramatically improving performance.

Exam trap

The trap here is that candidates often assume Firestore automatically handles all sorting or that increasing quotas or denormalizing data will fix performance, when in fact the missing composite index is the single most impactful first optimization for this query pattern.

How to eliminate wrong answers

Option A is wrong because increasing the Firestore read quota does not address the root cause of slow queries; it only raises the limit on the number of reads, not the speed of index-based retrieval. Option C is wrong because migrating to Cloud SQL would introduce relational overhead and latency for a simple document-based query, and Firestore is designed for exactly this kind of real-time, sorted query when properly indexed. Option D is wrong because denormalizing recent posts into a subcollection would require maintaining duplicate data and still need an index on `(user_id, timestamp)` within that subcollection; it adds complexity without solving the missing index issue.

949
MCQmedium

An engineer is using Database Migration Service for a continuous migration from on-premises Oracle to Cloud SQL for PostgreSQL. The migration job has completed the full dump and is now in the CDC phase. The engineer wants to perform a zero-downtime cutover. What action should they take?

A.Promote the Cloud SQL replica to make it a standalone instance
B.Recreate the Cloud SQL instance and restart the migration
C.Stop the source database and then promote the Cloud SQL replica
D.Delete the migration job and manually import data
AnswerA

Promoting the replica stops replication and makes it a writable primary, achieving zero-downtime cutover.

Why this answer

Promoting the replica stops replication and makes the Cloud SQL instance writeable. This is the standard cutover procedure in DMS for continuous migration jobs.

950
MCQhard

A company is using Cloud Monitoring to track custom metrics published from an on-premises application using the Monitoring API. The metrics are published every 30 seconds. The team wants to create an alert that fires if the metric goes below a threshold for more than 1 minute. Which alert condition type should they use?

A.Metric type: custom.googleapis.com, condition: metric lower bound, duration: 60s
B.Metric type: custom.googleapis.com, condition: metric change, duration: 60s
C.Metric type: custom.googleapis.com, condition: metric absence, duration: 60s
D.Metric type: custom.googleapis.com, condition: metric threshold (below value), duration: 60s
AnswerD

Threshold condition with direction 'below' and duration 60s works for a value below threshold for 1 minute.

Why this answer

Option D is correct because the requirement is to fire an alert when the metric value goes below a threshold for more than 1 minute. The 'metric threshold (below value)' condition type directly monitors a metric against a lower bound and evaluates the condition over the specified duration (60s) before triggering. This aligns with the need to detect sustained low values, not just a single data point.

Exam trap

The PCD exam often tests the distinction between 'metric absence' (no data) and 'metric threshold below' (data exists but is low), leading candidates to mistakenly choose absence when the scenario describes a value-based condition.

How to eliminate wrong answers

Option A is wrong because 'metric lower bound' is not a valid condition type in Cloud Monitoring; the correct term is 'metric threshold' with a 'below' or 'above' comparator. Option B is wrong because 'metric change' condition tracks the rate of change (increase or decrease) between data points, not a static threshold violation, and is used for anomaly detection rather than sustained low values. Option C is wrong because 'metric absence' fires when no data is received for the metric (i.e., missing time series), which is different from the metric value being below a threshold; the question explicitly states the metric is published every 30 seconds, so absence is not the issue.

951
MCQmedium

A media streaming company uses Cloud Storage to store video files. Users upload files through a web application, and the files are streamed directly from Cloud Storage. They want to reduce latency for users in different regions. Which configuration should they apply?

A.Enable Object Lifecycle Management to move objects to Nearline storage.
B.Configure Cloud Storage transfer service to replicate data to multiple buckets.
C.Use a multi-region Cloud Storage bucket and enable requester-pays.
D.Set up Cloud CDN with the Cloud Storage bucket as origin.
AnswerD

Cloud CDN caches content at edge locations worldwide, reducing latency for users regardless of their region.

Why this answer

Cloud CDN caches video content at edge locations worldwide, reducing latency for users by serving content from the nearest edge cache instead of the origin Cloud Storage bucket. This directly addresses the requirement to reduce latency for users in different regions without modifying the storage architecture.

Exam trap

The PCD exam often tests the misconception that multi-region buckets alone solve latency issues, but the trap here is that multi-region storage provides redundancy, not edge caching—only Cloud CDN delivers the low-latency performance needed for global streaming.

How to eliminate wrong answers

Option A is wrong because Object Lifecycle Management moves objects to Nearline storage (which has higher retrieval costs and lower availability for streaming) and does not reduce latency; it only optimizes storage costs for infrequently accessed data. Option B is wrong because Cloud Storage Transfer Service is designed for one-time or scheduled bulk data transfers between buckets, not for real-time replication to reduce latency; it does not provide automatic regional distribution for streaming. Option C is wrong because a multi-region bucket provides geo-redundant storage but does not cache content at edge locations, and enabling requester-pays shifts costs to the user without improving latency; the latency reduction from multi-region is minimal compared to CDN edge caching.

952
MCQmedium

A company is evaluating Cloud Bigtable for a high-throughput write workload. They need to monitor disk usage and request latency. Which metrics should they monitor? (Select the best combination.)

A.disk/bytes_used and request_latency
B.cpu/utilisation and database/queries
C.disk/bytes_used and rows_deleted
D.request_latency and database/memory/utilisation
AnswerA

These are the correct Bigtable metrics for disk usage and request latency.

Why this answer

Bigtable provides 'disk/bytes_used' for disk usage and 'request_latency' for latency. 'cpu/utilisation' is not a Bigtable metric; Bigtable uses 'cpu_load' and 'server_latency' but request latency is the key metric. 'database/queries' is a Cloud SQL metric. 'rows_deleted' is a Spanner metric.

953
Multi-Selectmedium

A company wants to migrate an on-premises MySQL database to Cloud SQL with minimal downtime. Which two steps should they take? (Choose two.)

Select 2 answers
A.Use Database Migration Service to create a continuous replication job
B.Set up a Cloud SQL proxy on the source database
C.Take a full backup and restore it to Cloud SQL before replication
D.Configure binary logging on the source MySQL database
E.Disable foreign key checks on the source database
AnswersA, D

DMS supports continuous migration with minimal downtime.

Why this answer

Database Migration Service (DMS) can be used for continuous replication. They also need to configure the source database for replication (binary logging). Cloud SQL proxy is for connecting applications, not migration.

954
MCQmedium

A company wants to achieve 0 RPO for a Cloud SQL for MySQL instance. Which configuration should they use?

A.Enable cross-region replication to a replica in another region
B.Enable automatic backups with point-in-time recovery
C.Use a read replica in the same zone
D.Configure a Cloud SQL HA instance
AnswerD

HA instance uses synchronous replication within the same region, providing 0 RPO.

Why this answer

Option D is correct because Cloud SQL HA (high availability) instances use synchronous replication to a standby VM in a different zone within the same region, providing automatic failover with zero data loss (0 RPO). This configuration ensures that committed transactions are immediately replicated to the standby before acknowledging the commit, guaranteeing that no committed data is lost even if the primary zone fails.

Exam trap

Cisco often tests the distinction between synchronous and asynchronous replication, and the trap here is that candidates confuse cross-region replication or read replicas (both asynchronous) with the synchronous HA configuration, mistakenly believing they can achieve 0 RPO.

How to eliminate wrong answers

Option A is wrong because cross-region replication is asynchronous, meaning there is a replication lag that can result in data loss if the primary region fails before the replica catches up, thus it cannot guarantee 0 RPO. Option B is wrong because automatic backups with point-in-time recovery are taken at scheduled intervals (e.g., daily), so any data committed between the last backup and a failure is lost, making RPO non-zero. Option C is wrong because a read replica in the same zone is also asynchronous and does not provide automatic failover; it is designed for read scaling, not for high availability with zero data loss.

955
MCQeasy

An application running on Compute Engine needs to publish messages to a Pub/Sub topic. The VPC does not have external internet access. What must be configured to allow the instance to publish?

A.Cloud NAT
B.VPC Peering with Pub/Sub
C.Cloud Router with BGP
D.Private Google Access
AnswerD

Private Google Access allows VM instances to use Google APIs via internal IPs.

Why this answer

Option D is correct because Private Google Access enables instances without external IP addresses to call Google APIs and services (including Pub/Sub) using internal IPs. Option A is for NAT to internet, option B is for peering, and option C is for dynamic routing.

956
MCQhard

A company runs a microservices application on Google Kubernetes Engine. They use Cloud SQL for persistent data. Recently, during a traffic spike, the application experienced increased latency and some requests failed with timeout errors. The team observed that the Cloud SQL CPU utilization spiked to 100%, and the GKE pods had high memory usage. They are using a standard Cloud SQL tier (db-n1-standard-2). Which course of action would best improve the application's performance and reliability?

A.Upgrade Cloud SQL to a higher tier with more CPU.
B.Increase the number of replicas in GKE to reduce load per pod.
C.Add read replicas to Cloud SQL.
D.Implement caching with Memorystore for frequently accessed data.
AnswerD

Caching reduces database read load, alleviating CPU pressure and latency.

Why this answer

The correct answer is D because the primary bottleneck is the Cloud SQL CPU spiking to 100% under heavy read traffic. Implementing Memorystore (Redis) caching offloads repeated read queries from the database, reducing CPU load and query latency. This directly addresses the root cause—database CPU exhaustion—without requiring a larger database instance or adding replicas that would still be limited by the same CPU.

Exam trap

The PCD exam often tests the misconception that scaling compute (pods or database tier) is the only solution to performance issues, when in reality caching is a more cost-effective and architecturally sound approach for read-heavy workloads with spiky traffic patterns.

How to eliminate wrong answers

Option A is wrong because upgrading to a higher Cloud SQL tier (more CPU) only scales the database vertically, which is costly and does not eliminate the underlying issue of repeated expensive queries; it also does not reduce latency for read-heavy workloads as effectively as caching. Option B is wrong because increasing GKE pod replicas distributes application load but does not reduce the number of database queries hitting Cloud SQL; in fact, more pods could increase concurrent connections, worsening CPU contention. Option C is wrong because adding read replicas helps distribute read traffic but does not reduce the CPU load on the primary instance for write-heavy or mixed workloads; the primary still handles all writes and CPU spikes from complex queries, and replicas add replication lag and cost.

957
MCQeasy

An organization wants to design a serverless data processing pipeline that is highly available and can automatically scale based on the number of incoming requests. The pipeline processes JSON messages from a Cloud Pub/Sub topic and writes results to BigQuery. Which service should be used as the compute component?

A.Cloud Dataflow
B.Cloud Run
C.Cloud Functions
D.Compute Engine with managed instance groups
AnswerB

Cloud Run provides automatic scaling, can be triggered via Pub/Sub push, and supports longer processing times.

Why this answer

Cloud Run is the correct compute component because it is a fully managed serverless platform that automatically scales from zero based on incoming HTTP requests, supports event-driven processing via Pub/Sub push subscriptions, and integrates natively with BigQuery. It provides high availability by default across zones and can handle burst traffic without provisioning overhead, making it ideal for a serverless pipeline that processes JSON messages and writes results to BigQuery.

Exam trap

The PCD exam often tests the distinction between serverless compute services (Cloud Run vs Cloud Functions) by focusing on execution time limits and concurrency; the trap here is that candidates choose Cloud Functions for its simplicity, overlooking the 9-minute timeout and lack of support for long-running or high-concurrency workloads that Cloud Run handles natively.

How to eliminate wrong answers

Option A is wrong because Cloud Dataflow is a batch and stream processing service based on Apache Beam, not a serverless compute service that automatically scales per request; it is designed for complex data transformations and requires managing pipelines, not simple request-driven processing. Option C is wrong because Cloud Functions has a maximum timeout of 9 minutes (540 seconds) and limited memory (up to 32GB), which may not be sufficient for long-running or memory-intensive BigQuery write operations, and it lacks the ability to handle sustained high-throughput streaming from Pub/Sub as efficiently as Cloud Run. Option D is wrong because Compute Engine with managed instance groups is not serverless; it requires managing virtual machines, scaling policies, and infrastructure, which contradicts the requirement for a serverless design and adds operational overhead.

958
Multi-Selectmedium

A company is migrating a PostgreSQL database to AlloyDB using Database Migration Service. They want to ensure high availability during the migration with minimal risk. Which TWO practices should they follow? (Choose 2)

Select 2 answers
A.Promote the replica immediately after the initial load
B.Disable binary logging on the source to improve performance
C.Set up DMS with continuous CDC to keep AlloyDB in sync
D.Test the migration by cloning the AlloyDB instance before cutover
E.Use gcloud sql import command instead of DMS
AnswersC, D

CDC ensures near-zero downtime.

Why this answer

DMS supports continuous CDC, so you should enable CDC for minimal downtime. Testing with a clone avoids affecting production. Promoting the replica early would cause downtime.

959
MCQhard

A developer is designing a chat application using Cloud Firestore. They need to ensure that updates to messages are propagated to all clients in real-time. Which feature should they use?

A.Firestore indexes
B.Security rules
C.Real-time listeners
D.Offline persistence
AnswerC

Real-time listeners push updates to clients in real-time.

Why this answer

Real-time listeners (onSnapshot) in Cloud Firestore allow clients to subscribe to document or query changes, receiving updates immediately when data is modified. This ensures all connected clients see message updates in real-time without polling, which is essential for a chat application.

Exam trap

The PCD exam often tests the distinction between features that enable real-time data flow (listeners) versus features that manage data structure or access (indexes, rules, persistence), leading candidates to confuse offline persistence with real-time sync.

How to eliminate wrong answers

Option A is wrong because Firestore indexes are used to optimize query performance, not to propagate real-time updates. Option B is wrong because security rules control access and validation of data, not the delivery of updates to clients. Option D is wrong because offline persistence enables local caching and operation without connectivity, but does not provide real-time synchronization across clients.

960
MCQmedium

An organization uses Cloud SQL for MySQL and wants to set up a read replica in a different region to improve read latency for global users. What is the recommended way to configure network connectivity between the primary and replica?

A.Use a Cloud Interconnect
B.Use Cloud VPN with dynamic routing
C.Use VPC peering between the regions
D.Use Private Services Access
AnswerD

Private Services Access allows the Cloud SQL service producer VPC to be peered with the customer VPC.

Why this answer

Option A is correct because cross-region Cloud SQL read replicas require Private Services Access to establish connectivity between the peered VPC and the Cloud SQL service. Option B is for VPN, option C is for dynamic routing, and option D is for high-bandwidth connectivity.

961
Multi-Selectmedium

You need to select a Google Cloud database for a global e-commerce platform that requires strong consistency for inventory updates, but can tolerate eventual consistency for product reviews. Which THREE services would you consider appropriate for the different parts of the platform?

Select 3 answers
A.Bigtable for real-time user behavior tracking
B.BigQuery for storing product reviews
C.Firestore for product reviews
D.Cloud SQL for inventory
E.Cloud Spanner for inventory data
AnswersA, C, E

Bigtable can handle high-throughput write/read for real-time tracking with eventual consistency.

Why this answer

Bigtable is correct for real-time user behavior tracking because it is a fully managed, scalable NoSQL database designed for high-throughput, low-latency workloads like time-series data, user analytics, and event logging. It supports strong consistency for single-row operations, which is sufficient for tracking individual user events in real time, and can handle millions of writes per second across a global footprint.

Exam trap

Cisco often tests the misconception that BigQuery can serve as an operational database for storing and querying product reviews in real time, when in fact it is a data warehouse for analytics and not designed for transactional or low-latency read/write operations.

962
MCQmedium

An e-commerce platform uses Cloud SQL for PostgreSQL. They need to reduce read load on the primary instance and provide low-latency reads for geographically distributed users. Which configuration should they implement?

A.Add read replicas in multiple regions
B.Use Cloud CDN to cache database responses
C.Enable cross-region replication using Cloud SQL's built-in failover replica
D.Migrate to Cloud Spanner
AnswerA

Read replicas in different regions can serve read traffic locally, reducing latency and load on the primary.

Why this answer

Cloud SQL read replicas are used to offload read traffic and provide low-latency reads from different regions. They are asynchronous replicas that can be promoted in case of failure.

963
Multi-Selecthard

An organization is migrating from Oracle to Cloud SQL for PostgreSQL. They need to convert Oracle packages (which use PL/SQL) into PostgreSQL equivalents. Which TWO approaches are correct for handling Oracle packages?

Select 2 answers
A.Rewrite PL/SQL code into PL/pgSQL syntax.
B.Use pgAgent to schedule package execution.
C.Use Oracle compatibility mode in PostgreSQL.
D.Convert each package into a PostgreSQL schema containing functions and procedures.
E.Install the Orafce extension for Oracle compatibility.
AnswersA, D

PL/SQL must be converted to PL/pgSQL for PostgreSQL.

Why this answer

Oracle packages group procedures/functions. In PostgreSQL, the equivalent is to use schemas to namespace them. Additionally, converting PL/SQL to PL/pgSQL is required.

964
MCQeasy

Refer to the exhibit. A developer notices that instance-3 is in TERMINATED state. What is the most likely reason?

A.The instance was deleted
B.The instance had automatic restart disabled
C.The instance was preempted
D.The instance's zone was unavailable
AnswerB

With automatic restart disabled, the instance does not restart after failure, resulting in TERMINATED state.

Why this answer

When an instance's 'automatic restart' is disabled, the instance will not be automatically restarted after a host maintenance event or a failure. If the underlying host experiences an issue, the instance transitions to TERMINATED state instead of being migrated or restarted. This is the most likely reason for instance-3 being in TERMINATED state while other instances remain running.

Exam trap

The PCD exam often tests the distinction between 'automatic restart' (failure recovery) and 'onHostMaintenance' (planned maintenance behavior), causing candidates to confuse preemption or zone unavailability with the actual reason for a TERMINATED state.

How to eliminate wrong answers

Option A is wrong because deleting an instance would remove it from the list entirely or show it as 'DELETED', not 'TERMINATED'. Option C is wrong because preempted instances transition to 'STOPPED' or 'TERMINATED' only if the preemption policy is set to terminate, but preemption is a specific Google Cloud concept for short-lived, low-cost instances, and the question does not indicate preemptible configuration. Option D is wrong because if the zone were unavailable, all instances in that zone would be affected, not just instance-3, and the state would likely be 'UNAVAILABLE' or 'STOPPED', not 'TERMINATED'.

965
MCQmedium

A team is designing a disaster recovery plan for a critical application on Google Cloud. The application runs on Compute Engine with a regional persistent disk. They want to minimize data loss in case of a regional outage. Which strategy should they use?

A.Use persistent disk snapshot replication to another region
B.Create a snapshot schedule and store snapshots in the same region
C.Use synchronous replication across regions
D.Configure a managed instance group with autohealing
AnswerA

Snapshot replication to another region provides off-site backups that can be used to restore the application in a different region.

Why this answer

Persistent disk snapshot replication to another region is the correct strategy because snapshots are stored in Cloud Storage and can be replicated across regions. This allows you to restore the disk from a snapshot in a different region if the primary region experiences an outage, minimizing data loss by ensuring the backup is geographically separate. Regional persistent disks are synchronous within a region but do not provide cross-region replication, so snapshots are the recommended approach for cross-region disaster recovery.

Exam trap

The trap here is that candidates may confuse regional persistent disks' synchronous replication within a region (which is for high availability, not disaster recovery) with cross-region replication, leading them to incorrectly choose synchronous replication across regions, which is not supported for persistent disks.

How to eliminate wrong answers

Option B is wrong because storing snapshots in the same region does not protect against a regional outage; if the entire region fails, both the disk and its snapshots become inaccessible. Option C is wrong because synchronous replication across regions is not supported for persistent disks; Google Cloud offers asynchronous replication via snapshots or disk replication services, but synchronous cross-region replication would introduce unacceptable latency and is not a native feature. Option D is wrong because a managed instance group with autohealing only recovers instances within the same region, not the persistent disk data, and does not address data loss or regional outage scenarios.

966
MCQhard

You have a Cloud Bigtable instance with a single table that stores user events. You need to ensure that data older than 30 days is automatically deleted. What should you configure?

A.Set a garbage collection policy on the default column family to delete cells older than 30 days
B.Set a time-to-live (TTL) on the table
C.Use a cron job to manually delete rows with timestamps older than 30 days
D.Enable compaction and set a TTL on the table
AnswerA

Garbage collection policies on column families can delete based on age, e.g., max_age = 30 days.

Why this answer

Bigtable garbage collection policies operate on column families and can delete cells older than a specified time or keep a max number of versions.

967
MCQmedium

During a migration from MySQL to Cloud SQL, an engineer notices that the source database uses MyISAM tables with full-text indexes. What must be done to successfully migrate these tables to Cloud SQL (which uses InnoDB by default)?

A.Migrate the tables to Cloud Storage and use external tables.
B.Use the MEMORY storage engine instead.
C.Create the tables as MyISAM in Cloud SQL.
D.Convert the tables to InnoDB and recreate full-text indexes.
AnswerD

InnoDB supports full-text indexes; conversion is required.

Why this answer

Cloud SQL for MySQL uses InnoDB as its default storage engine and does not support MyISAM. Therefore, MyISAM tables with full-text indexes must be converted to InnoDB, and the full-text indexes must be recreated because InnoDB supports full-text indexes natively. Option D correctly identifies this required conversion and index recreation process.

Exam trap

Cisco often tests the misconception that Cloud SQL supports MyISAM because it is MySQL-compatible, but Cloud SQL only supports InnoDB, so candidates must recognize the need to convert storage engines and recreate full-text indexes.

How to eliminate wrong answers

Option A is wrong because Cloud Storage external tables are used for querying data in object storage, not for migrating MyISAM tables; they do not solve the storage engine incompatibility. Option B is wrong because the MEMORY storage engine is volatile and unsuitable for persistent data, and it does not support full-text indexes, making it an invalid replacement for MyISAM tables with full-text indexes. Option C is wrong because Cloud SQL for MySQL does not support the MyISAM storage engine; attempting to create tables as MyISAM will fail or be silently converted to InnoDB, losing the full-text indexes.

968
MCQeasy

A data engineering team needs to replicate data from a PostgreSQL database to BigQuery in near real-time for analytics. Which Google Cloud service is most suitable for this task with minimal setup?

A.Cloud SQL for PostgreSQL
B.Cloud Data Fusion
C.Cloud Composer
D.Datastream
AnswerD

Datastream is designed for serverless CDC replication, with native destinations including BigQuery.

Why this answer

Datastream is a serverless CDC replication service specifically designed for replicating from sources like PostgreSQL, MySQL, and Oracle to BigQuery, Cloud Storage, or Pub/Sub. It handles schema mapping and initial backfill.

969
MCQmedium

A company is migrating from Snowflake to BigQuery. They have a large dataset with semi-structured data stored as VARIANT columns in Snowflake. How should they represent this data in BigQuery?

A.Store as STRING and use JSON_EXTRACT functions.
B.Store as ARRAY<STRUCT<...>> (RECORD type) with nested fields.
C.Store as JSON data type and use JSON functions for queries.
D.Store as BYTES and handle encoding in application.
AnswerB

RECORD type is the native way to represent semi-structured data in BigQuery and offers best performance.

Why this answer

Snowflake's VARIANT type is used for semi-structured data like JSON. BigQuery has the RECORD (STRUCT) and REPEATED modes for nested and repeated data, and supports JSON data type (in preview) or storing as a STRING. The best practice is to use the native RECORD type to represent the structure for query performance and ease of use.

970
MCQeasy

A developer wants to run a single test suite across multiple environments (dev, staging, prod) using Cloud Build. What is the best practice?

A.Use Cloud Deploy to run tests in each environment.
B.Use separate branches for each environment.
C.Use a single Cloud Build trigger with substitutions to parameterize the environment.
D.Create separate Cloud Build triggers for each environment.
AnswerC

Substitutions allow dynamic values for environment-specific variables.

Why this answer

Option C is correct because Cloud Build triggers support substitutions (e.g., `$_ENV`) that allow a single trigger to parameterize the environment variable, enabling the same test suite to run across dev, staging, and prod without duplicating configuration. This aligns with Infrastructure as Code (IaC) principles and reduces maintenance overhead.

Exam trap

The PCD exam often tests the misconception that separate triggers or branches are required for environment isolation, when in fact Cloud Build's substitution mechanism is the recommended approach for parameterizing a single pipeline across multiple environments.

How to eliminate wrong answers

Option A is wrong because Cloud Deploy is designed for continuous delivery (rolling out releases to target environments), not for running test suites; it does not execute Cloud Build steps or test commands. Option B is wrong because using separate branches for each environment violates Git-based best practices (e.g., GitFlow or trunk-based development) and introduces merge conflicts, drift, and manual overhead. Option D is wrong because creating separate triggers for each environment duplicates configuration, increases maintenance burden, and violates DRY (Don't Repeat Yourself) principles; substitutions achieve the same goal more efficiently.

971
Multi-Selectmedium

You are designing a Cloud Bigtable schema for a time-series application. To optimize performance and avoid hot spots, which THREE row key design practices should you follow? (Choose 3)

Select 3 answers
A.Place the highest cardinality field (e.g., device ID) first in the row key
B.Use a single table for all data
C.Use sequential integers as row keys
D.Reverse the timestamp so that recent data does not create hot spots
E.Salt the key with a random prefix to distribute writes
AnswersA, D, E

High cardinality field first distributes rows across tablets.

Why this answer

Reversing timestamps, salting keys, and promoting high-cardinality fields to the start of the row key are recommended to distribute writes evenly.

972
MCQmedium

A developer wants to enable IAM database authentication for Cloud SQL for PostgreSQL. Which IAM role must be granted to a user or service account to allow login?

A.Cloud SQL Admin
B.Cloud SQL Connect
C.Cloud SQL Instance User
D.Cloud SQL Client
AnswerC

This role allows a user to connect to Cloud SQL using IAM database authentication.

Why this answer

Cloud SQL IAM database authentication for PostgreSQL requires the Cloud SQL Instance User role (roles/cloudsql.instanceUser) to be granted to a user or service account. This role allows the principal to log in to the database instance using IAM credentials, while the Cloud SQL Admin, Connect, and Client roles do not grant the specific login privilege needed for IAM-based database authentication.

Exam trap

The trap here is that candidates often confuse the Cloud SQL Client or Cloud SQL Connect roles with the ability to log in to the database, but those roles only allow network-level connectivity (e.g., via Cloud SQL Proxy) and do not grant the IAM login permission required for database authentication.

How to eliminate wrong answers

Option A is wrong because Cloud SQL Admin (roles/cloudsql.admin) grants full administrative control over Cloud SQL instances (create, modify, delete) but does not include the permission to log in to the database via IAM authentication. Option B is wrong because Cloud SQL Connect (roles/cloudsql.connect) allows connecting to Cloud SQL instances using Cloud SQL Proxy or private IP, but it does not grant the cloudsql.instances.login permission required for IAM database authentication. Option D is wrong because Cloud SQL Client (roles/cloudsql.client) provides permissions to connect to Cloud SQL instances and use Cloud SQL Proxy, but it lacks the specific cloudsql.instances.login permission needed for IAM-based database login.

973
MCQhard

A company is using Cloud Bigtable to serve real-time analytics. They notice that some queries are slow, and the Key Visualizer shows a narrow row key range receiving the majority of reads and writes. What is the most likely cause and recommended action?

A.The cluster has too few nodes; add more nodes to the cluster
B.Enable replication to a secondary cluster to offload reads
C.The storage type is HDD; switch to SSD to improve latency
D.A single row key prefix is being accessed heavily, causing a hot spot; redesign the row key to distribute load
AnswerD

The Key Visualizer indicates a hot spot, so row key design should be improved.

Why this answer

Hot spotting occurs when a small range of row keys is heavily accessed, causing uneven load distribution. Using a well-distributed row key design (e.g., salting) is the recommended solution.

974
MCQmedium

A team uses Cloud Build to build and deploy a Node.js application to App Engine flexible environment. The build succeeds, but the deployment fails with 'ERROR: (gcloud.app.deploy) Error Response: [9] Application startup error!' The team checks logs and sees 'Error: Module not found: 'express''. What is the most likely cause?

A.The build step includes 'npm test' which fails.
B.The Node.js version specified in app.yaml is incompatible with the dependencies.
C.The app.yaml file is missing from the root of the repository.
D.The dependencies are not installed during the build step before deploying.
AnswerD

Dependencies must be installed (e.g., npm install) for the app to run.

Why this answer

Option D is correct because the error 'Module not found: express' indicates that the Node.js dependencies (specifically the 'express' package) are not present in the deployed application. In Cloud Build, the build steps must explicitly install dependencies (e.g., via 'npm install') before the deploy step. If the build configuration does not include an 'npm install' step, the dependencies listed in package.json are not copied to the App Engine flexible environment, causing the startup error.

Exam trap

Cisco often tests the distinction between build-time and deployment-time errors, and the trap here is that candidates might confuse a missing app.yaml (a configuration error) with a missing dependency (a runtime error), or assume that npm install is automatically performed by Cloud Build when it is not.

How to eliminate wrong answers

Option A is wrong because 'npm test' failure would cause the build step to fail, not the deployment step; the error message specifically says the build succeeded but deployment failed. Option B is wrong because an incompatible Node.js version would typically cause a different error (e.g., syntax errors or runtime crashes), not a 'Module not found' error for a specific package. Option C is wrong because a missing app.yaml would cause a different error (e.g., 'ERROR: (gcloud.app.deploy) Could not find app.yaml') before the deployment even starts, not a startup error after deployment.

975
MCQmedium

An e-commerce company uses Cloud SQL for MySQL for transactional data and BigQuery for analytics. They need to replicate order data from Cloud SQL to BigQuery in near real-time with minimal latency. Which Google Cloud service should they use?

A.Cloud Dataflow
B.Cloud Pub/Sub
C.Datastream
D.Database Migration Service (DMS)
AnswerC

Datastream directly replicates CDC data from MySQL to BigQuery with low latency, serverless.

Why this answer

Datastream is a serverless CDC replication service that can stream changes from MySQL (including Cloud SQL) to BigQuery, GCS, or Pub/Sub with low latency. Dataflow requires building pipelines, DMS is for database migrations (not ongoing sync), and Pub/Sub alone doesn't load into BigQuery.

Page 12

Page 13 of 14

Page 14