Professional Data Engineer on Google Cloud Platform Professional Data Engineer Practice Test 2
Question 10
A data platform team encounters this requirement: A Dataflow stream computes event-time windows but operators mistake the watermark for the time of the last message read. Which implementation is MOST appropriate?
- Monitor watermarks, input timestamps and processing lag to understand when windows are considered complete.
- Evaluate Cloud Data Fusion managed integration pipelines and reusable visual transformations for the supported connectors.
- Implement consumer idempotence or stable event-ID deduplication and acknowledge only after durable processing.
- Insert an approved redaction and model-quality validation boundary around Vertex AI or another permitted enrichment service.
Explanation
Correct Answer
A:The appropriate design is to monitor watermarks, input timestamps and processing lag to understand when windows are considered complete. This addresses the exact constraint: A Dataflow stream computes event-time windows but operators mistake the watermark for the time of the last message read. The underlying principle is that a watermark expresses progress in event time and a bound on expected older data, not simply wall-clock arrival time. If omitted, a stalled watermark can delay final aggregate output despite fast processing of new records. A direct acceptance test is: A test source with held-back timestamps produces a visible watermark delay and controlled release of window results.
Incorrect Answers
B:This action fits a separate situation: A data integration group needs to move relational source tables through visual mappings but has little capacity to maintain custom Spark code. There it would make sense to evaluate Cloud Data Fusion managed integration pipelines and reusable visual transformations for the supported connectors. It does not resolve this case, in which a Dataflow stream computes event-time windows but operators mistake the watermark for the time of the last message read. The needed control is to monitor watermarks, input timestamps and processing lag to understand when windows are considered complete.
C:This action fits a separate situation: Pub/Sub normally redelivers an event after a subscriber crashes before acknowledgment and a downstream table has duplicate rows. There it would make sense to implement consumer idempotence or stable event-ID deduplication and acknowledge only after durable processing. It does not resolve this case, in which a Dataflow stream computes event-time windows but operators mistake the watermark for the time of the last message read. The needed control is to monitor watermarks, input timestamps and processing lag to understand when windows are considered complete.
D:This action fits a separate situation: A pipeline enriches customer support tickets with an AI model but sends uncontrolled personal details in prompts. There it would make sense to insert an approved redaction and model-quality validation boundary around Vertex AI or another permitted enrichment service. It does not resolve this case, in which a Dataflow stream computes event-time windows but operators mistake the watermark for the time of the last message read. The needed control is to monitor watermarks, input timestamps and processing lag to understand when windows are considered complete.
Question 11
The engineering team ignores the recommended change: Use Google Cloud Workflows for ordered service calls with conditional branching and bounded retries. The current state is: A simple workflow must call three managed APIs in sequence and retry one HTTP step without administering Airflow. What is the greatest specific exposure?
- Broad Editor access can turn a routine ingestion identity into a cross-project data modification risk.
- A manually changed transformation may break downstream tables while its source definition remains undocumented.
- An unauthenticated endpoint or missing retry logic may result in missed or duplicate cleanup work.
- A transient API failure can leave one step unexecuted while the workflow reports a false overall success.
Explanation
Correct Answer
D:The specific residual risk is that a transient API failure can leave one step unexecuted while the workflow reports a false overall success. The situation is: A simple workflow must call three managed APIs in sequence and retry one HTTP step without administering Airflow. The missing response is to use Google Cloud Workflows for ordered service calls with conditional branching and bounded retries. The engineering reason is that managed service orchestration can coordinate API calls without the overhead of a full Spark or Airflow environment. After remediation, verify: An injected 503 is retried according to policy and the final step runs only after validated success.
Incorrect Answers
A:This failure mode belongs chiefly to another situation: A newly deployed pipeline service account cannot read its source bucket, so operators grant it project Editor. Its tailored control is to assign source-specific Storage and target-specific warehouse IAM roles with no unnecessary project-wide permissions. In the present situation the more direct exposure is that a transient API failure can leave one step unexecuted while the workflow reports a false overall success.
B:This failure mode belongs chiefly to another situation: BigQuery SQL transformations are edited in the console without dependencies or environment-specific promotion controls. Its tailored control is to manage Dataform definitions and assertions in version control with controlled compilation and workflow execution. In the present situation the more direct exposure is that a transient API failure can leave one step unexecuted while the workflow reports a false overall success.
C:This failure mode belongs chiefly to another situation: A Cloud Run data cleanup service must execute at a predictable time daily and has no intertask dependency graph. Its tailored control is to schedule an authenticated Cloud Scheduler invocation and make cleanup operations safe to retry. In the present situation the more direct exposure is that a transient API failure can leave one step unexecuted while the workflow reports a false overall success.
Question 12
A data platform team encounters this requirement: Sales leadership needs reproducible regional revenue and product category measures across many dashboards. Which implementation is MOST appropriate?
- Require partition filters and apply authorized maximum bytes billed or query cost controls where appropriate.
- Use incremental partition-aware transformations and recompute only the required correction horizon.
- Model conformed dimensions and a documented fact table grain before creating reporting views.
- Evaluate an eligible BigQuery materialized view or governed preaggregation strategy for the recurring query.
Explanation
Correct Answer
C:The appropriate design is to model conformed dimensions and a documented fact table grain before creating reporting views. This addresses the exact constraint: Sales leadership needs reproducible regional revenue and product category measures across many dashboards. The underlying principle is that a clear analytical grain and consistent dimensions prevent ambiguous joins and conflicting aggregate definitions. If omitted, joining records at mismatched granularity can multiply revenue values and corrupt comparisons. A direct acceptance test is: A known order sample reconciles through the fact table and each dimension without duplicate amount inflation.
Incorrect Answers
A:This action fits a separate situation: A reporting query accidentally scans an entire petabyte BigQuery table because an analyst omits a date filter. There it would make sense to require partition filters and apply authorized maximum bytes billed or query cost controls where appropriate. It does not resolve this case, in which sales leadership needs reproducible regional revenue and product category measures across many dashboards. The needed control is to model conformed dimensions and a documented fact table grain before creating reporting views.
B:This action fits a separate situation: A warehouse refresh overwrites every partition each morning although only yesterday and today's events can change. There it would make sense to use incremental partition-aware transformations and recompute only the required correction horizon. It does not resolve this case, in which sales leadership needs reproducible regional revenue and product category measures across many dashboards. The needed control is to model conformed dimensions and a documented fact table grain before creating reporting views.
D:This action fits a separate situation: A team recomputes the same expensive daily aggregate from a huge BigQuery base table for every BI dashboard refresh. There it would make sense to evaluate an eligible BigQuery materialized view or governed preaggregation strategy for the recurring query. It does not resolve this case, in which sales leadership needs reproducible regional revenue and product category measures across many dashboards. The needed control is to model conformed dimensions and a documented fact table grain before creating reporting views.
Question 13
A project declines to apply this measure: Consider Firestore document modeling and indexes appropriate for the application query patterns. It faces: A field-service mobile application needs to synchronize small user-owned JSON documents with responsive client queries. Which consequence is MOST directly unresolved?
- A conventional single-region database may fail the geographic availability and write scalability requirements.
- Using a batch warehouse query for every mobile read can cause unacceptable user-facing latency.
- Stale cached prices can reach customers if invalidation and expiration are not defined.
- Using a warehouse as the primary transaction database can complicate record-level updates and constraints.
Explanation
Correct Answer
B:The specific residual risk is that using a batch warehouse query for every mobile read can cause unacceptable user-facing latency. The situation is: A field-service mobile application needs to synchronize small user-owned JSON documents with responsive client queries. The missing response is to consider Firestore document modeling and indexes appropriate for the application query patterns. The engineering reason is that firestore is a document-oriented operational database for application access rather than a bulk analytical warehouse. After remediation, verify: A device client retrieves authorized documents through expected indexed queries under representative concurrency.
Incorrect Answers
A:This failure mode belongs chiefly to another situation: A global financial service needs relational transactions and strongly consistent writes across geographically distributed users. Its tailored control is to evaluate Cloud Spanner with supported regional or multi-region configuration and transaction design. In the present situation the more direct exposure is that using a batch warehouse query for every mobile read can cause unacceptable user-facing latency.
C:This failure mode belongs chiefly to another situation: An API repeatedly reads a small set of product prices from a slower backing database with heavy peak traffic. Its tailored control is to use Memorystore as a managed cache with explicit TTL, invalidation and authoritative source-of-truth rules. In the present situation the more direct exposure is that using a batch warehouse query for every mobile read can cause unacceptable user-facing latency.
D:This failure mode belongs chiefly to another situation: A departmental application needs PostgreSQL-compatible transactions for a moderate workload with predictable instance sizing. Its tailored control is to use Cloud SQL for a supported relational database workload with managed backup and availability options. In the present situation the more direct exposure is that using a batch warehouse query for every mobile read can cause unacceptable user-facing latency.
Question 14
An organization does not implement the safeguard: Use sink-specific idempotent transaction IDs and delivery coordination rather than relying only on Dataflow exactly-once processing. In the following situation, a Dataflow aggregation produces correct internal counts but its sink sends charge requests to an external payment API with occasional retries. Which failure is MOST likely?
- Healthy events can back up while the consumer repeatedly fails on the same invalid record.
- A retried output request can charge the same transaction multiple times despite correct stream aggregation.
- Order totals can be understated when additional line items are lost during transformation.
- A restarted connector may replay records or miss a partition if offsets are not managed correctly.
Explanation
Correct Answer
B:The specific residual risk is that a retried output request can charge the same transaction multiple times despite correct stream aggregation. The situation is: A Dataflow aggregation produces correct internal counts but its sink sends charge requests to an external payment API with occasional retries. The missing response is to use sink-specific idempotent transaction IDs and delivery coordination rather than relying only on Dataflow exactly-once processing. The engineering reason is that exactly-once internal stream processing does not automatically make arbitrary external side effects exactly once. After remediation, verify: A forced sink timeout and retry yield one externally recorded charge per business transaction.
Incorrect Answers
A:This failure mode belongs chiefly to another situation: One malformed Pub/Sub payload is retried indefinitely and repeatedly blocks progress for a subscription consumer. Its tailored control is to configure controlled retry limits and an authorized dead-letter topic with an owned replay or inspection process. In the present situation the more direct exposure is that a retried output request can charge the same transaction multiple times despite correct stream aggregation.
C:This failure mode belongs chiefly to another situation: An API feed supplies nested JSON arrays and naive CSV flattening loses repeated line items from each order. Its tailored control is to parse nested records into correctly typed BigQuery STRUCT and ARRAY fields or a deliberate child table model. In the present situation the more direct exposure is that a retried output request can charge the same transaction multiple times despite correct stream aggregation.
D:This failure mode belongs chiefly to another situation: A business maintains Apache Kafka producers and wants to connect their events to analytics without changing producer semantics. Its tailored control is to select a supported Kafka-to-Dataflow or compatible connector and plan offsets, schema handling and replay. In the present situation the more direct exposure is that a retried output request can charge the same transaction multiple times despite correct stream aggregation.
Question 15
A production data pipeline has this problem: An event analytics service wants to expand its data pipeline but current quotas and reserved compute limits are unknown. Which solution MOST directly corrects it?
- Profile source throughput and worker utilization before changing cluster size or partition design.
- Choose an appropriate ephemeral Dataproc cluster or serverless Spark execution model rather than a mostly idle persistent cluster.
- Measure expected peak resource demand and request supported quotas or reservations before capacity expansion.
- Apply partition pruning and measure bytes processed before increasing compute or running frequency.
Explanation
Correct Answer
C:The appropriate design is to measure expected peak resource demand and request supported quotas or reservations before capacity expansion. This addresses the exact constraint: An event analytics service wants to expand its data pipeline but current quotas and reserved compute limits are unknown. The underlying principle is that provisioning plans must account for platform quotas and enforceable workload capacity boundaries. If omitted, a planned increase in event volume can fail at quota limits despite adequate apparent cloud capacity. A direct acceptance test is: A scaling rehearsal meets required throughput with explicit headroom and no quota errors.
Incorrect Answers
A:This action fits a separate situation: An analytical pipeline repeatedly requests more CPU workers but the Cloud Storage read path cannot supply data at the needed rate. There it would make sense to profile source throughput and worker utilization before changing cluster size or partition design. It does not resolve this case, in which an event analytics service wants to expand its data pipeline but current quotas and reserved compute limits are unknown. The needed control is to measure expected peak resource demand and request supported quotas or reservations before capacity expansion.
B:This action fits a separate situation: A nightly Spark job needs hundreds of workers for ninety minutes while a permanently running Dataproc cluster stays idle most of the day. There it would make sense to choose an appropriate ephemeral Dataproc cluster or serverless Spark execution model rather than a mostly idle persistent cluster. It does not resolve this case, in which an event analytics service wants to expand its data pipeline but current quotas and reserved compute limits are unknown. The needed control is to measure expected peak resource demand and request supported quotas or reservations before capacity expansion.
D:This action fits a separate situation: A scheduled BigQuery query reads 200 TB every hour although analysts only need one day's changes. There it would make sense to apply partition pruning and measure bytes processed before increasing compute or running frequency. It does not resolve this case, in which an event analytics service wants to expand its data pipeline but current quotas and reserved compute limits are unknown. The needed control is to measure expected peak resource demand and request supported quotas or reservations before capacity expansion.
Question 16
The proposed safeguard is not implemented: Use an approved event trigger with object-identity deduplication and downstream orchestration. The data platform currently faces: An event arrives at Cloud Storage but no automation initiates the corresponding parsing workflow until an operator notices it. What direct risk remains?
- A partial transaction can leave orphaned staged data and misleading completion status.
- Manual launches can be forgotten and repeated invocations can publish duplicate outputs.
- File arrival can be missed or delayed and repeated notifications may process the same file twice.
- A poorly scoped backfill can overwrite new records or swamp interactive warehouse reservations.
Explanation
Correct Answer
C:The specific residual risk is that file arrival can be missed or delayed and repeated notifications may process the same file twice. The situation is: An event arrives at Cloud Storage but no automation initiates the corresponding parsing workflow until an operator notices it. The missing response is to use an approved event trigger with object-identity deduplication and downstream orchestration. The engineering reason is that event-driven automation can reduce ingestion delay when it is made tolerant of duplicate notifications. After remediation, verify: A single uploaded object initiates the intended transformation and duplicate notifications remain harmless.
Incorrect Answers
A:This failure mode belongs chiefly to another situation: A serverless workflow should branch to a compensation step when a target table write fails after staging succeeds. Its tailored control is to use Cloud Workflows conditional steps and bounded error handling with a defined compensation path. In the present situation the more direct exposure is that file arrival can be missed or delayed and repeated notifications may process the same file twice.
B:This failure mode belongs chiefly to another situation: A single Cloud Run transformation must execute every day at 02:00 without a complex dependency graph. Its tailored control is to use Cloud Scheduler with authenticated invocation, monitoring and idempotent job behavior. In the present situation the more direct exposure is that file arrival can be missed or delayed and repeated notifications may process the same file twice.
D:This failure mode belongs chiefly to another situation: Historical corrections require replaying three weeks of events while ordinary daily pipelines continue to run. Its tailored control is to implement a parameterized backfill DAG with bounded date ranges, dependency isolation and controlled reconciliation. In the present situation the more direct exposure is that file arrival can be missed or delayed and repeated notifications may process the same file twice.
Question 17
A data engineer recommends: Define immutable business event IDs and a deduplication boundary in the consumer and output design. It addresses: A billing publisher retries submissions after timeouts and cannot tell whether the same event already entered the stream. What underlying principle explains the recommendation?
- Source classification should drive sink selection and retention before bulk records are ingested.
- Transport acknowledgments are not a substitute for business-level idempotence across producer retries.
- Encryption design must include the actual writer and reader principals as well as storage configuration.
- Latency contracts must distinguish time of occurrence, arrival time and when reports are considered final.
Explanation
Correct Answer
B:The governing principle is that transport acknowledgments are not a substitute for business-level idempotence across producer retries. It explains why the team should define immutable business event IDs and a deduplication boundary in the consumer and output design. The current problem is: A billing publisher retries submissions after timeouts and cannot tell whether the same event already entered the stream. Without the safeguard, duplicated invoice events can lead to double counting or repeated external billing side effects. A suitable proof is: Publishing an identical business ID twice results in one accepted financial record after processing.
Incorrect Answers
A:That principle applies primarily to a different design condition: A shared event topic mixes support recordings and aggregated click counts with very different retention and privacy obligations. There the relevant engineering response is to partition data flows by classification and define separate approved landing, expiration and access rules. For the given case, the controlling rationale is that transport acknowledgments are not a substitute for business-level idempotence across producer retries.
C:That principle applies primarily to a different design condition: A compliance feed writes data to Cloud Storage but requires customer-managed encryption keys and auditable key access. There the relevant engineering response is to include supported Cloud KMS key integration and service identity access in the ingestion architecture. For the given case, the controlling rationale is that transport acknowledgments are not a substitute for business-level idempotence across producer retries.
D:That principle applies primarily to a different design condition: An IoT team promises event-time analytics within five minutes but devices can be offline for half an hour. There the relevant engineering response is to specify event time, acceptable lateness, freshness SLIs and correction policy before selecting triggers and sinks. For the given case, the controlling rationale is that transport acknowledgments are not a substitute for business-level idempotence across producer retries.
Question 18
Consider a Google Cloud data engineering design: A Spark workload shuffles massive intermediate data after a high-cardinality groupBy and exceeds its processing window. What action BEST meets the stated constraint?
- Tune joins, partition distribution and shuffle behavior before purchasing additional workers.
- Tune supported Dataflow autoscaling and worker constraints against peak backlog and latency objectives.
- Profile source throughput and worker utilization before changing cluster size or partition design.
- Choose an appropriate ephemeral Dataproc cluster or serverless Spark execution model rather than a mostly idle persistent cluster.
Explanation
Correct Answer
A:The appropriate design is to tune joins, partition distribution and shuffle behavior before purchasing additional workers. This addresses the exact constraint: A Spark workload shuffles massive intermediate data after a high-cardinality groupBy and exceeds its processing window. The underlying principle is that data processing cost and duration often depend on shuffle distribution and skew as much as raw worker count. If omitted, one hot reducer can dominate runtime while the rest of the cluster remains underused. A direct acceptance test is: Stage metrics show improved skew distribution and matching aggregate output after tuning.
Incorrect Answers
B:This action fits a separate situation: A Dataflow job falls behind during flash-sale traffic but uses fixed worker capacity sized for ordinary days. There it would make sense to tune supported Dataflow autoscaling and worker constraints against peak backlog and latency objectives. It does not resolve this case, in which a Spark workload shuffles massive intermediate data after a high-cardinality groupBy and exceeds its processing window. The needed control is to tune joins, partition distribution and shuffle behavior before purchasing additional workers.
C:This action fits a separate situation: An analytical pipeline repeatedly requests more CPU workers but the Cloud Storage read path cannot supply data at the needed rate. There it would make sense to profile source throughput and worker utilization before changing cluster size or partition design. It does not resolve this case, in which a Spark workload shuffles massive intermediate data after a high-cardinality groupBy and exceeds its processing window. The needed control is to tune joins, partition distribution and shuffle behavior before purchasing additional workers.
D:This action fits a separate situation: A nightly Spark job needs hundreds of workers for ninety minutes while a permanently running Dataproc cluster stays idle most of the day. There it would make sense to choose an appropriate ephemeral Dataproc cluster or serverless Spark execution model rather than a mostly idle persistent cluster. It does not resolve this case, in which a Spark workload shuffles massive intermediate data after a high-cardinality groupBy and exceeds its processing window. The needed control is to tune joins, partition distribution and shuffle behavior before purchasing additional workers.
Question 19
An operator has deployed the solution: Partition data flows by classification and define separate approved landing, expiration and access rules. In the situation where a shared event topic mixes support recordings and aggregated click counts with very different retention and privacy obligations. Which evidence BEST confirms success?
- A controlled link outage queues records and preserves expected event IDs after connection restoration.
- A scheduled test import succeeds under the workload identity and fails when requesting unrelated datasets.
- An outbound test payload contains only fields approved for the enrichment service.
- A lineage and policy test confirms classified records land only in permitted storage with correct retention.
Explanation
Correct Answer
D:This is the decisive test result: A lineage and policy test confirms classified records land only in permitted storage with correct retention. It directly validates the implementation to partition data flows by classification and define separate approved landing, expiration and access rules. The underlying case is: A shared event topic mixes support recordings and aggregated click counts with very different retention and privacy obligations. This matters because source classification should drive sink selection and retention before bulk records are ingested. Without it, sensitive recordings may be retained as broadly accessible analytics files long after business need ends.
Incorrect Answers
A:This is proof for a different safeguard: Design reliable buffering with approved private routing, connection monitoring and controlled reconnect behavior. That applies when a factory sends telemetry from an on-premises source through an unreliable connection to a private processing environment. The present control instead requires the specific outcome: A lineage and policy test confirms classified records land only in permitted storage with correct retention.
B:This is proof for a different safeguard: Assign a dedicated ingestion service account with source-specific access and only required destination permissions. That applies when a new SaaS connector runs with developer credentials rather than a dedicated service identity during scheduled imports. The present control instead requires the specific outcome: A lineage and policy test confirms classified records land only in permitted storage with correct retention.
C:This is proof for a different safeguard: Plan an approved de-identification stage and data-contract checks before external enrichment requests. That applies when a third-party supplier proposes sending customer PII to a general-purpose enrichment API before anonymization. The present control instead requires the specific outcome: A lineage and policy test confirms classified records land only in permitted storage with correct retention.
Question 20
A data engineer recommends: Evaluate a supported open table format and actual engine compatibility before enabling transactional lake operations. It addresses: A multi-engine lake team wants transactional table changes over columnar files while retaining compatibility with its query engines. What underlying principle explains the recommendation?
- Separating raw from curated zones preserves replayability and helps consumers distinguish untrusted from approved records.
- Columnar lake formats enable interoperable analytical reads when file layout and type contracts are managed.
- Governed lake operations require provenance and stewardship as well as durable object storage.
- Lakehouse table formats can coordinate metadata and atomic snapshots only when readers and writers support the chosen protocol.
Explanation
Correct Answer
D:The governing principle is that lakehouse table formats can coordinate metadata and atomic snapshots only when readers and writers support the chosen protocol. It explains why the team should evaluate a supported open table format and actual engine compatibility before enabling transactional lake operations. The current problem is: A multi-engine lake team wants transactional table changes over columnar files while retaining compatibility with its query engines. Without the safeguard, enabling incompatible writers can expose readers to partial commits or inconsistent schema snapshots. A suitable proof is: Two approved engines read the same committed snapshot and reject a deliberately incomplete transaction.
Incorrect Answers
A:That principle applies primarily to a different design condition: A lake ingestion pipeline writes raw JSON and immediately overwrites it with normalized records in the same prefix. There the relevant engineering response is to keep protected raw data and publish separately validated curated datasets with explicit lineage references. For the given case, the controlling rationale is that lakehouse table formats can coordinate metadata and atomic snapshots only when readers and writers support the chosen protocol.
B:That principle applies primarily to a different design condition: A data science team stores raw event datasets in Cloud Storage and wants efficient columnar processing by several engines. There the relevant engineering response is to use a governed lake layout with Parquet or another supported analytical format and explicit schema metadata. For the given case, the controlling rationale is that lakehouse table formats can coordinate metadata and atomic snapshots only when readers and writers support the chosen protocol.
C:That principle applies primarily to a different design condition: Object storage contains petabytes of data but owners cannot identify which transformations produce a widely used risk feature. There the relevant engineering response is to publish lake metadata, ownership and lineage into the approved catalog with regular quality checks. For the given case, the controlling rationale is that lakehouse table formats can coordinate metadata and atomic snapshots only when readers and writers support the chosen protocol.