Courseiva

Google Professional Cloud Database Engineer (PCDE) — Questions 12761350

1446 questions total · 20pages · All types, answers revealed

Page 17

Page 18 of 20

Page 19
1276
Multi-Selectmedium

Which TWO statements are true about designing a star schema for BI reporting?

Select 2 answers
A.Fact tables store descriptive attributes like product names
B.Dimension tables are denormalized to reduce the number of joins
C.Fact tables use natural keys to enforce referential integrity
D.Fact tables contain quantitative measures
E.Dimension tables are normalized to minimize redundancy
AnswersB, D

Denormalized dimensions allow joining directly to the fact table without additional joins.

Why this answer

Dimension tables in a star schema are intentionally denormalized to reduce the number of joins required for BI queries. This denormalization improves query performance by allowing fact tables to join directly to dimension tables without traversing multiple normalized tables, which is a key design principle for OLAP reporting.

Exam trap

Google Cloud often tests the misconception that dimension tables should be normalized for data integrity, but in star schemas for BI, denormalization is intentional to optimize query performance over normalization.

1277
MCQmedium

A team uses Cloud Build with a private pool to access resources in a VPC. After configuring the private pool, builds fail with a timeout error when pulling images from Artifact Registry. What is the most likely cause?

A.The Artifact Registry repository is in a different region than the private pool
B.The image name contains a typo
C.The Cloud Build service account lacks permissions to pull images from Artifact Registry
D.The private pool is not peered with the VPC that contains Artifact Registry
AnswerD

Private pools require VPC peering to access resources in the VPC; without it, network timeout occurs.

Why this answer

When using a Cloud Build private pool, the pool runs in a Google-managed environment that must be peered with your VPC to access internal resources. If the private pool is not peered with the VPC that contains Artifact Registry (which is a regional service accessible via Private Service Connect or VPC peering), the build worker cannot reach the Artifact Registry API endpoint over the private network, causing a timeout when pulling images. Option D directly addresses this missing network connectivity.

Exam trap

Google Cloud certification exams often test the distinction between permission errors (which produce explicit denial messages) and network connectivity errors (which produce timeouts), tempting candidates to select IAM-related options when the symptom is a timeout.

How to eliminate wrong answers

Option A is wrong because Artifact Registry is a regional service, and a private pool can pull images from any region as long as network connectivity exists; the timeout is not caused by a region mismatch. Option B is wrong because a typo in the image name would result in an 'image not found' error, not a timeout error. Option C is wrong because insufficient permissions would produce a 'denied' or 'unauthorized' error, not a timeout; the timeout indicates a network connectivity issue, not an IAM failure.

1278
Drag & Dropmedium

Arrange the steps to perform a point-in-time recovery (PITR) for a Cloud SQL instance.

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

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

Why this order

PITR requires backups and binary logs enabled; then you create a new instance from backup at the specific time.

1279
MCQmedium

A company uses BigQuery for real-time BI. They have a table with streaming inserts. Analysts run queries that need to see data within seconds. However, they notice that streaming data appears with a delay of up to 2 minutes. What is the most likely reason?

A.The query uses cached results.
B.The table is partitioned by hour.
C.The streaming buffer's flush interval is set to 2 minutes.
D.The table has a clustering key.
AnswerC

By default, BigQuery flushes streaming buffers every 90 seconds; configuration can change this.

Why this answer

BigQuery's streaming buffer has a default flush interval of up to 90 seconds, but it can be configured. When the flush interval is set to 2 minutes, data written via streaming inserts remains in the buffer for that duration before being committed to the table, causing a delay of up to 2 minutes before it becomes visible to queries. This matches the symptom described in the question.

Exam trap

Google Cloud often tests the misconception that partitioning or clustering directly affects data freshness, when in fact they only impact storage organization and query performance, not the latency of streaming data visibility.

How to eliminate wrong answers

Option A is wrong because cached results only affect query performance, not the freshness of streaming data; cached results are served from a temporary cache and do not delay the visibility of newly streamed data. Option B is wrong because partitioning by hour does not inherently introduce a delay; it organizes data into partitions but does not control when streaming data becomes available for queries. Option D is wrong because a clustering key improves query performance by sorting data within partitions, but it has no impact on the latency of streaming data appearing in query results.

1280
MCQeasy

A company is designing a schema for time-series sensor data in Cloud Spanner. They need to efficiently query the latest reading for each sensor. Which schema design is most appropriate?

A.Use a single table with columns for each sensor and wide rows
B.Use Cloud SQL with a normalized schema
C.Create a Sensors table and an interleaved Readings table with primary key (SensorId, Timestamp DESC)
D.Use Cloud Bigtable with row keys (SensorId#Timestamp)
AnswerC

Correct: Interleaved hierarchy with descending timestamp allows efficient latest row retrieval per sensor.

Why this answer

The most appropriate because it uses an interleaved Readings table under the Sensors table with the primary key (SensorId, Timestamp DESC). This allows efficient retrieval of the latest reading for each sensor by taking the first row per SensorId using the descending timestamp order. Interleaving ensures that rows for the same sensor are stored together, minimizing cross-node reads.

Option A (single table with wide rows) leads to large rows and poor scalability. Option B (Cloud SQL) is not designed for high-throughput time-series data at scale. Option D (Bigtable) is a good choice for time-series but the question specifically requires using Cloud Spanner.

1281
MCQmedium

A company is using BigQuery for BI and needs to reduce costs for a large historical dataset that is infrequently queried. Which approach should they take?

A.Use materialized views for common aggregations.
B.Use clustered tables.
C.Partition by ingestion time and set expiration on partitions older than 90 days.
D.Use a view with a WHERE clause filtering recent data.
AnswerC

Expired partitions are deleted, reducing storage costs.

Why this answer

Partitioning by ingestion time allows BigQuery to automatically manage data lifecycle by setting partition expiration. This reduces storage costs for historical data that is infrequently queried, as partitions older than 90 days are deleted without manual intervention. This approach directly addresses the need to reduce costs for a large historical dataset while maintaining query performance on recent data.

Exam trap

Google Cloud often tests the distinction between cost reduction and performance optimization, leading candidates to choose clustering or materialized views (which improve query speed) instead of the storage lifecycle management solution that directly reduces costs.

How to eliminate wrong answers

Option A is wrong because materialized views improve query performance for common aggregations but do not reduce storage costs for historical data; they actually incur additional storage costs for the precomputed results. Option B is wrong because clustered tables optimize query performance by sorting data within partitions but do not reduce storage costs or automatically expire old data. Option D is wrong because a view with a WHERE clause filtering recent data only limits the data scanned at query time, but the underlying historical data remains in storage and continues to incur costs.

1282
MCQeasy

A developer is setting up a Memorystore for Redis instance and needs to restrict access to only a specific Compute Engine VM in the same VPC network. Which configuration should they use?

A.Use Cloud Armor to whitelist the VM's external IP
B.Use the AUTH password and share it only with the VM
C.Configure the Memorystore instance with a firewall rule that allows only the VM's internal IP
D.Place the Redis instance in a separate VPC and peer only with the VM's VPC
AnswerC

Correct. Firewall rules can be applied to the VPC to restrict inbound traffic to the Memorystore instance's IP range from only the VM's IP.

Why this answer

Memorystore for Redis uses Private Service Access and requires authorizing a VPC network to access the instance. After authorizing the VPC network, you can restrict access to a specific Compute Engine VM by applying a firewall rule in that VPC that allows traffic from only that VM's internal IP to the Memorystore instance. This is the most granular control available without using additional authentication like AUTH.

1283
MCQhard

A Bigtable cluster has 10 nodes and is experiencing 90% CPU utilization, causing increased latency. The workload is mostly random reads (70%) and writes (30%). The table has 50TB of data, and the row key design is efficient. What is the best way to reduce CPU utilization?

A.Increase the number of nodes to 20.
B.Add SSDs instead of HDDs.
C.Enable replication for read offloading.
D.Compact the table to reduce SSTable count.
AnswerA

Adding nodes increases total throughput and reduces per-node CPU, alleviating the bottleneck.

Why this answer

Increasing the number of nodes distributes the load and reduces CPU per node, directly addressing the high utilization. Adding SSDs or compaction may help marginally but not as effectively as adding nodes.

1284
MCQeasy

Based on the exhibit, what is the primary key of the Readings table?

A.(SensorId, Timestamp)
B.(SensorId, SensorType)
C.(SensorId)
D.(ReadingsId)
AnswerA

The DDL explicitly defines this as the primary key.

Why this answer

The Readings table captures sensor measurements over time, so the natural primary key is the combination of SensorId and Timestamp, which uniquely identifies each reading. This is a classic example of a composite primary key in relational database design, ensuring that no two readings from the same sensor at the same time can exist.

Exam trap

The Google Professional Data Engineer exam often tests the misconception that a single column like SensorId can serve as a primary key, when in fact the combination of SensorId and Timestamp is required to guarantee uniqueness in a time-series table.

How to eliminate wrong answers

Option B is wrong because (SensorId, SensorType) is not unique — a sensor has a fixed SensorType, so multiple readings for that sensor would have the same pair, violating primary key uniqueness. Option C is wrong because (SensorId) alone cannot be a primary key — a single sensor produces many readings over time, so SensorId is not unique across rows. Option D is wrong because ReadingsId is not mentioned in the exhibit; the table likely does not include a surrogate key, and the question asks for the primary key based on the given schema, not an artificial one.

1285
Multi-Selecthard

A company runs a Bigtable instance for time-series data. They need to reduce storage costs without compromising query performance for the most recent 30 days. Which two strategies should they implement?

Select 2 answers
A.Increase the number of cluster nodes to improve compaction
B.Use Cloud Storage as a cold storage tier for historical data
C.Enable Bigtable replication and delete data from one cluster
D.Set garbage collection to delete data older than 30 days
E.Reduce the number of cluster nodes to save costs
AnswersB, D

Export old data to Cloud Storage and delete from Bigtable.

Why this answer

The question asks for two strategies to reduce storage costs without compromising query performance for the most recent 30 days. The correct strategies are Option B (using Cloud Storage as a cold storage tier for historical data) and Option D (setting garbage collection to delete data older than 30 days). Option B offloads old data to cheaper storage while keeping recent data in Bigtable for fast access.

Option D automates deletion of stale data, reducing storage footprint without affecting recent queries. The other options are incorrect: increasing nodes (A) raises costs, replication with deletion (C) risks data loss, and reducing nodes (E) would degrade performance for recent data.

Exam trap

Google Cloud often tests the misconception that reducing cluster nodes or increasing nodes is a direct cost-saving strategy, but candidates must remember that performance requirements (especially for recent data) dictate node count, and cost savings must come from data lifecycle management, not infrastructure scaling.

1286
Multi-Selectmedium

You are designing a disaster recovery plan for a Cloud Bigtable instance. The instance has a single cluster in us-east1. You need to ensure that if the cluster becomes unavailable, the database can still serve read and write requests with minimal downtime. Which THREE steps should you take? (Choose three.)

Select 3 answers
A.Ensure the application can handle eventual consistency between clusters.
B.Enable synchronous replication between clusters.
C.Add a second cluster in a different zone (e.g., us-east1-b) and enable replication.
D.Configure the application to route traffic to the secondary cluster in case of primary failure.
E.Take a full backup of the table to Cloud Storage daily.
AnswersA, C, D

Bigtable replication is asynchronous, so occasional stale reads are possible.

Why this answer

Cloud Bigtable uses eventual consistency for replication across clusters. When you add a second cluster and enable replication, data is replicated asynchronously, so writes to one cluster are not immediately visible in the other. The application must be designed to handle eventual consistency to avoid reading stale data after a failover.

Option C is correct: adding a second cluster in a different zone (within the same region or a different region) and enabling replication provides redundancy. If the primary cluster fails, the secondary cluster can serve requests. Option D is correct: the application must be configured to route traffic to the secondary cluster in case of primary failure.

This can be achieved by using Cloud Bigtable's built-in failover mechanism or by implementing client-side routing logic. Without this routing, traffic would still be directed to the failed primary cluster, causing downtime.

Exam trap

Google Cloud often tests the misconception that synchronous replication is available in Cloud Bigtable, but the service only supports asynchronous replication. Candidates may also incorrectly think that daily backups are sufficient for high availability instead of using multi-cluster replication.

1287
MCQmedium

A company uses Cloud Build to deploy to Google Kubernetes Engine (GKE). They want to use a Helm chart stored in a Cloud Storage bucket. What should they do in the cloudbuild.yaml?

A.Use `kubectl apply -f` with the Helm chart URL
B.Use `helm repo add` with a GCS bucket URL
C.Store the chart in Artifact Registry and use `helm install` from there
D.Use the `gcloud storage cp` command to copy the chart, then run `helm upgrade`
AnswerD

Correct: download chart from GCS, then use Helm.

Why this answer

Cloud Build cannot directly access a Helm chart stored in a Cloud Storage bucket. You must first copy the chart to the build environment using `gcloud storage cp`, then run `helm upgrade` to deploy it to GKE. This ensures the chart is locally available for Helm to process.

Exam trap

Google often tests the misconception that Helm can directly consume a chart from a URL or cloud storage without explicit download, or that `kubectl apply` can interpret Helm charts as Kubernetes manifests.

How to eliminate wrong answers

Option A is wrong because `kubectl apply -f` expects a Kubernetes manifest (YAML/JSON), not a Helm chart URL; Helm charts are not raw Kubernetes resources. Option B is wrong because `helm repo add` with a GCS bucket URL is not supported by Helm natively; Helm does not have a built-in GCS repository protocol. Option C is wrong because while Artifact Registry can host Helm charts, the question explicitly states the chart is stored in a Cloud Storage bucket, so migrating to Artifact Registry is not the required action.

1288
MCQmedium

An engineer is designing a Bigtable row key for global user events. They want to avoid hotspots and enable efficient queries by user_id and time range. Which row key design is best?

A.hash(user_id) + timestamp
B.reverse(timestamp) + user_id
C.user_id + timestamp
D.timestamp + user_id
AnswerA

Hash prefix distributes writes, timestamp enables time-based queries.

Why this answer

Using a hash of user_id ensures distribution, and appending timestamp enables range scans by time within a user's events.

1289
Multi-Selecthard

A company wants to reduce BigQuery query costs for their BI workloads. Which THREE actions effectively lower the amount of data processed per query? (Choose THREE.)

Select 3 answers
A.Use partitioned tables on date column
B.Use LIMIT in subqueries to reduce output
C.Use clustered tables on frequently filtered columns
D.Use SELECT * to avoid missing columns
E.Use materialized views that match common query patterns
AnswersA, C, E

Partitioning limits query scans to relevant partitions, cutting bytes.

Why this answer

Partitioned tables in BigQuery allow queries to use the WHERE clause to filter on the partition column (e.g., a date column), so BigQuery can prune entire partitions from the scan. This directly reduces the amount of data read and billed, lowering query costs. Option A is correct because it is a primary cost-control mechanism in BigQuery.

Exam trap

Google Cloud often tests the misconception that row-limiting clauses like LIMIT reduce data processing costs, but in BigQuery, only column and partition pruning reduce the bytes scanned.

1290
MCQeasy

Your organization requires that all database backups be stored in a different region for disaster recovery. You are using Cloud SQL for MySQL. What backup configuration should you use?

A.Enable automated backups and select the same region as the instance.
B.Enable automated backups and select a different region for the backup location.
C.Use on-demand exports to Cloud Storage in the same region.
D.Configure a multi-region Cloud Storage bucket and point automated backups there.
AnswerB

This meets the cross-region DR requirement.

Why this answer

Cloud SQL for MySQL allows you to specify a different region for automated backup storage, which satisfies the disaster recovery requirement of storing backups in a separate region. By selecting a different region for the backup location, you ensure that if the primary region fails, the backups remain accessible for recovery. This is the only built-in option that directly meets the cross-region backup requirement without additional manual steps.

Exam trap

Google Cloud often tests the misconception that automated backups can be directed to a multi-region Cloud Storage bucket, but Cloud SQL only supports a single-region backup location for automated backups, not multi-region or dual-region buckets.

How to eliminate wrong answers

Option A is wrong because selecting the same region as the instance does not provide disaster recovery isolation; a regional failure would affect both the instance and its backups. Option C is wrong because on-demand exports to Cloud Storage in the same region also lack cross-region redundancy; the backups remain vulnerable to the same regional outage. Option D is wrong because Cloud SQL automated backups cannot be pointed to a multi-region Cloud Storage bucket; automated backups are stored in Cloud SQL's internal backup storage, not in a user-managed bucket, and the backup location must be a single region.

1291
MCQhard

A company uses Cloud Monitoring SLO monitoring with error budget alerts. They set a slow burn alert with a 5x burn rate over a 6-hour window. If the error budget is 0.1% over 30 days, approximately how long would it take to exhaust the budget at a 5x burn rate?

A.12 hours
B.6 hours
C.6 days
D.30 days
AnswerC

Correct: 30 days / 5 = 6 days.

Why this answer

At 5x burn rate, the budget lasts 1/5 of the SLO period. 30 days / 5 = 6 days. The 6-hour window is used to detect this burn rate early.

1292
Multi-Selectmedium

A company is designing a disaster recovery strategy for their Cloud Spanner database. They need an RPO of less than 30 seconds and an RTO of less than 1 minute. Which two configurations would meet these requirements? (Choose TWO)

Select 2 answers
A.Cross-region backup and restore
B.Multi-region configuration with read-write replicas (e.g., nam3)
C.Point-in-time recovery (PITR)
D.Regional instance
E.Multi-region configuration with read-only replicas
AnswersB, D

A multi-region configuration with read-write replicas provides automatic failover with RPO ~15s and RTO < 1min.

Why this answer

The correct answers are B and D. A multi-region configuration with read-write replicas (e.g., nam3) provides automatic failover across regions with an RPO of approximately 15 seconds and an RTO of less than 1 minute, meeting the requirements for region-level failures. A regional instance in Cloud Spanner provides synchronous replication within the region, achieving an RPO of zero and an RTO of seconds, which meets the requirements for zone-level failures within a region.

Option A (cross-region backup and restore) typically has an RPO of hours and RTO of hours, so it does not meet the strict RPO/RTO. Option C (point-in-time recovery) provides RPO of seconds to minutes but depends on backups and may not achieve RTO <1 minute for restore operations. Option E (multi-region with read-only replicas) does not support automatic failover because read-only replicas cannot become the new leader, so failover is not automatic and RTO would be longer.

1293
MCQhard

A company uses BigQuery BI Engine for sub-second query performance. However, some queries are hitting the BI Engine memory limit. Which action should be taken?

A.Cluster the tables more granularly.
B.Increase BI Engine capacity allocation.
C.Use a reservation with a higher slot count.
D.Optimize the dimension tables by denormalizing.
AnswerB

Allocating more memory to BI Engine allows caching larger datasets.

Why this answer

BI Engine is an in-memory analysis service that accelerates queries by caching data in memory. When queries exceed the allocated memory, they spill to disk, causing performance degradation. Increasing the BI Engine capacity allocation directly addresses this by providing more memory for caching, enabling sub-second query performance for larger datasets.

Exam trap

Google Cloud often tests the misconception that increasing slot count (compute) solves memory bottlenecks, but BI Engine memory is a separate resource that must be explicitly allocated; candidates confuse slot-based reservations with in-memory caching.

How to eliminate wrong answers

Option A is wrong because clustering tables more granularly improves partition pruning and data skipping but does not increase the memory available to BI Engine; it may even increase memory pressure by creating more fine-grained data segments. Option C is wrong because a reservation with a higher slot count increases query concurrency and compute resources, not the in-memory cache size for BI Engine; slots and BI Engine memory are separate resources. Option D is wrong because denormalizing dimension tables reduces join complexity but does not expand BI Engine's memory limit; it could actually increase the data volume cached, exacerbating the memory issue.

1294
MCQeasy

An SRE team wants to track the amount of toil their team performs each week. According to SRE best practices, what is the recommended maximum percentage of time that should be spent on toil?

A.25%
B.10%
C.50%
D.75%
AnswerC

Correct: SRE practice suggests a 50% toil budget.

Why this answer

Google SRE recommends that teams spend no more than 50% of their time on toil, leaving the rest for engineering work that reduces future toil or improves the service.

1295
MCQhard

An organization uses GitOps with Config Sync to manage multiple GKE clusters. They want to automatically deploy a new version of a microservice by pushing to a Git repository. Which component validates and applies the changes to the clusters?

A.Cloud Build trigger
B.Admission webhook
C.Anthos Service Mesh
D.Config Sync reconciler
AnswerD

The reconciler continuously syncs the cluster state with the Git repository.

Why this answer

Config Sync's core component is the 'reconciler', which runs in each cluster, watches the Git repo, and applies changes to ensure cluster state matches the repo. The 'admission webhook' provides validation but does not apply.

1296
MCQmedium

Refer to the exhibit. The query joins two large tables and aggregates results. Which optimization would most likely reduce the high shuffle bytes in Stage 3?

A.Add a WHERE clause to filter rows before the join.
B.Ensure both tables are clustered on the join key.
C.Use a broadcast join hint to force one table to be broadcast.
D.Add an ORDER BY clause to sort the data before aggregation.
AnswerA

Filtering early reduces the data that needs to be shuffled.

Why this answer

Adding a WHERE clause before the join reduces the amount of data that needs to be shuffled across the network in Stage 3. In Spark SQL (the engine behind Databricks and many PCDE scenarios), predicate pushdown filters rows early, minimizing the input to the join and subsequent aggregation, which directly reduces shuffle bytes.

Exam trap

Candidates often assume that clustering on join keys or using broadcast join hints will always reduce shuffle bytes, but in Google Cloud Data Engineering, the most direct optimization is to filter rows before the join (predicate pushdown) to reduce the data volume at the source.

How to eliminate wrong answers

Option B is wrong because clustering on the join key can improve join performance by reducing data movement, but it does not reduce shuffle bytes in Stage 3 if the tables are already large and the join still requires a full shuffle; clustering helps with file skipping and bucketing but not with filtering data volume before the join. Option C is wrong because a broadcast join hint forces one table to be sent to all executors, which can reduce shuffle for small tables, but if both tables are large, broadcasting one will cause out-of-memory errors and does not reduce shuffle bytes—it actually increases network traffic. Option D is wrong because adding an ORDER BY clause before aggregation introduces an additional full sort operation, which increases shuffle bytes and processing time, rather than reducing them.

1297
MCQhard

You are designing a distributed tracing strategy for a multi-service application deployed on Cloud Run and GKE. You need to ensure that all traces are captured with 100% sampling for the first 10 minutes after a new deployment, and then reduce to 10% sampling to control costs. Which approach should you use?

A.Use OpenTelemetry SDK with a custom sampler that checks the deployment timestamp stored in an environment variable, and send traces to the OpenTelemetry Collector configured to export to Cloud Trace.
B.Use Stackdriver Trace's automatic instrumentation on GKE and Cloud Run, and adjust the sampling rate via the Cloud Trace API after deployment.
C.Use Cloud Trace's built-in probabilistic sampler and configure it with 10% sampling in the configuration file.
D.Enable Cloud Trace on all services and use Cloud Monitoring alert on trace count to trigger a Cloud Function that changes the sampling rate.
AnswerA

This allows dynamic sampling rules based on deployment time. The custom sampler can implement the required logic.

Why this answer

Cloud Trace supports probability-based sampling, but to change the sampling rate based on time since deployment, you need more control. Using OpenTelemetry with a custom sampler in the application allows you to implement a rule: sample 100% if the deployment timestamp is within the last 10 minutes, else sample 10%. The OTel Collector can then export to Cloud Trace.

Cloud Trace's built-in sampling is static.

1298
MCQmedium

A company uses Cloud Spanner with a schema that has a table 'Orders' with primary key (CustomerId, OrderDate, OrderId). They notice hotspots on a specific customer. Which schema change would best distribute load?

A.Use a secondary index on CustomerId.
B.Split the table into multiple tables per region.
C.Add a hash of CustomerId as a prefix to the primary key.
D.Change primary key to OrderId only.
AnswerC

Hash prefix distributes writes evenly across nodes, reducing hotspots.

Why this answer

Hotspots occur due to concentrated traffic on a single key range, such as a specific customer's orders. Adding a hash of CustomerId as a prefix to the primary key (Option C) distributes writes across multiple splits, alleviating the hotspot. Option A (secondary index) improves read performance but does not affect write distribution.

Option B (splitting by region) adds complexity without directly addressing the key-ordering issue. Option D (OrderId only) loses the natural ordering and may still cause hotspots on the most recent OrderId.

1299
MCQmedium

A BI analyst wrote a query that computes the running total of sales over time for each product. The query uses a window function with an ORDER BY clause. The results are correct, but the query processes a large amount of data and is slow. What is the most efficient way to optimize this query?

A.Use the LAG function instead of a window function.
B.Materialize the running total in a separate table using a scheduled query.
C.Use the ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW frame.
D.Add a PARTITION BY clause to the window function.
AnswerD

Partitioning by product limits the window operation to individual product groups, reducing sorting and shuffle.

Why this answer

Adding a PARTITION BY clause to the window function allows the running total to be computed independently for each product, which reduces the data set the window function must sort and aggregate over. Without PARTITION BY, the query computes a single running total across all products, forcing the database engine to process the entire table as one partition, which is inefficient for large datasets. Partitioning by product ensures that the ORDER BY and frame operations are scoped to each product group, significantly reducing memory and CPU usage.

Exam trap

Google Cloud often tests the misconception that explicitly specifying the default frame (ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) improves performance, when in fact the key optimization for a running total over multiple groups is to add a PARTITION BY clause to limit the scope of the window function.

How to eliminate wrong answers

Option A is wrong because the LAG function accesses a previous row's value but does not compute a running total; it would require additional logic to accumulate values, which would be even less efficient and more complex. Option B is wrong because materializing the running total in a separate table with a scheduled query does not optimize the existing query; it introduces data staleness and maintenance overhead, and the original query still runs slowly until the materialized table is built. Option C is wrong because ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW is the default frame for a running total when ORDER BY is used; explicitly specifying it does not change the execution plan or improve performance, as the database already uses that frame by default.

1300
MCQeasy

Your Cloud Bigtable instance is experiencing high latency for certain row key ranges. You suspect a hotspot is developing. Which Google Cloud tool should you use to visualize and diagnose the hotspot?

A.Key Visualiser
B.Cloud Monitoring dashboard to check CPU utilization per node
C.Bigtable's built-in 'hotspot detection' alert in Cloud Monitoring
D.Cloud Logging to review request logs and identify slow queries
AnswerA

Key Visualiser is the correct tool for detecting hotspots in Bigtable.

Why this answer

Key Visualiser is a tool specifically designed for Bigtable to identify hotspots and access patterns by visualizing row key distribution and traffic. It helps pinpoint uneven load distribution.

1301
MCQhard

An application running on Cloud Run is automatically instrumented with Cloud Trace, but the trace sampling rate is too high, causing excessive costs. How can the engineer reduce the sampling rate?

A.Set the environment variables OTEL_TRACES_SAMPLER to 'traceidratio' and OTEL_TRACES_SAMPLER_ARG to a value between 0 and 1.
B.Disable Cloud Trace and use only Cloud Monitoring metrics.
C.Modify the Cloud Trace API quota to limit trace ingestion.
D.Configure the trace sampling rate in the Cloud Monitoring alert policy.
AnswerA

Setting the environment variable 'TRACE_SAMPLE_RATE' is not correct; Cloud Run uses OpenTelemetry environment variables 'OTEL_TRACES_SAMPLER' and 'OTEL_TRACES_SAMPLER_ARG' to control sampling rate. This option is partially correct in concept but uses the wrong variable names.

Why this answer

To reduce the trace sampling rate in Cloud Run, configure the OpenTelemetry environment variables: set OTEL_TRACES_SAMPLER to 'traceidratio' and OTEL_TRACES_SAMPLER_ARG to the desired fraction (e.g., 0.1 for 10% sampling). The other options are incorrect because they either disable tracing entirely, adjust the wrong quota, or configure monitoring alerts instead of the tracing sampling rate.

Exam trap

Candidates may mistakenly use a generic environment variable like 'TRACE_SAMPLE_RATE' instead of the OpenTelemetry-specific variables required by Cloud Run.

1302
Multi-Selectmedium

Which TWO components are essential for setting up an incident management on-call rotation in Google Cloud? (Choose 2)

Select 2 answers
A.Cloud Monitoring alert notification channels
B.On-call schedule defined in PagerDuty or OpsGenie
C.Cloud Build trigger for incidents
D.Cloud Functions to handle alerts
E.Traffic Director routing rules
AnswersA, B

Used to send alerts to on-call tools.

Why this answer

Cloud Monitoring alert notification channels are used to route alerts to on-call tools like PagerDuty or OpsGenie. An on-call schedule defines who is on call. The other options are not directly related.

1303
MCQhard

A DevOps team is implementing chaos engineering for their Cloud SQL for PostgreSQL database. They want to simulate a zone failure that triggers automatic failover of their HA instance without causing data loss. Which approach should they use?

A.Stop the Cloud SQL instance using gcloud sql instances patch --activation-policy NEVER
B.Use the gcloud sql instances failover command
C.Restrict network access to the primary instance
D.Delete the primary database
AnswerB

The 'gcloud sql instances failover' command triggers a graceful failover to the standby zone, simulating a zone failure without data loss.

Why this answer

Cloud SQL HA instances have automatic zone failover. To simulate a zone failure, you can use the gcloud command to trigger failover manually. This performs a planned failover that switches to the standby zone without data loss, mimicking a zone outage.

1304
MCQeasy

What is the primary purpose of an error budget?

A.To measure team performance for annual reviews
B.To define the maximum acceptable downtime in a contract
C.To track the total number of errors in a system
D.To balance reliability and innovation by allowing a controlled amount of failure
AnswerD

Error budgets enable teams to decide when to slow down deployments.

Why this answer

Error budgets are the permissible amount of unreliability (100% - SLO). They allow teams to balance reliability with feature velocity: if budget remains, teams can deploy new features; if depleted, focus on reliability.

1305
MCQmedium

An application running on Google Kubernetes Engine (GKE) emits structured logs in JSON format. The DevOps team wants to count the number of log entries that contain a specific error code (e.g., 'error_code': 500) in the last hour and use that count to trigger an alert if it exceeds a threshold. What is the most efficient way to achieve this?

A.Use Cloud Logging's Logs Explorer to run a query every minute and use Cloud Scheduler to trigger a Cloud Function that checks the count.
B.Create a log-based counter metric in Cloud Logging with the filter jsonPayload.error_code=500, then set up an alerting policy on that metric.
C.Export logs to BigQuery and run a scheduled query to count error codes, then use the result to trigger an alert via Cloud Monitoring.
D.Configure a metric threshold alert directly on the log entries in Cloud Monitoring without creating a metric.
AnswerB

Log-based metrics automatically count matching log entries and export them as a metric to Cloud Monitoring, enabling alerting and dashboards with minimal overhead.

Why this answer

Creating a log-based metric from the logs is the most efficient approach. You can define a counter metric that increments each time a log entry matches the filter (e.g., jsonPayload.error_code=500). Then you can set up an alerting policy on that metric.

This avoids scanning logs in real-time and provides a metric that can be used for dashboards and alerts.

1306
MCQhard

A financial services firm runs a multi-region Spanner instance with the nam-eur-asia1 configuration. They need to ensure that if the leader region (us-central1) becomes unavailable, failover to another region occurs automatically within 1 minute. What is the expected RPO and RTO for this scenario?

A.RPO ~ 15 seconds, RTO < 1 minute
B.RPO ~ 0, RTO ~ 15 seconds
C.RPO ~ 1 hour, RTO ~ 5 minutes
D.RPO = 0, RTO < 1 minute
AnswerA

This matches Spanner's documented RPO and RTO for multi-region failover.

Why this answer

Spanner multi-region configurations provide automatic failover with RTO under 1 minute. For the nam-eur-asia1 configuration, it is a multi-region with multiple read-write replicas. The RPO is approximately 15 seconds because Spanner uses quorum-based replication; in the event of a region failure, a small number of recent transactions may be uncommitted.

1307
Drag & Dropmedium

Order the steps to troubleshoot a connection timeout from an application to Cloud SQL.

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

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

Why this order

Start with logs, then verify configuration, authorization, test connectivity, and check instance status.

1308
MCQhard

A Cloud Spanner database uses a sequential customer ID as the primary key, causing frequent hotspotting on a single split. The team needs to eliminate hotspots. Which key design should they implement?

A.Use a composite key with a monotonically increasing timestamp as the first part
B.Use a random UUID as the primary key
C.Add a hash prefix derived from the customer ID
D.Keep the sequential key but add a secondary index
AnswerC

Hashing the key distributes writes evenly across splits.

Why this answer

Hotspots occur with monotonically increasing keys. Using a hash prefix or UUID spreads writes across splits. Bit-reverse is another technique for integers.

The simplest is to add a hash prefix to the key.

1309
MCQmedium

A team uses Helm charts to deploy applications to GKE. They need to manage environment-specific configurations (e.g., dev, staging, prod) using a single chart. Which tool should they use?

A.Kustomize
B.Skaffold
C.Config Connector
D.Helm with values files
AnswerD

Helm uses values.yaml files for environment-specific overrides, making it the correct choice.

1310
MCQeasy

A company is designing a data warehouse for business intelligence reporting. They want to organize data into fact and dimension tables to support fast aggregations. Which schema design is most appropriate for this purpose?

A.Star schema
B.Third Normal Form (3NF) schema
C.Snowflake schema
D.Entity-relationship schema
AnswerA

Star schema denormalizes dimensions into a single table per dimension, enabling fast aggregation and simple joins.

Why this answer

The star schema is most appropriate for business intelligence reporting because it denormalizes dimension tables around a central fact table, enabling fast aggregations and simple queries. This design minimizes the number of joins required for analytical queries, which is critical for performance in OLAP workloads. In contrast, normalized schemas like 3NF or snowflake increase join complexity and degrade query speed.

Exam trap

Google Cloud often tests the misconception that a snowflake schema is better for BI because it saves storage, but the exam emphasizes that query performance and simplicity for aggregation are the primary goals, making the star schema the correct choice.

How to eliminate wrong answers

Option B is wrong because a Third Normal Form (3NF) schema is highly normalized to eliminate data redundancy, which is optimal for OLTP transaction processing but introduces many joins that slow down BI aggregations. Option C is wrong because a snowflake schema normalizes dimension tables into sub-dimensions, reducing storage but increasing join depth and query complexity, which can hurt performance in high-volume reporting. Option D is wrong because an entity-relationship schema is a generic modeling approach used for database design, not a specific schema optimized for BI fact-dimension aggregation; it lacks the denormalized structure needed for fast star-join queries.

1311
MCQhard

An organization uses Cloud Deploy to promote releases across dev, staging, and prod. They want to automatically run integration tests after a deployment to a Cloud Run target, before proceeding to the next stage. How should they implement this?

A.Create a separate Cloud Build trigger that runs tests after detecting the deployment
B.Use a preDeploy hook on the staging target to run tests
C.Configure a postDeploy hook on the staging target that runs a Cloud Run Job for integration tests
D.Add an approval gate after staging that requires manual test results
AnswerC

postDeploy hooks run after the deployment, suitable for running tests.

Why this answer

Cloud Deploy supports deployment hooks: custom scripts that run before (preDeploy) or after (postDeploy) a deployment. postDeploy hooks run after the target is deployed and can be implemented as Cloud Run Jobs.

1312
MCQmedium

An organization wants to set up a landing zone with separate projects for development, staging, and production environments. They also need a shared VPC for networking and a centralized logging project. Which folder structure aligns with Google Cloud best practices?

A.Create a single folder /landing-zone and put all projects there.
B.Create folders: /dev, /staging, /prod. Place all projects directly under the root.
C.Create folders: /environments/dev, /environments/staging, /environments/prod, and /common. Place networking and logging projects in /common.
D.Create folders: /prod, /non-prod, /shared. Put dev and staging in /non-prod.
AnswerC

This follows the recommended pattern of environment folders and a common folder for shared infrastructure.

Why this answer

It follows Google Cloud best practices by separating environments (dev, staging, prod) into their own folder under an /environments parent, and placing shared resources like networking and logging into a /common folder. This structure enables consistent IAM policy inheritance, resource isolation, and centralized management of shared services, which is critical for a landing zone in a DevOps pipeline.

Exam trap

The trap here is that candidates often think a flat folder structure or grouping by production vs. non-production is sufficient, but Google Cloud best practices require separate environment folders and a dedicated common folder for shared services to ensure proper IAM inheritance and resource isolation.

How to eliminate wrong answers

Option A is wrong because placing all projects in a single /landing-zone folder prevents granular IAM policy inheritance and resource isolation between environments, violating the principle of least privilege. Option B is wrong because placing projects directly under the root organization node bypasses folder-level policy inheritance and makes it impossible to apply environment-specific controls without manual per-project configuration. Option D is wrong because grouping dev and staging under /non-prod conflates non-production environments, which often have different compliance and access requirements, and fails to provide a dedicated folder for shared resources like networking and logging.

1313
MCQmedium

A DevOps team uses Terraform to manage infrastructure. They want to store state files in a shared backend that supports locking and versioning. Which backend meets these requirements?

A.Consul backend
B.Google Cloud Storage (GCS) backend
C.Local backend
D.Terraform Cloud backend
AnswerB

GCS backend supports remote state, locking via object versioning (enable versioning on bucket), and is the standard choice for Terraform on GCP.

Why this answer

The Google Cloud Storage (GCS) backend is correct because it natively supports state file locking via object write consistency and versioning through object versioning, which are essential for preventing concurrent state corruption and enabling state rollback. Terraform's GCS backend uses a write-lock mechanism that relies on GCS's strong consistency for object creation, ensuring only one operation can modify the state at a time.

Exam trap

The trap here is that candidates often confuse Terraform Cloud (a managed service) with a backend type, or assume Consul's session-based locking implies versioning, when in fact Consul does not natively version state files like GCS does with object versioning.

How to eliminate wrong answers

Option A is wrong because the Consul backend, while supporting locking via sessions, does not provide built-in versioning of state files; versioning would require additional manual configuration or external tooling. Option C is wrong because the local backend stores state on the local filesystem, offering no locking mechanism for concurrent operations and no versioning beyond what the filesystem provides, making it unsuitable for team collaboration. Option D is wrong because Terraform Cloud backend is a managed service that supports locking and versioning, but the question asks for a shared backend that meets these requirements, and Terraform Cloud is a separate platform, not a backend type listed in the standard Terraform backend configuration options for direct state storage.

1314
MCQeasy

A company needs to choose a Google Cloud database for a globally distributed application that requires strong consistency across continents and an SLA of 99.999% for availability. Which database service meets these requirements?

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

Spanner provides global strong consistency and a 99.999% SLA for multi-region configurations.

Why this answer

Cloud Spanner is the only Google Cloud database that provides global strong consistency and a 99.999% availability SLA when using a multi-region configuration. Bigtable offers only eventual consistency across regions, Cloud SQL is regional, and Firestore provides strong consistency only within a single region.

1315
MCQmedium

Your team needs to add a new non-nullable column with a default value to a large Cloud Spanner table. The table has thousands of simultaneous writes per second. Which approach minimizes downtime and resource usage?

A.Use ALTER TABLE ADD COLUMN without a default value and then update rows in batches
B.Use ALTER TABLE ADD COLUMN with a non-null default value
C.Create a new table and use batch operations to copy data
D.Drop and recreate the table with the new column
AnswerB

Cloud Spanner applies the default immediately without scanning or rewriting rows.

Why this answer

Adding a non-nullable column with a default value in Cloud Spanner is a metadata-only operation that does not rewrite existing rows or block reads/writes. This minimizes downtime and resource usage even under thousands of concurrent writes per second, as the default value is applied logically at read time.

Exam trap

The trap here is that candidates assume adding a column with a default value requires a full table scan or row updates, similar to traditional databases, but Cloud Spanner handles this as a schema-only change without data movement.

How to eliminate wrong answers

Option A is wrong because adding a nullable column without a default value requires a subsequent batch update to populate the column, which would cause massive write contention and long-running transactions on a large table with high write throughput. Option C is wrong because creating a new table and copying data via batch operations involves significant resource overhead, double storage costs, and potential downtime during the switchover, making it far less efficient than a metadata-only schema change. Option D is wrong because dropping and recreating the table results in complete data loss and extended downtime, which is unacceptable for a production system with continuous writes.

1316
MCQmedium

A company is migrating an Oracle database to Cloud Spanner. The Oracle database has complex stored procedures and triggers. What is the best approach?

A.Use Dataflow to stream data from Oracle to Spanner.
B.Use BigQuery to load data then export to Spanner.
C.Rewrite the stored procedures and triggers to Spanner-compatible SQL and use a heterogeneous migration tool.
D.Use Database Migration Service for homogenous migration.
AnswerC

Spanner uses standard SQL with limited procedural support; rewriting is necessary, and a tool like Dataflow can migrate data.

Why this answer

Oracle stored procedures and triggers are written in PL/SQL, which is not compatible with Cloud Spanner's SQL dialect. A heterogeneous migration tool (e.g., Striim or Datastream with custom transforms) can handle schema and data conversion, but the application logic must be rewritten to Spanner-compatible SQL (e.g., using Cloud Spanner's stored procedures in GoogleSQL). This ensures the business logic is preserved and optimized for Spanner's distributed architecture.

Exam trap

The trap here is that candidates assume Database Migration Service (DMS) can handle any migration, but DMS only supports homogeneous migrations (same database engine), and Oracle to Spanner is heterogeneous, requiring a rewrite of stored procedures and triggers.

How to eliminate wrong answers

Option A is wrong because Dataflow is a data processing service, not a migration tool for complex stored procedures and triggers; it can stream data but cannot convert PL/SQL logic to Spanner-compatible SQL. Option B is wrong because BigQuery is an analytics data warehouse, not a migration intermediary; loading data into BigQuery and then exporting to Spanner adds unnecessary complexity and does not address the conversion of stored procedures and triggers. Option D is wrong because Database Migration Service (DMS) supports homogeneous migrations (e.g., MySQL to Cloud SQL for MySQL), but Oracle to Spanner is heterogeneous, and DMS cannot convert PL/SQL to Spanner SQL.

1317
Multi-Selecteasy

A company is using Cloud Spanner and wants to back up a database to Cloud Storage for long-term retention. They also need to restore the database to a specific point in time within the last 7 days. Which two features should they use? (Choose TWO.)

Select 2 answers
A.Set up a cross-region replica for backup
B.Use Spanner's point-in-time recovery feature to restore to a specific timestamp
C.Enable version management on the Spanner instance
D.Export the database using gcloud spanner databases export
E.Create a backup of the Spanner database using gcloud spanner backups create
AnswersB, E

Spanner allows restoring to a specific time within the retention period.

Why this answer

Spanner supports creating backups and restoring from them. Backups can be stored in Cloud Storage (as part of the backup process) and can be used for point-in-time recovery within a configurable retention period (up to 7 days by default).

1318
MCQmedium

A Cloud SQL for MySQL database has frequent table locks causing contention and slow queries. Which diagnostic approach helps identify the blocking queries?

A.Set up a Cloud Monitoring alert on CPU
B.Use Query Insights
C.Enable slow query log
D.Use INFORMATION_SCHEMA.INNODB_TRX
AnswerD

This table shows transaction details including lock waits and blockers.

Why this answer

`INFORMATION_SCHEMA.INNODB_TRX` provides real-time data on all currently executing InnoDB transactions, including transaction IDs, state, and the waiting flag. By joining this with `INNODB_LOCK_WAITS` and `INNODB_LOCKS`, you can pinpoint which transaction is blocking others, directly addressing table lock contention in Cloud SQL for MySQL.

Exam trap

The trap here is that candidates confuse performance monitoring tools (Query Insights, slow query log) with transaction-level diagnostics, failing to recognize that only InnoDB metadata tables expose the blocking transaction chain.

How to eliminate wrong answers

Option A is wrong because a CPU alert monitors resource utilization, not locking or blocking queries; high CPU may be a symptom but does not identify the specific blocking transaction. Option B is wrong because Query Insights in Cloud SQL provides query performance metrics and execution plans, but it does not expose InnoDB transaction lock wait information or the blocking transaction ID. Option C is wrong because the slow query log captures queries that exceed a time threshold, but it does not show which queries are currently blocked or blocking; it may miss short-lived blocking queries entirely.

1319
MCQmedium

A Cloud Memorystore for Redis instance used as a session store has a high eviction rate. Which configuration change can reduce evictions while maintaining performance?

A.Enable persistence (RDB)
B.Increase number of replicas
C.Decrease timeout
D.Set maxmemory-policy to allkeys-lru
AnswerD

This evicts least recently used keys, ideal for session data.

Why this answer

Setting `maxmemory-policy` to `allkeys-lru` allows Redis to evict the least recently used keys across all keys when memory is full, which directly reduces eviction rates by ensuring that only the least active session data is removed. This maintains performance by keeping frequently accessed session keys in memory, which is critical for a session store where active sessions are repeatedly read and written.

Exam trap

Google Cloud often tests the misconception that increasing replicas or enabling persistence can solve memory pressure issues, when in fact only adjusting the eviction policy or increasing `maxmemory` directly addresses evictions.

How to eliminate wrong answers

Option A is wrong because enabling persistence (RDB) does not reduce evictions; it creates point-in-time snapshots of data to disk, which consumes CPU and I/O resources without affecting the memory eviction policy. Option B is wrong because increasing the number of replicas does not reduce evictions on the primary instance; replicas are read-only copies that do not increase the primary's memory capacity or change its eviction behavior. Option C is wrong because decreasing the timeout (i.e., reducing the TTL for keys) would cause keys to expire sooner, potentially increasing evictions as more keys are removed by expiration, not reducing them.

1320
MCQeasy

A Cloud SQL for PostgreSQL instance is running low on disk space. The database size is 500 GB and the current storage is 600 GB. The engineer needs to increase storage to 800 GB without downtime. What should they do?

A.Shut down the instance, edit the configuration to increase storage, then restart.
B.Use gcloud sql instances patch to increase storage size to 800 GB.
C.Create a new instance with 800 GB storage and migrate data using pg_dump.
D.Enable auto-storage increase and wait for it to happen automatically.
AnswerB

The patch command can increase storage online without downtime.

Why this answer

Cloud SQL for PostgreSQL supports online storage increases using the `gcloud sql instances patch` command, which resizes the disk without requiring an instance restart or downtime. The storage can be increased up to the maximum allowed for the instance tier, and the change takes effect immediately while the instance remains available.

Exam trap

A common mistake in Google exams is to assume that storage changes require downtime. In Cloud SQL, storage can be increased online using the gcloud command, so choosing the shutdown option (A) is incorrect.

How to eliminate wrong answers

Option A is wrong because shutting down the instance causes downtime, which violates the requirement for zero downtime; Cloud SQL allows storage increases without stopping the instance. Option C is wrong because creating a new instance and migrating with pg_dump involves significant downtime during the dump and restore process, and is unnecessarily complex when a simple online resize is available. Option D is wrong because auto-storage increase only triggers when storage usage reaches a threshold (typically 90% or more), and it increases storage by a fixed increment (e.g., 10 GB or 15% of current size), not to a specific target like 800 GB; it also may not activate immediately and does not guarantee the exact desired size.

1321
MCQeasy

An organization wants to implement GitOps for their GKE clusters. They need to automatically sync the cluster state with a Git repository. Which Google Cloud service should they use?

A.Argo CD
B.Cloud Build
C.Config Sync
D.Cloud Source Repositories
AnswerC

Config Sync is a native GitOps solution that syncs Kubernetes resources from a Git repo to GKE clusters.

1322
Multi-Selectmedium

A Cloud Spanner database is experiencing read performance issues. The team wants to optimize query performance. Which two approaches should they use? (Choose TWO).

Select 2 answers
A.Create secondary indexes on frequently filtered columns
B.Enable read replicas
C.Use interleaved tables for all tables
D.Increase the number of nodes
E.Use the query explain plan to analyze query execution
AnswersA, E

Indexes avoid full table scans.

Why this answer

Using query explain plan helps identify bottlenecks; secondary indexes speed up lookups.

1323
MCQmedium

A Memorystore for Redis instance is running out of memory. The application uses Redis as a cache with key expiration. You want to prevent data loss for keys that have not reached their TTL. Which eviction policy should you configure?

A.noeviction
B.volatile-ttl
C.allkeys-lru
D.volatile-lru
AnswerD

volatile-lru evicts keys with an expire set (TTL) using LRU, preserving keys without TTL. This prevents data loss for keys that have no TTL.

1324
MCQmedium

A company wants to implement least-privilege IAM for their DevOps team. The team needs to manage Compute Engine instances and Cloud Storage buckets, but not delete resources. Which approach is recommended?

A.Grant predefined roles `roles/compute.instanceAdmin.v1` and `roles/storage.objectAdmin`.
B.Create custom roles with only the necessary permissions, excluding delete.
C.Use Cloud KMS to manage access.
D.Grant the primitive roles `roles/editor` and `roles/viewer`.
AnswerB

Correct. Custom roles allow you to grant only the specific permissions needed (e.g., compute.instances.get, storage.objects.get, etc.) without delete, ensuring least privilege.

Why this answer

The requirement is to manage Compute Engine instances and Cloud Storage buckets without the ability to delete resources. Option A is incorrect because the predefined roles `roles/compute.instanceAdmin.v1` and `roles/storage.objectAdmin` include delete permissions (`compute.instances.delete` and `storage.objects.delete`), which violate the least-privilege requirement. Option B is correct because creating custom roles allows you to explicitly grant only the necessary permissions, excluding delete actions, thus satisfying the constraint.

Options C and D are incorrect: Cloud KMS is for key management, not IAM roles; primitive roles like `roles/editor` grant broad permissions including delete.

Exam trap

A common pitfall is assuming that all predefined roles automatically adhere to least-privilege principles. In this case, the seemingly appropriate predefined roles actually include delete permissions, so custom roles are the only way to meet the requirement.

How to eliminate wrong answers

Option B is wrong because creating custom roles with only necessary permissions, excluding delete, is also a valid approach for least-privilege IAM, but the question asks for the recommended approach, and predefined roles are preferred over custom roles when they meet the requirements to reduce management overhead and risk of misconfiguration. Option C is wrong because Cloud KMS is a key management service for encryption keys, not an IAM mechanism for managing access to Compute Engine or Cloud Storage resources. Option D is wrong because primitive roles like `roles/editor` grant broad permissions, including delete, which violates the least-privilege requirement, and `roles/viewer` is too restrictive for management tasks.

1325
MCQeasy

A team is planning a one-time migration of a 500 GB MySQL database to Cloud SQL using Database Migration Service. They want to minimize the impact on the source database. Which mysqldump flags should they use when taking the initial snapshot?

A.--master-data=2 and --single-transaction
B.--lock-all-tables and --flush-logs
C.--single-transaction and --skip-lock-tables
D.--all-databases and --routines
AnswerC

These flags allow a consistent snapshot without locking tables.

Why this answer

For a consistent snapshot without locking InnoDB tables, use --single-transaction. --skip-lock-tables avoids table locks. --master-data is not needed for DMS one-time migration.

1326
MCQeasy

A DevOps engineer wants to trigger a Cloud Build pipeline automatically whenever a developer pushes a new Git tag in the format 'v*.*.*'. Which trigger configuration should be used?

A.Set the trigger event to 'Push a tag' with tag regex 'v.*'.
B.Use a manual trigger invoked via gcloud builds submit --tag.
C.Set the trigger event to 'Pull request' and check the 'Ignore tags' box.
D.Set the trigger event to 'Push to a branch' with branch regex 'v*.*.*'.
AnswerA

This fires on any tag matching 'v.*' (e.g., v1.0.0).

Why this answer

Cloud Build supports tag triggers that fire when a Git tag matching a regex is pushed. This is the correct way to trigger on tag creation.

1327
MCQeasy

A startup needs a database for a global user base with low-latency reads and writes, strong consistency, and the ability to scale horizontally without downtime. They anticipate variable traffic. Which Google Cloud database service meets these requirements?

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

Spanner offers global, strongly consistent, scalable database.

Why this answer

Cloud Spanner provides global distribution, strong consistency, horizontal scaling, and no downtime for schema changes or scaling. Cloud SQL is not global, Bigtable does not have strong consistency, and Firestore is not global with strong consistency for multi-region.

1328
MCQhard

You are managing a Cloud Spanner instance that supports a global e-commerce application. Queries that join two large tables (Orders and OrderItems) have high latency. The tables use the CustomerID as the primary key prefix. The join condition is on OrderID, which is the second part of the primary key in both tables. What should you do to improve performance?

A.Increase the number of nodes to handle the load.
B.Create a secondary index on OrderID in both tables.
C.Change the primary key of both tables to start with OrderID, then CustomerID.
D.Recreate the tables as interleaved tables with Orders as parent.
AnswerC

This ensures that related rows for the same order are co-located, allowing local joins.

Why this answer

By making OrderID the first part of the primary key, the join becomes a local join within the same split, reducing cross-node communication. Option A is wrong because increasing nodes may not fix the join strategy and costs more. Option B is wrong because secondary indexes do not help with joins across tables.

Option D is wrong because interleaving tables requires a parent-child relationship by primary key, which is not the case here (OrderID is not a prefix of the parent's primary key).

1329
MCQhard

An engineer is designing a Cloud Spanner table for a global user activity tracking system with high write throughput. Which primary key design is BEST to avoid hotspots?

A.Monotonically increasing integer (INT64) with auto-increment
B.Composite key with user_id as first part
C.UUID string (generated by application)
D.Timestamp as primary key
AnswerC

UUIDs are randomly distributed, avoiding write hotspots.

Why this answer

Using a UUID or hash-prefixed key distributes writes evenly across nodes, preventing hotspots that occur with monotonically increasing keys.

1330
Multi-Selectmedium

A DevOps team is designing a landing zone in Google Cloud. They need to set up a folder structure that supports multiple teams and environments. Which TWO practices should they follow? (Choose 2)

Select 2 answers
A.Use organization policies at the project level only to enforce compliance.
B.Create a flat project structure under the organization node with no folders.
C.Create separate folders for each team (e.g., 'Team-A', 'Team-B') under the environment folders.
D.Use environment folders (e.g., prod, staging, dev) to isolate environments.
E.Place all team projects in a single folder named 'Teams' without further grouping.
AnswersC, D

Correct. Team folders under environment folders provide granular control.

Why this answer

Best practices for landing zone design include using environment folders (prod, staging, dev) and team folders for resource isolation. Shared VPC, logging, and security projects are also common.

1331
Multi-Selectmedium

A company uses Cloud SQL for PostgreSQL for its BI database. Queries involving joins on large tables are slow. Which TWO strategies should they implement to improve join performance? (Choose TWO.)

Select 2 answers
A.Denormalize tables to reduce the number of joins
B.Add indexes on the columns used in JOIN conditions
C.Increase the number of CPU cores on the instance
D.Create read replicas for the join queries
E.Use connection pooling to reduce connection overhead
AnswersA, B

Denormalization physically stores related data together, avoiding joins.

Why this answer

Denormalizing tables reduces the number of joins required in queries by combining related data into fewer tables. This directly minimizes the computational overhead of join operations in Cloud SQL for PostgreSQL, which is especially beneficial for large BI datasets where join performance is critical.

Exam trap

The trap here is that candidates often confuse scaling resources (CPU, replicas) with query optimization techniques, failing to recognize that denormalization and indexing directly address the join performance bottleneck at the data structure level.

1332
MCQhard

A deployment pipeline uses Cloud Deploy with canary strategy targeting Cloud Run. The engineer wants to run a data migration job before the new revision receives traffic. How should they implement this?

A.Add a postDeploy hook that runs the migration
B.Include a Cloud Build step before the deploy step
C.Add a preDeploy hook in the delivery pipeline that runs a Cloud Run job
D.Use a startup command in the Cloud Run service
AnswerC

Correct: preDeploy hooks run before the deployment.

Why this answer

Cloud Deploy supports preDeploy hooks that run Cloud Run jobs before the deployment proceeds.

1333
MCQeasy

Your organization uses Cloud SQL for MySQL as the backend for a content management system. The Operations team reports that the database performance degrades every weekday morning at 9 AM, coinciding with a batch job that updates thousands of rows. You need to minimize the impact on end users. What is the best approach?

A.Increase the Cloud SQL instance memory and CPU before the job starts.
B.Break the batch job into smaller transactions with a delay between batches.
C.Disable binary logging during the batch window.
D.Move batch reads to a read replica.
AnswerB

Smaller transactions release locks faster and reduce contention.

Why this answer

Breaking the batch job into smaller transactions with a delay between batches reduces lock contention and transaction log pressure on the primary Cloud SQL instance. This prevents a single large transaction from blocking concurrent user queries, thereby minimizing performance degradation for end users during the batch window.

Exam trap

The trap here is that candidates often assume scaling up resources (Option A) is the universal fix for performance issues, but the PCDE exam tests understanding that write-heavy batch jobs on Cloud SQL require transaction management and concurrency control, not just vertical scaling.

How to eliminate wrong answers

Option A is wrong because simply increasing memory and CPU does not address the root cause of lock contention and transaction log buildup; it only delays resource exhaustion and may not prevent query blocking. Option C is wrong because disabling binary logging during the batch window would break point-in-time recovery (PITR) and replication, which is not a recommended or supported practice in Cloud SQL for MySQL; binary logs are essential for replication and backup integrity. Option D is wrong because moving batch reads to a read replica does not help with write-heavy batch jobs that update thousands of rows; the writes still occur on the primary instance, causing the same lock contention and performance impact.

1334
MCQhard

A data warehouse in BigQuery stores daily snapshots of customer data. The schema uses a single table with a snapshot_date partition column. Over time, the table has grown to 10 TB and queries often scan entire partitions. Which schema redesign would improve query performance and reduce costs significantly?

A.Create separate tables for each snapshot_date.
B.Use clustering on customer_id and snapshot_date.
C.Use a nested and repeated structure to store all snapshots per customer in a single row.
D.Use a wildcard table with a _TABLE_SUFFIX filter.
AnswerC

Nested fields allow storing an array of snapshots per customer, reducing data scanned per query significantly.

Why this answer

Storing all snapshots per customer in a nested and repeated structure (e.g., an array of structs) eliminates the need to scan multiple rows for the same customer across different snapshot dates. This reduces the table size by avoiding row duplication, and queries that filter on customer_id can leverage the nested structure to read only the relevant data, significantly cutting both query costs (less data scanned) and improving performance.

Exam trap

A common mistake in Google Professional Data Engineer exams is to assume that partitioning or clustering alone solves all performance issues, but for snapshot data with repeated customer records, a nested schema is the most efficient way to reduce data scanned and costs, especially when queries often scan entire partitions.

How to eliminate wrong answers

Option A is wrong because creating separate tables for each snapshot_date would require managing hundreds or thousands of tables, complicating maintenance and querying; BigQuery does not benefit from this approach as it still scans entire tables unless wildcard unions are used, which can increase costs. Option B is wrong because clustering on customer_id and snapshot_date improves performance only within a partition, but since the table is already partitioned by snapshot_date, queries scanning entire partitions would still read all rows in those partitions, and clustering does not reduce the amount of data scanned for full-partition scans. Option D is wrong because using a wildcard table with _TABLE_SUFFIX filter is essentially the same as partitioning by date (if tables are named by date) and does not reduce the data scanned when queries target entire partitions; it also adds management overhead of multiple tables.

1335
Multi-Selecthard

A company wants to migrate a 5 TB MySQL database to Cloud Spanner with zero downtime. They need to validate schema and data consistency before switching traffic. Which THREE steps should they include in the migration plan?

Select 3 answers
A.Set up a Dataflow pipeline to replicate changes from MySQL to Spanner
B.Use pgloader to migrate the data
C.Create a Cloud SQL read replica for fallback
D.Use HarbourBridge to convert MySQL schema to Spanner DDL
E.Validate data consistency between MySQL and Spanner using checksums
AnswersA, D, E

Dataflow can stream changes for near real-time replication.

Why this answer

Zero-downtime migration to Spanner typically involves using Strangler Fig pattern: replicate writes from MySQL to Spanner, validate data, then cutover. Key steps: 1. Export schema and convert to Spanner DDL (using HarbourBridge). 2.

Set up live migration using Dataflow for continuous replication. 3. Validate data consistency (e.g., using checksums). Taking an export snapshot is fine but not for zero-downtime; using pgloader is for PostgreSQL; creating a Cloud SQL read replica is not directly relevant.

1336
MCQmedium

A company wants to monitor Cloud SQL database latency for read replicas and set up an alert if the replica lag exceeds 30 seconds. Which metric should be used?

A.cloudsql.googleapis.com/database/postgresql/num_backends
B.cloudsql.googleapis.com/database/replication/replication_lag
C.cloudsql.googleapis.com/database/cpu/utilization
D.cloudsql.googleapis.com/database/disk/bytes_used
AnswerB

This metric directly reports the lag in seconds.

Why this answer

The 'replication_lag' metric in Cloud SQL measures the lag between primary and read replica. It is the correct metric to set alerts for replica lag.

1337
MCQhard

In Cloud Spanner, a table 'Orders' has a primary key (OrderId INT64) and is frequently updated. The application often queries for orders placed in the last hour. To reduce read latency, you decide to add a column to store the commit timestamp. Which approach should you use?

A.Define the column with the `allow_commit_timestamp` option and set it to 'true'
B.Create an interleaved table with the timestamp
C.Use a generated column with expression to get current_timestamp
D.Add a secondary index on a user-managed timestamp column
AnswerA

Spanner automatically assigns the commit timestamp to such columns, enabling efficient time-based queries.

Why this answer

Cloud Spanner's `allow_commit_timestamp` option, when set to 'true' on a column of type `TIMESTAMP`, automatically populates that column with the exact commit timestamp of the transaction. This enables efficient time-based queries (e.g., orders placed in the last hour) without requiring application-managed timestamps or additional writes, reducing read latency by leveraging Spanner's built-in commit-time visibility.

Exam trap

This question tests the misconception that generated columns or secondary indexes can substitute for Spanner's native commit timestamp feature, but only `allow_commit_timestamp` guarantees the exact commit time without application overhead.

How to eliminate wrong answers

Option B is wrong because creating an interleaved table does not automatically capture commit timestamps; interleaving is a schema design pattern for hierarchical relationships and locality, not for timestamp management. Option C is wrong because Cloud Spanner does not support generated columns with expressions like `CURRENT_TIMESTAMP`; generated columns are limited to deterministic expressions based on other columns, not volatile functions. Option D is wrong because a secondary index on a user-managed timestamp column would require the application to explicitly set and maintain the timestamp, introducing complexity and potential inconsistency, and does not leverage Spanner's native commit timestamp feature.

1338
MCQmedium

A company tracks customer demographics that change over time (e.g., address). They need to maintain historical accuracy in BI reports. Which approach correctly implements a Type 2 slowly changing dimension?

A.Store only the current value and rely on the fact table's timestamp to infer history
B.Add effective start and end date columns for each dimension attribute
C.Store only the current value in the dimension table and use an audit log for changes
D.Overwrite the old value with the new value
AnswerB

This standard SCD Type 2 pattern allows querying the state of the dimension at any point in time.

Why this answer

Type 2 SCD requires preserving full history by adding effective start and end date columns to the dimension table. This allows BI reports to join on a fact row's transaction timestamp and retrieve the exact dimension attribute values that were current at that point in time, ensuring historical accuracy without data loss.

Exam trap

Candidates often confuse Type 1 (overwrite) and Type 2 (versioning) SCDs, or mistakenly think an external audit log suffices for historical tracking. In Google PCDE, the key is that BI tools require directly joinable dimension versions with effective dates, not external logs, to accurately associate fact rows with historical attributes.

How to eliminate wrong answers

Option A is wrong because relying solely on a fact table's timestamp cannot reconstruct historical dimension values if the dimension table only stores the current value; the fact timestamp has no link to past dimension states. Option C is wrong because storing only the current value and using an audit log for changes does not support efficient BI queries—audit logs are not designed for direct join operations and would require complex, non-performant lookups. Option D is wrong because overwriting the old value with the new value implements a Type 1 SCD, which destroys historical data and makes it impossible to report on past states.

1339
MCQeasy

A developer needs to push a Docker image to Artifact Registry from their local machine. They have installed the gcloud CLI. Which command should they run first to authenticate Docker with Artifact Registry?

A.gcloud container clusters get-credentials
B.gcloud auth configure-docker
C.gcloud auth login
D.docker login -u oauth2accesstoken -p "$(gcloud auth print-access-token)" https://LOCATION-docker.pkg.dev
AnswerB

This updates Docker config to use gcloud's credential helper for pushing/pulling.

Why this answer

gcloud auth configure-docker configures Docker to use gcloud as a credential helper for all supported registries. gcloud auth login authenticates the user but does not configure Docker.

1340
MCQmedium

An organization wants to implement a landing zone with shared VPC, centralized logging, and security projects. Which folder structure best follows Google Cloud's recommended landing zone design?

A.Create a folder per product with subfolders for environments. Place shared projects under the product folder.
B.Create one folder per team with subfolders for each environment. Place shared projects under the corresponding environment folder.
C.Create a flat structure with all projects at the organization level.
D.Create a 'common' folder for shared projects (shared VPC, logging, security) and environment folders (dev, staging, prod) for workload projects.
AnswerD

This is the recommended approach: separate shared services in a common folder and isolate environments in their own folders.

Why this answer

Google's landing zone design recommends a folder per environment (prod, staging, dev) with common projects (shared VPC, logging, security) placed in a 'common' folder that sits at the same level as environment folders, allowing organization policies to be applied consistently.

1341
MCQmedium

An engineer is migrating a workload from a relational database to Bigtable. The current schema has a Customers table (1M rows) and an Orders table (100M rows) with a foreign key. Queries often fetch all orders for a customer. What is the best row key design for the Bigtable orders table?

A.Use customer ID + order ID as the row key (e.g., cust123#ord456).
B.Use the order ID as the row key and store customer ID as a column.
C.Use a hash of the customer ID as the row key.
D.Use a random UUID as the row key.
AnswerA

This enables efficient scans by customer ID prefix.

Why this answer

Using customer ID + order ID as the row key ensures that all orders for a single customer are stored in contiguous rows, enabling efficient range scans. Bigtable orders rows lexicographically by row key, so a prefix scan on the customer ID retrieves all related orders in a single read operation, avoiding expensive joins or scatter-gather patterns.

Exam trap

A common misconception in Google Cloud exams is that a unique row key (like UUID or hash) is always best for distribution, ignoring that Bigtable's access pattern requires locality for range queries, which is the core trade-off in NoSQL row key design.

How to eliminate wrong answers

Option B is wrong because using only the order ID as the row key scatters each customer's orders across the entire keyspace, forcing multiple point lookups or a full table scan to fetch all orders for a customer, which defeats Bigtable's strength in wide-row access patterns. Option C is wrong because hashing the customer ID destroys the natural ordering, so a prefix scan is impossible; you would need to know all possible hash values for a customer (which is one) and still cannot retrieve multiple orders in a single range request. Option D is wrong because random UUIDs distribute rows uniformly but eliminate any locality of reference, making it impossible to efficiently retrieve all orders for a customer without scanning the entire table.

1342
MCQhard

You are building a global application that requires strong consistency across regions. The application needs to support SQL queries and horizontal scaling. Which database service should you choose?

A.Cloud Spanner
B.Cloud SQL with cross-region replicas
C.Cloud Bigtable
D.Firestore
AnswerA

Spanner provides global strong consistency, SQL support, and automatic horizontal scaling across regions.

1343
MCQeasy

A developer needs to connect to a Memorystore for Redis instance from a Compute Engine VM in the same VPC network. The Redis instance has AUTH enabled. What must the developer provide in the connection string?

A.The Redis AUTH password.
B.The IAM role 'Memorystore User'.
C.The client certificate and private key.
D.The service account key file.
AnswerA

AUTH requires a password to access the instance.

Why this answer

When AUTH is enabled on a Memorystore for Redis instance, the client must provide the AUTH password in the connection string (e.g., `redis://:password@host:6379`) or via the `AUTH` command after connecting. This password is set during instance creation and is required for authentication before any data commands can be executed. Without it, the Redis server will reject the connection with a `NOAUTH Authentication required` error.

Exam trap

A common pitfall is selecting an IAM role (e.g., Memorystore User) instead of the Redis AUTH password because both are authentication mechanisms, but they operate at different layers: IAM controls access to the API, while AUTH controls data-plane access to Redis.

How to eliminate wrong answers

Option B is wrong because Memorystore for Redis does not use IAM roles for authentication; IAM is used for control-plane access (e.g., creating instances), not for data-plane Redis connections. Option C is wrong because Memorystore for Redis does not support TLS client certificate authentication by default; it uses AUTH password or, if in-transit encryption is enabled, server-side TLS with optional client certificates, but the question specifies AUTH enabled, not TLS. Option D is wrong because service account key files are used for authenticating Google Cloud API calls (e.g., via gcloud or client libraries), not for Redis protocol-level authentication.

1344
MCQeasy

A team is using Cloud Spanner and wants to reduce latency for queries that filter on a column that is not part of the primary key. Which feature should they use?

A.Storing index
B.Secondary index
C.Interleaved table
D.Query explain plan
AnswerB

Indexes speed up lookups on non-key columns.

Why this answer

Secondary indexes allow efficient queries on non-primary-key columns.

1345
MCQmedium

A company wants to run complex analytical queries on terabytes of data with sub-second response times. The data is structured and stored in Cloud Storage as Parquet files. They need a serverless solution that can query the data directly without loading it into a database. Which service should they use?

A.Cloud Dataproc
B.BigQuery
C.Cloud Bigtable
D.Cloud SQL
AnswerB

BigQuery can query external data sources like Cloud Storage Parquet files using external tables, with sub-second performance.

Why this answer

BigQuery is the correct choice because it is a serverless, fully managed data warehouse that supports querying structured data directly from Cloud Storage using external tables, without requiring data loading. It can handle terabytes of data with sub-second response times via its columnar storage, automatic scaling, and BI Engine for acceleration.

Exam trap

The trap here is that candidates often confuse BigQuery with Cloud Dataproc, thinking that Hadoop/Spark is required for large-scale analytics, but BigQuery's serverless architecture and direct Cloud Storage querying eliminate the need for cluster management and provide faster interactive response times.

How to eliminate wrong answers

Option A is wrong because Cloud Dataproc is a managed Hadoop/Spark service that requires provisioning and managing clusters, not a serverless solution, and it is designed for batch processing rather than sub-second interactive queries. Option C is wrong because Cloud Bigtable is a NoSQL wide-column database optimized for low-latency read/write access to large volumes of time-series or IoT data, not for complex analytical SQL queries on structured Parquet files. Option D is wrong because Cloud SQL is a fully managed relational database (MySQL, PostgreSQL, SQL Server) that requires loading data into tables and is not designed for petabyte-scale analytics or direct querying of Cloud Storage files.

1346
MCQeasy

A DevOps engineer wants to build a CI/CD pipeline that automatically builds and tests code every time a developer pushes a new branch to a Git repository. Which Cloud Build trigger type should they use?

A.Scheduled trigger
B.Manual trigger
C.Push to any branch trigger
D.Pull request trigger
AnswerC

This trigger fires on any branch push, including new branches.

Why this answer

A 'Push to any branch' trigger in Cloud Build automatically initiates a build whenever a developer pushes code to any branch in the repository. This matches the requirement to build and test code on every new branch push, without manual intervention or branch-specific filters.

Exam trap

Google often tests the distinction between 'push to any branch' and 'pull request' triggers, where candidates mistakenly choose the pull request trigger because they confuse branch push events with PR creation events.

How to eliminate wrong answers

Option A is wrong because a scheduled trigger runs builds at specified times (e.g., cron-based), not in response to Git push events, so it cannot automatically build on every branch push. Option B is wrong because a manual trigger requires explicit user invocation via the console or API, defeating the automation goal of a CI/CD pipeline. Option D is wrong because a pull request trigger only fires when a pull request is created or updated, not on every branch push, and it typically targets the source branch of the PR, not all branches.

1347
MCQmedium

An e-commerce platform wants to implement chaos engineering on its Google Kubernetes Engine cluster to test resilience against network latency. Which tool is specifically designed for this purpose on GKE?

A.Traffic Director fault injection
B.Chaos Mesh
C.Cloud Functions
D.Cloud Build
AnswerB

Chaos Mesh is a Kubernetes-native chaos engineering tool that can inject network latency into pods.

Why this answer

Chaos Mesh is an open-source chaos engineering platform for Kubernetes. It can inject various faults including network latency, and is available on GKE. Traffic Director fault injection is for service mesh, not directly for GKE pods.

Cloud Functions is not for Kubernetes.

1348
MCQhard

A service has an SLO of 99.99% availability over 28 days. The team wants to set up a slow burn alert that will notify them within 6 hours if error budget consumption is at 5x the budgeted rate. How much error budget has been consumed after 6 hours at this rate? The total error budget for 28 days is 4 minutes and 2 seconds (242 seconds).

A.10.8 seconds
B.7.2 seconds
C.2.4 seconds
D.4.8 seconds
AnswerA

At 5x burn rate for 6 hours, consumption = 5 * (242/(28*24)) * 6 = 5 * 0.36 * 6 = 10.8 seconds.

Why this answer

The total error budget is 242 seconds over 28 days (672 hours). The budgeted error rate is 242 seconds / 672 hours ≈ 0.3601 seconds per hour. At a 5x burn rate, the consumption rate is 5 × 0.3601 ≈ 1.8005 seconds per hour.

Over 6 hours, consumption = 1.8005 × 6 ≈ 10.8 seconds. Therefore, 10.8 seconds of error budget have been consumed, which corresponds to option A.

1349
MCQmedium

You are running Cloud Bigtable for time-series analytics. Each row represents a metric and uses a row key of format 'metricID#timestamp' (e.g., 'cpu_usage#2023-08-01T00:00:00Z'). You notice that writes are concentrated on a small number of nodes. What is the most effective way to distribute writes more evenly?

A.Use a different column family for each metric
B.Increase the number of nodes
C.Add a hash prefix of the metricID to the row key
D.Reverse the timestamp in the row key
AnswerC

Salting with a hash prefix distributes writes across all nodes.

Why this answer

The row key design is poor because metricID is a limited set (e.g., cpu_usage) and timestamp is increasing, so all writes for a metric go to a single tablet. Salting by prepending a hash of the metricID (or using a field promotion with a hash prefix) distributes writes across tablets. Reversing timestamp helps with reads but not write distribution.

Using a different column family does not affect row key distribution. Increasing nodes only helps if data is distributed, but the hotspot will remain.

1350
MCQeasy

A company is migrating an on-premises Oracle database to Cloud SQL for PostgreSQL. They have used Ora2Pg to convert the schema. Which of the following data type conversions is correct?

A.Oracle NUMBER(10) → PostgreSQL NUMERIC(10)
B.Oracle CLOB → PostgreSQL TEXT
C.Oracle NUMBER(10,2) → PostgreSQL INTEGER
D.Oracle DATE → PostgreSQL DATE
AnswerB

CLOB is large character object, maps to TEXT.

Why this answer

Oracle's DATE includes both date and time, so the correct mapping is to PostgreSQL TIMESTAMP. NUMBER(10) maps to INTEGER, NUMBER(10,2) to NUMERIC(10,2), and CLOB to TEXT.

Page 17

Page 18 of 20

Page 19