Sign in
Home/Google Cloud/Professional Data Engineer (Google Cloud)/Free questions

Professional Data Engineer (Google Cloud) — Free Practice Questions

10 free sample questions from a bank of 320, with the correct answers and explanations. No signup required — start practising right now.

1Your company built a TensorFlow neutral-network model with a large number of neurons and layers. The model fits well for the training data. However, when tested against new data, it performs poorly. What method can you employ to address this?
  • Threading
  • Serialization
  • Dropout Methods
  • Dimensionality Reduction
Answer: C

The short version

C — Dropout Methods fix training-fit but poor generalization. Randomly disabling neurons curbs overfitting in large TensorFlow networks.

Key concepts in this question

  • Overfitting: large model memorizing training data with many neurons and layers, failing on unseen inputs.
  • Dropout regularization: training technique randomly deactivating a fraction of neurons per step to prevent co-adaptation.
  • Threading versus serialization: performance and persistence mechanisms unrelated to generalization error.
  • Dimensionality reduction: feature compression useful for input size, not the primary fix for memorization.

Why C is correct

C is correct because deep networks with abundant capacity learn training noise alongside signal, causing high variance on new data. Dropout forces redundant representations by preventing reliance on specific neuron paths, improving test performance. This established regularization directly addresses the described train-well plus test-poorly pattern.

Why the others are wrong

  • A. Threading parallelizes execution and does not change model generalization.
  • B. Serialization saves and loads model artifacts without affecting overfitting.
  • D. Dimensionality reduction shrinks inputs but does not regularize deep co-adapted layers as directly.

PDE exam tip

Spot train-good test-bad as overfitting: answer Dropout to regularize large neural networks.

2You are building a model to make clothing recommendations. You know a user's fashion preference is likely to change over time, so you build a data pipeline to stream new data back to the model as it becomes available. How should you use this data to train the model?
  • Continuously retrain the model on just the new data.
  • Continuously retrain the model on a combination of existing data and the new data.
  • Train on the existing data while using the new data as your test set.
  • Train on the new data while using the existing data as your test set.
Answer: B

The short version

B — retrain continuously on existing plus new data. Combined training preserves history while adapting to shifting fashion taste.

Key concepts in this question

  • Concept drift: user fashion preference evolving over time, requiring models to track changing distributions.
  • Catastrophic forgetting: loss of old knowledge when retraining only on recent data.
  • Combined retraining: blending historical corpus with streamed arrivals to balance stability and freshness.
  • Test-set misuse: using new production data as evaluation only, without incorporating it into learning.

Why B is correct

B is correct because training solely on new arrivals discards valuable history and overfits to short-term trends. Merging existing data with streamed data maintains baseline preferences while letting recent behavior shift recommendations gradually. This continuous combined approach handles drift without forgetting long-term signals.

Why the others are wrong

  • A. Retraining only on new data forgets established preferences and amplifies recency bias.
  • C. Using new data solely as a test set wastes its training value for adaptation.
  • D. Training on new while testing on old inverts evaluation and discards historical learning.

PDE exam tip

Blend old with new for drift: continuous retraining on combined data prevents forgetting while tracking change.

3You designed a database for patient records as a pilot project to cover a few hundred patients in three clinics. Your design used a single database table to represent all patients and their visits, and you used self-joins to generate reports. The server resource utilization was at 50%. Since then, the scope of the project has expanded. The database must now store 100 times more patient records. You can no longer run the reports, because they either take too long or they encounter errors with insufficient compute resources. How should you adjust the database design?
  • Add capacity (memory and disk space) to the database server by the order of 200.
  • Shard the tables into smaller ones based on date ranges, and only generate reports with prespecified date ranges.
  • Normalize the master patient-record table into the patient table and the visits table, and create other necessary tables to avoid self-join.
  • Partition the table into smaller tables, with one for each clinic. Run queries against the smaller table pairs, and use unions for consolidated reports.
Answer: C

The short version

C — normalize into patient and visits tables to kill self-joins. Relational design restores scalable reporting at 100x volume.

Key concepts in this question

  • Single-table plus self-join: pilot hack joining a wide table to itself, workable for hundreds of rows but costly at scale.
  • Normalization: splitting master records into patient, visits, and related entities linked by keys.
  • 100x growth impact: compute and memory blowup when self-joins scan massive denormalized rows.
  • Scaling alternatives: capacity adds, sharding, or clinic splits that do not fix the underlying model flaw.

Why C is correct

C is correct because separating patients from visits eliminates expensive self-joins and lets indexes serve selective joins efficiently. New tables for clinics, diagnoses, and encounters further reduce row width and scan cost for reports. At 100x patient growth, this structural fix addresses resource exhaustion more durably than hardware or partitioning workarounds.

Why the others are wrong

  • A. Adding 200x capacity treats symptoms and will re-exhaust as data keeps growing.
  • B. Date sharding restricts reporting flexibility and still leaves self-join cost within shards.
  • D. Per-clinic splits plus unions fragment queries and complicate consolidated analytics.

PDE exam tip

Replace self-joins with normalization: patient plus visits tables scale reports far better than bigger servers.

4You create an important report for your large team in Google Data Studio 360. The report uses Google BigQuery as its data source. You notice that visualizations are not showing data that is less than 1 hour old. What should you do?
  • Disable caching by editing the report settings.
  • Disable caching in BigQuery by editing table details.
  • Refresh your browser tab showing the visualizations.
  • Clear your browser history for the past hour then reload the tab showing the virtualizations.
Answer: A

The short version

A — disable caching in the report settings. Data Studio caching hides sub-hour BigQuery freshness from visualizations.

Key concepts in this question

  • Data Studio caching: report-level cache serving recent query results to speed dashboards, often up to hours.
  • BigQuery freshness: warehouse rows available immediately, independent of downstream report caching.
  • Browser red herrings: tab refresh and history clearing that do not purge server-side report cache.
  • Report settings control: toggle disabling cache so each view queries BigQuery live.

Why A is correct

A is correct because visualizations missing less-than-one-hour data point to stale Data Studio cache rather than missing warehouse rows. Editing report settings to disable caching forces fresh BigQuery queries on each load. BigQuery table settings and browser actions cannot override this report-layer cache behavior.

Why the others are wrong

  • B. BigQuery has no per-table visualization cache toggle controlling Data Studio staleness.
  • C. Browser tab refresh still serves cached report data from Data Studio services.
  • D. Clearing browser history does not invalidate server-side report caching.

PDE exam tip

Freshness under an hour missing means report cache: disable caching in Data Studio report settings.

5An external customer provides you with a daily dump of data from their database. The data flows into Google Cloud Storage GCS as comma-separated values (CSV) files. You want to analyze this data in Google BigQuery, but the data could have rows that are formatted incorrectly or corrupted. How should you build this pipeline?
  • Use federated data sources, and check data in the SQL query.
  • Enable BigQuery monitoring in Google Stackdriver and create an alert.
  • Import the data into BigQuery using the gcloud CLI and set max_bad_records to 0.
  • Run a Google Cloud Dataflow batch pipeline to import the data into BigQuery, and push errors to another dead-letter table for analysis.
Answer: D

The short version

D — run a Dataflow batch import with a dead-letter table. Valid rows land in BigQuery while malformed CSV rows divert for analysis.

Key concepts in this question

  • Corrupt CSV risk: daily dumps with malformed rows that would fail direct loads if not isolated.
  • Dataflow batch pipeline: Apache Beam job parsing, validating, and routing rows with scalable transforms.
  • Dead-letter pattern: separate error table capturing bad records for inspection without blocking good data.
  • Federated versus direct loads: query-time checks or zero-tolerance loads that either perform poorly or abort on errors.

Why D is correct

D is correct because Dataflow can parse each CSV line, validate schema, write clean rows to BigQuery, and push failures to a dead-letter table for later review. This preserves pipeline continuity despite daily corruption while enabling root-cause analysis. Monitoring alerts or max-bad-records zero cannot both load good data and retain bad rows for study.

Why the others are wrong

  • A. Federated queries over raw CSV push validation into every SQL run and scale poorly.
  • B. Stackdriver monitoring only alerts on issues without cleaning or routing corrupt rows.
  • C. Setting max-bad-records to zero aborts on first corruption instead of isolating errors.

PDE exam tip

Quarantine bad CSV rows: Dataflow to BigQuery plus dead-letter table keeps good data flowing.

6Your weather app queries a database every 15 minutes to get the current temperature. The frontend is powered by Google App Engine and server millions of users. How should you design the frontend to respond to a database failure?
  • Issue a command to restart the database servers.
  • Retry the query with exponential backoff, up to a cap of 15 minutes.
  • Retry the query every second until it comes back online to minimize staleness of data.
  • Reduce the query frequency to once every hour until the database comes back online.
Answer: B

The short version

B — retry with exponential backoff capped at 15 minutes. Spaced retries match the query cadence and avoid hammering a down database.

Key concepts in this question

  • 15-minute poll rhythm: frontend freshness SLA defining the maximum tolerable staleness window.
  • Exponential backoff: retry delays doubling after each failure to reduce load during outages.
  • Cap alignment: backoff ceiling matching the normal interval so recovery aligns with the next scheduled read.
  • Frontend resilience: serving millions via App Engine without cascading retry storms.

Why B is correct

B is correct because retrying with exponential backoff spreads load while the database recovers, preventing thundering-herd pressure from millions of clients. Capping at 15 minutes ensures the next attempt coincides with the expected freshness window rather than over-polling. This balances availability, staleness, and downstream pressure for a weather-temperature use case.

Why the others are wrong

  • A. Restarting database servers from the frontend is out of scope and operationally unsafe.
  • C. Per-second retries flood a struggling database and risk prolonging the outage.
  • D. Dropping to hourly queries needlessly degrades freshness beyond the 15-minute requirement.

PDE exam tip

Match backoff cap to cadence: 15-minute queries get exponential retries capped at 15 minutes.

7You are creating a model to predict housing prices. Due to budget constraints, you must run it on a single resource-constrained virtual machine. Which learning algorithm should you use?
  • Linear regression
  • Logistic classification
  • Recurrent neural network
  • Feedforward neural network
Answer: A

The short version

A — use linear regression for constrained housing-price prediction. It trains fast, interprets easily, and sips compute on one small VM.

Key concepts in this question

  • Regression task: predicting continuous housing prices rather than classifying categories.
  • Resource constraint: single virtual machine with limited CPU and memory ruling out heavy deep learning.
  • Linear regression fit: closed-form or lightweight iterative solver with minimal tuning and memory.
  • Neural alternatives: recurrent and feedforward nets needing GPUs, large data, and extensive tuning.

Why A is correct

A is correct because housing-price estimation is a continuous regression problem well served by linear models on tabular features. Linear regression runs comfortably on one constrained VM, trains quickly, and offers interpretable coefficients for budget review. Neural options would over-consume resources and complicate deployment without justified accuracy gains.

Why the others are wrong

  • B. Logistic classification predicts categories, not continuous prices.
  • C. Recurrent networks target sequences and demand far more compute than available.
  • D. Feedforward networks add layers and tuning overhead unsuitable for a tiny VM budget.

PDE exam tip

Constrained plus continuous means linear: one small VM predicting prices points to linear regression.

8You are building new real-time data warehouse for your company and will use Google BigQuery streaming inserts. There is no guarantee that data will only be sent in once but you do have a unique ID for each row of data and an event timestamp. You want to ensure that duplicates are not included while interactively querying data. Which query type should you use?
  • Include ORDER BY DESK on timestamp column and LIMIT to 1.
  • Use GROUP BY on the unique ID column and timestamp column and SUM on the values.
  • Use the LAG window function with PARTITION by unique ID along with WHERE LAG IS NOT NULL.
  • Use the ROW_NUMBER window function with PARTITION by unique ID along with WHERE row equals 1.
Answer: D

The short version

D — deduplicate with ROW_NUMBER partitioned by unique ID. Keep row 1 per ID ordered by event time for clean interactive queries.

Key concepts in this question

  • Streaming duplicates: at-least-once BigQuery inserts creating multiple rows per unique event ID.
  • ROW_NUMBER windowing: numbering rows within each ID partition to identify the canonical copy.
  • PARTITION BY ID: grouping duplicates so filtering to row equals 1 retains one record per event.
  • Interactive querying need: deduplication at read time without waiting for background compaction.

Why D is correct

D is correct because partitioning by the unique ID collects all copies of an event, ordering by timestamp selects the preferred version, and keeping row 1 yields exactly one row per ID. This pattern handles unbounded streaming duplicates during ad-hoc analysis. Other window or aggregation tricks either misorder or fail to isolate a single survivor.

Why the others are wrong

  • A. ORDER BY plus LIMIT 1 collapses the whole result to one row instead of one per ID.
  • B. GROUP BY ID plus timestamp with SUM distorts values and does not pick a canonical row.
  • C. LAG with null filtering is fragile for multi-duplicate chains and complicates logic.

PDE exam tip

Dedupe streams with ROW_NUMBER: partition by unique ID and keep where row equals 1.

9Your company is using WILDCARD tables to query data across multiple tables with similar names. The SQL statement is currently failing with the following error: Which table name will make the SQL statement work correctly?
  • ג€˜bigquery-public-data.noaa_gsod.gsodג€˜
  • bigquery-public-data.noaa_gsod.gsod*
  • ג€˜bigquery-public-data.noaa_gsod.gsodג€™*
  • ג€˜bigquery-public-data.noaa_gsod.gsod*`
Answer: D

The short version

D — quote the wildcard table as backtick project dot dataset dot gsod star backtick. Backticks plus trailing star enable BigQuery wildcard scans.

Key concepts in this question

  • Wildcard tables: single query across sharded tables sharing a prefix with star suffix.
  • Backtick quoting: required delimiters around fully qualified names containing dots, dashes, and wildcards.
  • Correct star placement: star outside the table prefix but inside the closing backtick for expansion.
  • Broken variants: missing backticks or misplaced stars that cause syntax or resolution errors.

Why D is correct

D is correct because BigQuery requires the full project dot dataset dot prefix plus star wrapped in backticks for wildcard resolution. The trailing star inside backticks signals scan-all matching tables such as yearly gsod shards. Variants lacking backticks or misplacing the star fail parsing or match no tables.

Why the others are wrong

  • A. Unbackticked name without star cannot resolve as a wildcard table reference.
  • B. Star without backticks breaks fully qualified parsing with dots and dashes.
  • C. Star outside the closing backtick is syntactically invalid for wildcard expansion.

PDE exam tip

Wrap wildcards in backticks: backtick prefix star backtick is the only valid wildcard table form.

10Your company is in a highly regulated industry. One of your requirements is to ensure individual users have access only to the minimum amount of information required to do their jobs. You want to enforce this requirement with Google BigQuery. Which three approaches can you take? (Choose three.)
  • Disable writes to certain tables.
  • Restrict access to tables by role.
  • Ensure that the data is encrypted at all times.
  • Restrict BigQuery API access to approved users.
  • Segregate data across multiple tables or databases.
  • Use Google Stackdriver Audit Logging to determine policy violations.
Answer: B, D, E

The short version

BDE — enforce least privilege with role limits, API control, and segregation. Limit who sees tables, who calls APIs, and where sensitive data lives.

Key concepts in this question

  • Least privilege: granting only minimum information needed for each job function.
  • Role-based table access: IAM roles and dataset ACLs restricting table reads to approved personas.
  • API access governance: allowing only approved users and service accounts to invoke BigQuery operations.
  • Data segregation: splitting sensitive attributes across tables or datasets to narrow exposure.

Why BDE is correct

B is correct because restricting table access by role directly limits rows and columns each user can query. D is correct because controlling BigQuery API invocation prevents unapproved tools and identities from reaching data at all. E is correct because segregating data across tables or databases minimizes what any single grant exposes. Together they implement minimum-necessary access in BigQuery.

Why the others are wrong

  • A. Disabling writes preserves integrity but does not limit read access to minimum information.
  • C. Encryption protects confidentiality at rest and transit without restricting who may query.
  • F. Audit logging detects violations after the fact instead of enforcing least-privilege access.

PDE exam tip

Enforce minimum with three levers: roles for tables, allowlist for APIs, and split storage for sensitivity.

Want the full bank of 320 questions for Professional Data Engineer (Google Cloud)? See all practice exams.