Google Cloud Professional Data Engineer Exam-style mock test
Google Cloud Professional Data Engineer Practice Exams|Practice test
Full explanations
Exam format
Pass line 70%
33 USD One-time · lifetime access
Enroll →
Sample questions
Example1 · Designing Data Processing Systems
A global investment bank runs analytics in a BigQuery project containing dozens of datasets. External contractors must run ad hoc SQL queries against tables in a single dataset, ds_market_risk, and must not be able to read any other dataset. Following the principle of least privilege, how should the platform team grant access?
・Grant project-level roles/bigquery.dataViewer and roles/bigquery.jobUser, then instruct contractors to query only the approved dataset.
Incorrect. Project-level dataViewer grants read access to every dataset in the project; relying on instructions instead of technical controls violates least privilege.
・Grant roles/bigquery.user on the project so contractors can run query jobs against the datasets they need.
Incorrect. roles/bigquery.user allows running jobs and creating new datasets, but it does not by itself grant table read access scoped to one dataset, and the dataset-creation permission exceeds what contractors need.
・Grant roles/bigquery.admin on ds_market_risk so contractors can manage its tables.
Incorrect. roles/bigquery.admin on the dataset allows contractors to modify, share, and delete tables, which far exceeds the read-and-query requirement.
✓Grant roles/bigquery.dataViewer on the ds_market_risk dataset and roles/bigquery.jobUser on the project.
Correct. Dataset-level dataViewer limits read access to ds_market_risk only, while project-level jobUser lets contractors run query jobs without reading other datasets.
Explanation
BigQuery supports IAM bindings at the dataset level. Granting roles/bigquery.dataViewer on only the ds_market_risk dataset plus roles/bigquery.jobUser at the project level gives contractors exactly the ability to run queries over that one dataset, which is the least-privilege pattern for scoped analyst access.
Example2 · Ingesting and Processing the Data
A global investment bank runs 400 Apache Spark batch jobs on an on-premises Hadoop cluster. The jobs depend on Spark-specific libraries and custom JARs, and the migration to Google Cloud must finish this quarter with as little code rework as possible. The team still wants Google to manage cluster provisioning. Which approach should the bank take?
✓Run the existing Spark jobs and their custom JARs largely unchanged on managed Dataproc clusters that Google provisions.
Correct. Dataproc runs Apache Spark natively, so the existing jobs and custom JARs can be lifted onto managed clusters with little modification.
・Rebuild each job as a visual pipeline in Cloud Data Fusion.
Incorrect. Rebuilding 400 jobs as visual Data Fusion pipelines discards the existing Spark code and would take far longer than the one-quarter deadline allows.
・Rewrite all of the jobs as Apache Beam pipelines on Dataflow.
Incorrect. Rewriting every job in Apache Beam is a full code migration, which contradicts the requirement to minimize code rework.
・Load the data into BigQuery and re-implement the logic as SQL.
Incorrect. Re-implementing Spark logic as BigQuery SQL is a complete rewrite, and Spark-specific library behavior cannot be reproduced in SQL.
Explanation
Dataproc is the managed service for running existing Hadoop and Spark workloads with minimal changes, which fits a tight migration deadline. Dataflow and Cloud Data Fusion would both require rebuilding the jobs, and BigQuery SQL cannot host Spark-specific library code.
Example3 · Storing the Data
A global brokerage ingests equity tick data into Bigtable at several million writes per second. Analysts frequently scan the most recent prices for a single instrument. Which row key design prevents write hotspotting while keeping those per-instrument scans efficient?
・A current-timestamp prefix, then the full instrument symbol
Incorrect. Leading with the current timestamp makes every write land on the same key range, so a single node absorbs the full ingest load and hotspots.
・A sequential numeric ID assigned by the ingestion pipeline at write time
Incorrect. A monotonically increasing sequence number concentrates all writes at the tail of the key space, creating the same hotspot as a timestamp prefix.
・A random UUID per tick, with the symbol in a column qualifier
Incorrect. Random UUIDs distribute writes but scatter an instrument's ticks across the entire table, so retrieving recent prices for one symbol requires a full-table scan.
✓The instrument symbol followed by a reversed timestamp suffix
Correct. Prefixing with the instrument symbol spreads writes across thousands of symbols, and the reversed timestamp sorts each instrument's newest ticks first so recent-price scans read one contiguous range.
Explanation
Bigtable row keys should start with a high-cardinality field that distributes writes, while grouping rows that are read together. Symbol plus reversed timestamp achieves both; timestamp-first or sequential keys hotspot, and random keys destroy scan locality.
Example4 · Preparing and Using Data for Analysis
A genomics research company stores patient-level variant calls in a BigQuery dataset governed under HIPAA. An external biostatistics team needs live, queryable access to cohort-level aggregate statistics, but it must never be able to read the underlying patient rows, and the company wants to avoid maintaining duplicated data. What should you do?
・Copy the aggregated results nightly into a separate table that lives in the partner team's own project.
Incorrect. Nightly copies duplicate data, go stale between loads, and create a second HIPAA-scoped asset to govern, which the company explicitly wants to avoid.
・Grant the team the BigQuery Data Viewer role on the source dataset and tell them to query only the aggregate columns.
Incorrect. Data Viewer on the source dataset lets the team read every patient-level row; relying on them to self-restrict their queries is not an access control.
・Export the aggregate results to Cloud Storage each week and share signed URLs with the biostatistics team.
Incorrect. Exported files are duplicated, weekly-stale snapshots and are not live queryable access; signed URLs also bypass BigQuery's access governance.
✓Create an authorized view that returns only the cohort-level aggregate statistics, and then share that single view with the external biostatistics team.
Correct. An authorized view can query the patient-level table on the team's behalf while the team receives access only to the view, so aggregates stay live and no data is duplicated.
Explanation
Authorized views let consumers query derived results without any permission on the underlying tables, which is exactly the pattern for exposing aggregates over sensitive data. Copies and exports duplicate data and go stale, while direct dataset grants expose patient-level rows.
Example5 · Maintaining and Automating Data Workloads
A genomics research company runs BigQuery transformation pipelines that need about 400 slots for most of the day but spike to roughly 1,600 slots during a four-hour nightly variant-annotation batch. Finance requires a predictable baseline cost, and the team refuses to pay for 1,200 extra slots that would sit idle 20 hours a day. What should you do?
・Purchase a one-year slot commitment sized for the entire 1,600-slot nightly peak so that full capacity is always guaranteed and reserved
Incorrect. Committing to 1,600 slots guarantees the peak but bills for 1,200 unused slots during the other 20 hours each day, which the team explicitly rejects.
・Stay on on-demand pricing and request a quota increase to 1,600 concurrent slots
Incorrect. On-demand pricing bills by bytes scanned, not capacity, so the monthly cost stays unpredictable; a concurrency quota does not create a predictable baseline charge.
✓Create an Enterprise edition reservation with a 400-slot baseline and an autoscaling maximum of 1,600 slots
Correct. A baseline of 400 slots gives finance a predictable floor cost, and reservation autoscaling adds up to 1,200 slots only while the nightly batch runs, billed per second of actual scale-up.
・Build a Cloud Scheduler job that buys a new slot commitment every evening and deletes it when the batch completes
Incorrect. Slot commitments carry minimum terms (one or three years) and cannot be bought and discarded nightly; reservation autoscaling already solves this natively.
Explanation
BigQuery editions let you set a baseline slot count for steady, predictable spend and an autoscaling maximum that adds slots only during bursts. This avoids both the idle cost of a peak-sized commitment and the unpredictable byte-scan billing of on-demand pricing.
Example6 · Designing Data Processing Systems
Helix Genomics stores whole-genome sequencing results in a single BigQuery dataset inside a shared analytics project. Bioinformatics analysts must write and run their own SQL queries against that dataset, but a recent compliance audit requires that they cannot alter tables and cannot read any other dataset in the project. Which IAM configuration satisfies these requirements with least privilege?
・Grant roles/bigquery.dataEditor on the sequencing dataset and roles/bigquery.jobUser at the project level.
Incorrect. roles/bigquery.dataEditor includes bigquery.tables.updateData and table deletion rights, so analysts could alter the sequencing tables, which the audit forbids.
・Grant roles/bigquery.dataViewer at the project level together with roles/bigquery.user so analysts can query every dataset they work with.
Incorrect. Granting dataViewer at the project level exposes every dataset in the project, violating the requirement that analysts read only the sequencing dataset.
・Grant roles/bigquery.admin on the sequencing dataset so analysts manage query access.
Incorrect. roles/bigquery.admin grants destructive permissions such as deleting tables and changing access controls, far exceeding the read-and-query access the analysts need.
✓Grant roles/bigquery.dataViewer on the sequencing dataset and roles/bigquery.jobUser at the project level.
Correct. Dataset-level dataViewer limits read access to only the sequencing dataset, while project-level jobUser lets analysts create and run query jobs without granting any write access to table data.
Explanation
Least privilege is achieved by scoping read access to the dataset with roles/bigquery.dataViewer and adding roles/bigquery.jobUser at the project level so analysts can execute query jobs. Editor and admin roles allow data modification, and project-wide dataViewer exposes unrelated datasets.
Example7 · Designing Data Processing Systems
A machine-tool manufacturer stores CNC telemetry in a BigQuery dataset named plant_telemetry, in the same project as datasets holding HR and finance data. External quality analysts must run SQL queries against plant_telemetry only and must not be able to view any other dataset. How should you grant access?
✓Grant roles/bigquery.dataViewer on the plant_telemetry dataset together with roles/bigquery.jobUser at the project level so the analysts can run queries.
Correct. Dataset-level dataViewer limits read access to plant_telemetry, while project-level jobUser lets the analysts execute query jobs without granting read access to other datasets.
・Grant roles/bigquery.dataViewer at the project level and instruct the analysts to query only the plant_telemetry dataset.
Incorrect. A project-level dataViewer grant exposes every dataset in the project, including HR and finance data; relying on instructions instead of policy violates least privilege.
・Grant roles/bigquery.user at the project level and roles/bigquery.admin on the plant_telemetry dataset to the analysts.
Incorrect. roles/bigquery.admin on the dataset lets the analysts change permissions, share, or delete the dataset, which far exceeds the read-and-query requirement.
・Grant roles/bigquery.dataViewer on the plant_telemetry dataset alone, since it allows reading tables and also running query jobs.
Incorrect. dataViewer only permits reading data and metadata; it does not include the bigquery.jobs.create permission, so the analysts could not run query jobs at all.
Explanation
BigQuery access should combine a dataset-scoped read role with a project-scoped job execution role. roles/bigquery.dataViewer on the single dataset plus roles/bigquery.jobUser on the project gives exactly query-and-read capability on plant_telemetry and nothing more.
Example8 · Designing Data Processing Systems
A freight logistics provider lands shipment events in BigQuery and archives raw files in Cloud Storage. Corporate security policy requires that the company can immediately render all stored data unreadable by disabling a key that its own team controls, and that key rotation follows the corporate schedule rather than Google's. How should you configure encryption?
・Keep the default Google-managed encryption keys, because all BigQuery and Cloud Storage data is already encrypted at rest.
Incorrect. Default encryption gives the customer no key they can disable or rotate; Google manages the key lifecycle entirely, so the revocation requirement is not met.
・Use customer-supplied encryption keys for both services and hold the key material in an on-premises hardware security module.
Incorrect. BigQuery does not support customer-supplied encryption keys, and CSEK requires sending the key with every request instead of supporting a central disable switch.
・Encrypt every record in the application before ingestion and keep those keys inside an application-owned secrets vault.
Incorrect. Client-side encryption of whole records makes the shipment fields opaque to BigQuery, breaking SQL analytics, and adds key distribution burden the policy does not require.
✓Set Cloud KMS keys as CMEK defaults on the BigQuery datasets and the Cloud Storage buckets.
Correct. CMEK with Cloud KMS lets the security team disable or destroy the key to make data unreadable immediately, and rotation schedules are fully customer-controlled.
Explanation
The requirement to revoke data access by disabling a customer-controlled key with custom rotation maps directly to customer-managed encryption keys in Cloud KMS. Both BigQuery and Cloud Storage support CMEK as a default on datasets and buckets, whereas CSEK is unsupported by BigQuery and default encryption offers no customer key control.
Example9 · Designing Data Processing Systems
A factory streams maintenance work orders through a Dataflow pipeline into BigQuery. The free-text comment field sometimes contains technician names and phone numbers. Compliance requires that this PII must never be persisted in BigQuery, while the remainder of each record stays queryable for analytics. What should you do?
・Apply policy tags with column-level security so only privileged users read the comment column.
Incorrect. Column-level security restricts who can read the column, but the raw PII is still stored in BigQuery, which violates the requirement that it never be persisted.
✓Call Sensitive Data Protection from the Dataflow pipeline to de-identify the comment field before rows are written.
Correct. Sensitive Data Protection can inspect free text for infoTypes such as PERSON_NAME and PHONE_NUMBER and mask or redact them in-flight, so PII never reaches BigQuery.
・Encrypt the comment column with a Cloud KMS key so that the stored values stay unreadable without decryption access.
Incorrect. Encrypted values are still persisted PII that key holders can recover, and encrypting the column does not locate or remove identifiers embedded in free text.
・Run a nightly scheduled query that scans newly inserted rows and overwrites any detected names and phone numbers with NULL.
Incorrect. A nightly cleanup means PII lands in BigQuery and remains exposed for up to a day, so the never-persisted requirement is already broken at ingestion time.
Explanation
Because the identifiers are embedded in unstructured text and must never land in the warehouse, the transformation has to happen in-flight. Sensitive Data Protection de-identification invoked from the Dataflow pipeline redacts the PII before the write, while access controls, encryption, or after-the-fact cleanup all persist the raw values first.
Example10 · Designing Data Processing Systems
A B2B SaaS analytics provider stores customer subscription data in a single BigQuery table that includes contract revenue columns. Support engineers must run ad hoc SQL directly against this production table for troubleshooting, but policy forbids them from reading the revenue columns. The platform team wants the restriction enforced no matter how the table is queried. What should you do?
✓Apply policy tags from a Data Catalog taxonomy to the revenue columns and enforce column-level access control.
Correct. Policy tags with column-level access control are enforced by BigQuery itself, so tagged columns are blocked for any query path against the table, including direct ad hoc SQL.
・Grant the engineers BigQuery Data Viewer on a separate dataset of authorized views that exclude the revenue columns from results.
Incorrect. Authorized views only protect users who query through the views; the engineers need direct SQL access to the production table, where the views provide no column restriction.
・Grant the engineers the BigQuery Job User role at the project level so they can run queries without broad access.
Incorrect. BigQuery Job User only permits running jobs; it grants no table read access at all, so the engineers could not troubleshoot, and it cannot restrict individual columns.
・Create a VPC Service Controls perimeter around the project and add the engineers to a restrictive access level.
Incorrect. VPC Service Controls defines a service perimeter that limits where API calls can originate; it has no concept of columns and cannot hide fields inside a table.
Explanation
Column-level security in BigQuery is implemented with policy tags from a Data Catalog taxonomy, and the enforcement happens in the query engine regardless of access path. Authorized views only help when users are forced through the views, and neither Job User nor VPC Service Controls operates at column granularity.
Example11 · Designing Data Processing Systems
An online gaming studio stores player profiles and purchase history for each licensed title in BigQuery and Cloud Storage. A publisher contract requires that the studio be able to render all of a title's data at rest permanently unreadable within minutes of contract termination by revoking encryption keys, without rewriting any application code. How should the data be protected?
・Rely on Google-managed default encryption and delete the title's datasets and buckets when the publisher contract ends.
Incorrect. With default encryption Google holds the keys, so the studio has nothing to revoke; it must depend on deletion processes and retention windows rather than an immediate key-based kill switch.
・Use customer-supplied encryption keys for the storage resources and stop supplying key material at contract termination.
Incorrect. Customer-supplied encryption keys are not supported by BigQuery, so this approach cannot cover the datasets; it also forces key handling on every request.
✓Configure CMEK with Cloud KMS keys per title and disable the key versions when the contract terminates.
Correct. CMEK through Cloud KMS is natively supported by BigQuery and Cloud Storage, and disabling or destroying the key versions makes the encrypted data unreadable almost immediately with no code changes.
・Encrypt sensitive fields inside the game services using keys held in Secret Manager, then purge those secrets at termination.
Incorrect. Application-layer field encryption would require rewriting ingestion and query code for every service, which the requirement explicitly rules out, and it would not cover existing stored objects.
Explanation
Crypto-shredding with CMEK satisfies the contract: both BigQuery and Cloud Storage integrate natively with Cloud KMS, so disabling the key versions revokes Google's ability to decrypt the title's data at rest within minutes. CSEK is unavailable for BigQuery, default encryption leaves no customer-controlled key, and application-layer encryption requires code changes.
Example12 · Designing Data Processing Systems
A national schools authority runs a BigQuery dataset holding standardized test scores keyed to pupil identifiers. By statute, the encryption keys must be generated and rotated under the authority's own control, and auditors must see every key-use event tied to query jobs. The team wants to keep the data in BigQuery without changing the query interface. Which approach satisfies the key-control requirement with the least operational change?
・Export the tables to Cloud Storage, encrypt the files client-side, and query them as external tables
Incorrect. Client-side encryption over external files on Cloud Storage breaks native SQL querying and pushes key handling into application code rather than a managed key store.
・Rely on Google-managed default encryption, which already encrypts BigQuery data at rest transparently
Incorrect. Default encryption uses Google-controlled keys, so the authority cannot own, rotate, or independently audit key usage as the statute demands.
✓Enable customer-managed encryption keys (CMEK) on the dataset using a Cloud KMS key the authority owns and rotates
Correct. CMEK lets the authority supply and rotate a Cloud KMS key for the BigQuery dataset, and KMS logs every key-access event, keeping the native query interface unchanged.
・Create an authorized view over the dataset and grant query access only to approved auditor service accounts in the project
Incorrect. Authorized views control who can read rows but do not give the authority ownership or rotation control over the encryption keys protecting the data.
Explanation
The binding constraint is customer ownership and auditable rotation of encryption keys, which only CMEK backed by Cloud KMS provides for BigQuery. It preserves the native query interface, unlike export-and-encrypt approaches.
Example13 · Designing Data Processing Systems
A regional electricity utility ingests smart-meter readings that include customer names, service addresses, and account numbers into a Cloud Storage landing bucket before loading them into BigQuery. Analysts must profile consumption patterns but must never see direct customer identifiers. The team wants an automated, scalable way to find and mask the personal fields during the pipeline rather than hand-writing regex. Which Google Cloud capability best fits?
・A column-level policy tag hiding the identifier columns from analysts
Incorrect. Policy tags restrict who can read a column but do not detect or transform the personal values, and they require you to already know every identifier column.
✓Sensitive Data Protection (Cloud DLP) de-identification with built-in infoType detectors applied automatically
Correct. Sensitive Data Protection (Cloud DLP) uses built-in infoType detectors to locate names, addresses, and account numbers and applies de-identification transforms automatically across large volumes.
・Object Lifecycle Management on the bucket to delete vendor files after each load
Incorrect. Lifecycle deletion only removes files on a schedule; it neither discovers nor masks personal fields for the analysts who still need profiled data.
・A VPC Service Controls perimeter around the project to block exfiltration of raw readings
Incorrect. VPC Service Controls prevents data from leaving the perimeter but performs no discovery or masking of the personal fields inside the dataset.
Explanation
The requirement is automated discovery plus masking of PII at scale, which is exactly Sensitive Data Protection's infoType detection and de-identification role. Policy tags and perimeters govern access or exfiltration but do not transform values.
Example14 · Designing Data Processing Systems
A reinsurance underwriting platform ingests broker submissions containing policyholder names, national ID numbers, and medical history free-text into a BigQuery landing dataset. Compliance requires that before analysts query the data, every column and free-text field be scanned to find and classify any personal identifiers, and that high-sensitivity findings be de-identified with format-preserving tokenization. Which service directly performs this discovery and transformation on the data?
・Cloud Key Management Service, which wraps each column value with a customer-managed encryption key
Incorrect. Cloud KMS manages keys for encryption but does not scan data to discover or classify PII, nor does it tokenize values.
✓Cloud Data Loss Prevention, using inspection and de-identification templates to classify the identifiers and then tokenize them
Correct. Cloud DLP (Sensitive Data Protection) inspects structured and free-text data to classify infoTypes and applies de-identification such as format-preserving tokenization.
・VPC Service Controls, by placing the BigQuery dataset inside a service perimeter that blocks any query touching sensitive columns
Incorrect. VPC Service Controls prevents exfiltration across a perimeter but cannot find, classify, or transform individual identifiers inside a dataset.
・Cloud Audit Logs, by recording every read of the sensitive columns so that reviewers can retroactively redact exposed identifiers
Incorrect. Cloud Audit Logs records access events after the fact and performs no discovery, classification, or de-identification of the content.
Explanation
Finding, classifying, and de-identifying PII with techniques like tokenization is the dedicated role of Cloud DLP / Sensitive Data Protection. KMS, VPC Service Controls, and Audit Logs address encryption keys, perimeter exfiltration, and access auditing respectively, not content inspection.
Example15 · Designing Data Processing Systems
A global hotel booking company must store all European guest reservation data physically within the EU to satisfy data sovereignty rules, while its analytics team in Singapore still needs to run aggregate queries. The design lead wants to guarantee that the raw BigQuery tables for EU guests never leave EU territory even as the schema grows. Which design choice enforces this residency constraint at the storage layer?
✓Create the BigQuery dataset in a specific EU region or in the EU multi-region so that all of the stored table data physically remains within EU data centers
Correct. Setting the dataset location to an EU region or the EU multi-region pins all stored table data to EU data centers, satisfying residency requirements.
・Keep the dataset in the US multi-region but attach a resource label indicating the data is European so that tooling can filter it later
Incorrect. A label is only metadata; the table data would still physically reside in US data centers, violating residency.
・Store the tables in the US and rely on authorized views that strip location-sensitive columns before the Singapore analysts read them
Incorrect. Authorized views control column exposure but the underlying US-stored tables still place the raw data outside the EU.
・Enable BigQuery result caching in the Singapore region so that repeated analytic queries avoid re-reading the underlying source rows
Incorrect. Result caching affects query performance and cached results, not where the source tables are physically stored.
Explanation
Data residency is enforced by choosing a dataset location within the required jurisdiction, because BigQuery stores a dataset's data only in its configured location. Labels, views, and caching do not move or constrain the physical storage location.
▶ Try 10 free questions (graded)