Google

Professional Data Engineer Free Practice Questions — Page 2

Question 6

You are migrating your on-premises data warehouse to BigQuery. As part of the migration, you want to facilitate cross-team collaboration to get the most value out of the organization’s data. You need to design an architecture that would allow teams within the organization to securely publish, discover, and subscribe to read-only data in a self-service manner. You need to minimize costs while also maximizing data freshness. What should you do?

A. Use Analytics Hub to facilitate data sharing.
B. Create authorized datasets to publish shared data in the subscribing team's project.
C. Create a new dataset for sharing in each individual team’s project. Grant the subscribing team the bigquery.dataViewer role on the dataset.
D. Use BigQuery Data Transfer Service to copy datasets to a centralized BigQuery project for sharing.
Show Answer
Correct Answer: A
Explanation:
Analytics Hub is purpose-built for secure, read-only, self-service data sharing in BigQuery. It allows teams to publish datasets once and lets other teams discover and subscribe without copying data, which minimizes storage and transfer costs while ensuring data freshness. The other options either require data duplication, manual permission management, or additional transfer costs, making them less suitable for scalable cross-team collaboration.

Question 6

Your retail company is concerned about their BigQuery analytics spend. The company runs several queries that require the use of the same aggregation for the store ID and real-time sales volume. You need to implement the optimal solution that minimizes analytics spend and returns faster results. What should you do?

A. Create a new table from a CSV file with the repeated aggregation for the other queries to reference for faster processing.
B. Create a materialized view to minimize repetitive computations.
C. Use join acceleration with primary and foreign keys to increase query joining to live data.
D. Leverage partitioning to minimize the number of bytes read.
Show Answer
Correct Answer: B
Explanation:
Materialized views in BigQuery precompute and store the results of an aggregation and automatically maintain them as underlying data changes. This avoids repeatedly scanning and aggregating large base tables, which reduces bytes processed (lower cost) and returns faster query results compared to recomputing the same aggregation each time.

Question 7

You have several different unstructured data sources, within your on-premises data center as well as in the cloud. The data is in various formats, such as Apache Parquet and CSV. You want to centralize this data in Cloud Storage. You need to set up an object sink for your data that allows you to use your own encryption keys. You want to use a GUI-based solution. What should you do?

A. Use BigQuery Data Transfer Service to move files into BigQuery.
B. Use Storage Transfer Service to move files into Cloud Storage
C. Use Dataflow to move files into Cloud Storage
D. Use Cloud Data Fusion to move files into Cloud Storage.
Show Answer
Correct Answer: D
Explanation:
The requirements are: move unstructured data from on‑prem and cloud sources into Cloud Storage, support multiple file formats, use customer‑managed encryption keys (CMEK), and use a GUI‑based solution. Cloud Data Fusion is a fully managed, GUI‑driven data integration service that supports diverse sources and sinks, can write directly to Cloud Storage, and supports CMEK. Storage Transfer Service can move data but is primarily configured via APIs/CLI and has limitations around encryption control and GUI usage. BigQuery Data Transfer Service and Dataflow do not fit the object‑sink and GUI requirements. Therefore, Cloud Data Fusion is the correct choice.

Question 7

You are preparing data to serve a sales demand prediction model. The training data undergoes several pre-processing steps, including scaling numerical features and one-hot encoding categorical features. The model is deployed on Vertex AI Endpoints. You need to prevent training-serving skew and ensure accurate predictions in production. You want a solution that is easy to implement. What should you do?

A. Implement a custom handler within the Vertex AI Endpoint to automatically perform data transformations before the model makes a prediction.
B. Replicate the exact same pre-processing logic in the inference pipeline that was used during model training.
C. Store the raw, unprocessed data in a separate Cloud Storage bucket exclusively for serving.
D. Ensure the serving data is a smaller, random sample of the training data.
Show Answer
Correct Answer: B
Explanation:
Training-serving skew is caused when the data seen by the model during inference is processed differently than during training. Since the model was trained on scaled numerical features and one-hot encoded categorical features, the exact same preprocessing steps must be applied at serving time. Replicating the same preprocessing logic in the inference pipeline ensures consistency, prevents skew, and is the simplest reliable solution. Other options do not guarantee identical transformations or directly address skew.

Question 8

You want to migrate an Apache Spark 3 batch job from on-premises to Google Cloud. You need to minimally change the job so that the job reads from Cloud Storage and writes the result to BigQuery. Your job is optimized for Spark, where each executor has 8 vCPU and 16 GB memory, and you want to be able to choose similar settings. You want to minimize installation and management effort to run your job. What should you do?

A. Execute the job as part of a deployment in a new Google Kubernetes Engine cluster.
B. Execute the job from a new Compute Engine VM.
C. Execute the job in a new Dataproc cluster.
D. Execute as a Dataproc Serverless job.
Show Answer
Correct Answer: D
Explanation:
The primary requirement is to minimize installation and management effort while making minimal changes to an existing Spark 3 batch job. Dataproc Serverless runs Spark without requiring cluster provisioning or lifecycle management, unlike Compute Engine, GKE, or a standard Dataproc cluster. It natively integrates with Cloud Storage and BigQuery and still allows configuring Spark executor cores and memory to closely match the existing 8 vCPU / 16 GB executor setup. Therefore, Dataproc Serverless best satisfies all constraints.

Question 8

You are building a system to process financial transactions. The system must handle a high throughput of concurrent user operations and each operation requires low-latency reads and writes to individual records. You need to identify a storage solution that guarantees ACID compliance for the processed transactions. You want a Google Cloud managed service. What should you do?

A. Select Bigtable.
B. Select BigQuery.
C. Select Cloud Storage.
D. Select Spanner.
Show Answer
Correct Answer: D
Explanation:
Cloud Spanner is a fully managed Google Cloud database that provides strong ACID guarantees, horizontal scalability, and low-latency reads and writes for individual records. It is designed for high-throughput, highly concurrent transactional workloads such as financial systems. Bigtable is not fully ACID, BigQuery is analytical, and Cloud Storage is object storage.

Question 9

You are using BigQuery with a regional dataset that includes a table with the daily sales volumes. This table is updated multiple times per day. You need to protect your sales table in case of regional failures with a recovery point objective (RPO) of less than 24 hours, while keeping costs to a minimum. What should you do?

A. Schedule a daily export of the table to a Cloud Storage dual or multi-region bucket.
B. Schedule a daily copy of the dataset to a backup region.
C. Schedule a daily BigQuery snapshot of the table.
D. Modify ETL job to load the data into both the current and another backup region.
Show Answer
Correct Answer: A
Explanation:
A daily export of the BigQuery table to a Cloud Storage dual- or multi-region bucket protects against regional failures because the backup is stored outside the source region. It meets the RPO requirement of less than 24 hours and is the most cost-effective option, as Cloud Storage is cheaper than duplicating BigQuery storage or running multi-region ETL. BigQuery snapshots remain in the same region, and cross-region dataset copies or dual-write ETL increase costs unnecessarily.

Question 9

You are developing a fraud detection model using BigQuery ML. You have a raw transaction dataset and need to create new features such as the average_transaction_amount_last_24_hours and time_since_last_transaction. These features require aggregation and time-window calculations on the existing data. The goal is to ensure that these features are consistently applied during both model training and prediction without manual intervention. You need to prepare these features efficiently for your model. What should you do?

A. Implement a Cloud Run function that triggers on new transactions, calculates the features, and inserts them into a feature store before model serving.
B. Export the BigQuery data to Cloud Storage, perform feature engineering using a custom Python script in a Dataflow job, and then re-import the engineered features into BigQuery.
C. Use the TRANSFORM clause within the CREATE MODEL statement, leveraging SQL functions for aggregations and time-based calculations.
D. Create a separate BigQuery table containing pre-computed features using complex SQL queries and join this table with the raw data during model training and serving.
Show Answer
Correct Answer: C
Explanation:
Using the TRANSFORM clause in BigQuery ML lets you define SQL-based aggregations and time-window features once and have them automatically applied during both training and prediction. This ensures consistency, avoids manual feature pipelines, and keeps feature engineering close to the data with efficient execution in BigQuery.

Question 10

You are preparing an organization-wide dataset. You need to preprocess customer data stored in a restricted bucket in Cloud Storage. The data will be used to create consumer analyses. You need to follow data privacy requirements, including protecting certain sensitive data elements, while also retaining all of the data for potential future use cases. What should you do?

A. Use the Cloud Data Loss Prevention API and Dataflow to detect and remove sensitive fields from the data in Cloud Storage. Write the filtered data in BigQuery.
B. Use customer-managed encryption keys (CMEK) to directly encrypt the data in Cloud Storage. Use federated queries from BigQuery. Share the encryption key by following the principle of least privilege.
C. Use Dataflow and the Cloud Data Loss Prevention API to mask sensitive data. Write the processed data in BigQuery.
D. Use Dataflow and Cloud KMS to encrypt sensitive fields and write the encrypted data in BigQuery. Share the encryption key by following the principle of least privilege.
Show Answer
Correct Answer: C
Explanation:
The requirement is to protect sensitive data while retaining all data for future use. Removing fields (A) violates retention. CMEK alone (B) does not selectively protect sensitive elements for analytics. Encrypting fields with KMS (D) limits usability unless keys are shared broadly. Using Dataflow with Cloud DLP to mask sensitive fields preserves the data, satisfies privacy requirements, and produces an analysis-ready dataset in BigQuery.

Question 10

You analyze user clickstream data to personalize content recommendations. The data arrives continuously and needs to be processed with low latency, including transformations such as sessionization (grouping clicks by user within a time window) and aggregation of user activity. You need to identify a scalable solution to handle millions of events each second and be resilient to late-arriving data. What should you do?

A. Use Firebase Realtime Database for ingestion and storage, and Cloud Run functions for processing and analytics.
B. Use Cloud Data Fusion for ingestion and transformation, and Cloud SQL for storage and analytics.
C. Use Pub/Sub for ingestion, Dataflow with Apache Beam for processing, and BigQuery for storage and analytics.
D. Use Cloud Storage for ingestion, Dataproc with Apache Spark for batch processing, and BigQuery for storage and analytics.
Show Answer
Correct Answer: C
Explanation:
This workload requires true stream processing with very low latency, massive scalability, and correct handling of late-arriving events. Pub/Sub is designed to ingest millions of events per second reliably. Dataflow (Apache Beam) provides native streaming support with windowing, sessionization, watermarks, and late-data handling. BigQuery is optimized for large-scale analytical storage and querying of streaming data. The other options are either not designed for high-throughput streaming, lack advanced event-time processing, or are primarily batch-oriented.

$19

Get all 328 questions with detailed answers and explanations

  • Instant download HTML + PDF delivered the moment payment clears.
  • Secure Stripe checkout we never see or store your card details.
  • 7-day refund if files are defective see our refund policy.