Professional Data Engineer Free Practice Questions — Page 3
Question 11
Your chemical company needs to manually check documentation for customer order. You use a pull subscription in Pub/Sub so that sales agents get details from the order. You must ensure that you do not process orders twice with different sales agents and that you do not add more complexity to this workflow. What should you do?
A. Use a Deduplicate PTransform in Dataflow before sending the messages to the sales agents.
B. Create a transactional database that monitors the pending messages.
C. Use Pub/Sub exactly-once delivery in your pull subscription.
D. Create a new Pub/Sub push subscription to monitor the orders processed in the agent's system.
Show Answer
Correct Answer: C
Explanation: Using Pub/Sub exactly-once delivery with a pull subscription ensures that each message is delivered and acknowledged only once to a subscriber, preventing the same order from being processed by multiple sales agents. It satisfies the requirement to avoid duplicate processing without adding extra systems or workflow complexity.
Question 11
Your Cloud Storage data lake has raw, processed, and historical data in different buckets. Data older than two years is rarely accessed, and all data must be retained for no longer than seven years. You are concerned about rising storage costs. How should you control costs for the historical data bucket?
A. Write a script on a Compute Engine instance, triggered daily by Cloud Scheduler, to scan all objects and delete any older than seven years.
B. Configure an Object Lifecycle Management rule to transition objects older than two years to the Archive storage class and eventually delete them after seven years.
C. Enable the Autoclass feature on your Cloud Storage buckets and select Opt-in to object transitions to Coldline and Archive storage classes.
D. Replicate the buckets to a different region with lower storage costs and configure an Object Lifecycle Management rule to delete objects after seven years.
Show Answer
Correct Answer: B
Explanation: Object Lifecycle Management is the native, lowest‑overhead way to control Cloud Storage costs. A lifecycle rule can automatically transition objects older than two years to a cheaper Archive storage class and then delete them at seven years, meeting both access and retention requirements without custom scripts or added infrastructure.
Question 12
You need to look at BigQuery data from a specific table multiple times a day. The underlying table you are querying is several petabytes in size, but you want to filter your data and provide simple aggregations to downstream users. You want to run queries faster and get up-to-date insights quicker. What should you do?
A. Run a scheduled query to pull the necessary data at specific intervals dally.
B. Use a cached query to accelerate time to results.
C. Limit the query columns being pulled in the final result.
D. Create a materialized view based off of the query being run.
Show Answer
Correct Answer: D
Explanation: A materialized view precomputes and incrementally maintains filtered and aggregated results from a very large BigQuery table. This drastically reduces the amount of data scanned, speeds up repeated queries throughout the day, and still provides near–real-time insights compared to rerunning full queries on petabyte-scale data.
Question 12
You are designing BigQuery tables for large volumes of clickstream event data. Your data analyst team will most frequently query by specific event date ranges and filter by the user ID UUID. You want to optimize table structure for query cost and performance. What should you do?
A. Partition the table by the user ID column and cluster the table by the event date column.
B. Create an ingestion-time partitioned table and cluster it by the user ID column.
C. Cluster the table by both the event date and the user ID columns.
D. Partition the table by the event date column and cluster the table by user ID column.
Show Answer
Correct Answer: D
Explanation: BigQuery performs best when tables are partitioned on a column that is heavily used for range filtering, such as an event date. This allows queries to scan only relevant partitions and significantly reduces cost. Clustering is then ideal for columns frequently used in equality filters, such as user ID UUIDs, to further reduce data scanned within each partition. Partitioning by user ID or clustering by date would be less effective for range-based date queries.
Question 13
You work for an airline and you need to store weather data in a BigQuery table. Weather data will be used as input to a machine learning model. The model only uses the last 30 days of weather data. You want to avoid storing unnecessary data and minimize costs. What should you do?
A. Create a BigQuery table where each record has an ingestion timestamp. Run a scheduled query to delete all the rows with an ingestion timestamp older than 30 days.
B. Create a BigQuery table partitioned by datetime value of the weather date. Set up partition expiration to 30 days.
C. Create a BigQuery table partitioned by ingestion time. Set up partition expiration to 30 days.
D. Create a BigQuery table with a datetime column for the day the weather data refers to. Run a scheduled query to delete rows with a datetime value older than 30 days.
Show Answer
Correct Answer: B
Explanation: The model only needs the last 30 days of data, so the most cost‑efficient approach is to partition the table by the weather date (the data’s logical time) and set partition expiration to 30 days. BigQuery partitions DATETIME/TIMESTAMP columns at day granularity by default, not per second, so this avoids excess partitions while automatically removing old data without scheduled deletes.
Question 13
Your company wants to implement a Retrieval-Augmented Generation (RAG) system to allow employees to query an extensive knowledge base of internal documents, such as policy manuals and project reports. You need to prepare this unstructured text for embedding to be used in the RAG system. What should you do to ensure the system can retrieve the most relevant information?
A. Use Cloud Data Loss Prevention (Cloud DLP) to scan and redact sensitive information within the documents before processing.
B. Store the documents as compressed files in a traditional relational database to enable more efficient storage and retrieval.
C. Convert the unstructured documents into high-dimensional numerical vectors that capture the semantic meaning and relationships of the text.
D. Index each word from the documents into a search engine to enable keyword-based search.
Show Answer
Correct Answer: C
Explanation: For a RAG system, unstructured text must be transformed into embeddings so it can be semantically searched. Converting documents into high-dimensional numerical vectors captures meaning and relationships between pieces of text, enabling similarity search and retrieval of the most relevant context. The other options focus on security, storage, or keyword search, which do not enable semantic retrieval required for RAG.
Question 14
You created an analytics environment on Google Cloud so that your data scientist team can explore data without impacting the on-premises Apache Hadoop solution. The data in the on-premises Hadoop Distributed File System (HDFS) cluster is in Optimized Row Columnar (ORC) formatted files with multiple columns of Hive partitioning. The data scientist team needs to be able to explore the data in a similar way as they used the on-premises HDFS cluster with SQL on the Hive query engine. You need to choose the most cost-effective storage and processing solution. What should you do?
A. Import the ORC files to Bigtable tables for the data scientist team.
B. Import the ORC files to BigQuery tables for the data scientist team.
C. Copy the ORC files on Cloud Storage, then deploy a Dataproc cluster for the data scientist team.
D. Copy the ORC files on Cloud Storage, then create external BigQuery tables for the data scientist team.
Show Answer
Correct Answer: D
Explanation: The requirement is to explore existing ORC data with SQL in a way similar to Hive, while being most cost-effective. Copying the ORC files to Cloud Storage and creating external BigQuery tables allows querying the data directly without transforming it or running and maintaining a Hadoop/Spark cluster. BigQuery supports ORC and Hive-style partitioning for external tables, provides interactive SQL analytics, and avoids Dataproc cluster costs. Bigtable is not suitable for SQL analytics, and importing data into BigQuery managed tables adds unnecessary ingestion cost.
Question 14
You are designing a stateful data processing pipeline that reads data from a Cloud Storage bucket and writes transformed data to a BigQuery table. The pipeline must be highly available and resilient to zonal failures within the us-central1 region. You need to configure a Dataflow pipeline ensuring minimal disruption during a zonal outage. What should you do?
A. Launch the Dataflow job with the --region=us-central1 parameter.
B. Deploy the Dataflow job to a single zone within us-central1 and configure it to use a regional persistent disk to store its state.
C. Deploy the Dataflow job to a single zone within us-central1 and use a multi-regional Cloud Storage bucket to store its state.
D. Launch the Dataflow job with the --zone=us-central1a parameter.
Show Answer
Correct Answer: A
Explanation: Dataflow provides regional jobs that run across multiple zones within a region for high availability. Launching the job with --region=us-central1 allows Dataflow to automatically place workers in different zones and recover from a zonal failure with minimal disruption. The other options explicitly constrain the job to a single zone, which does not meet the resiliency requirement.
Question 15
You have a BigQuery table that ingests data directly from a Pub/Sub subscription. The ingested data is encrypted with a Google-managed encryption key. You need to meet a new organization policy that requires you to use keys from a centralized Cloud Key Management Service (Cloud KMS) project to encrypt data at rest. What should you do?
A. Use Cloud KMS encryption key with Dataflow to ingest the existing Pub/Sub subscription to the existing BigQuery table.
B. Create a new BigQuery table by using customer-managed encryption keys (CMEK), and migrate the data from the old BigQuery table.
C. Create a new Pub/Sub topic with CMEK and use the existing BigQuery table by using Google-managed encryption key.
D. Create a new BigQuery table and Pub/Sub topic by using customer-managed encryption keys (CMEK), and migrate the data from the old BigQuery table.
Show Answer
Correct Answer: B
Explanation: The requirement is to encrypt data at rest in BigQuery using keys from a centralized Cloud KMS project. You cannot change the encryption key of an existing BigQuery table, so you must create a new table configured with CMEK and migrate the existing data. The question does not require changing Pub/Sub encryption; it specifically refers to the ingested data stored in BigQuery.
Question 15
Your team has created several BigQuery curated datasets containing anonymized industry benchmark data. You want to make these datasets easily discoverable and accessible for querying by external partner companies within their own Google Cloud projects. You need a secure and scalable solution. What should you do?
A. Publish the datasets as listings within BigQuery sharing (Analytics Hub).
B. Export the datasets to partner-specific Cloud Storage buckets.
C. Create authorized views for each dataset and grant access to each partner.
D. Grant the roles/bigquery.dataViewer IAM role to the partner group email addresses on the datasets.
Show Answer
Correct Answer: A
Explanation: BigQuery Analytics Hub is purpose-built for securely sharing datasets across Google Cloud projects. Publishing datasets as Analytics Hub listings makes them easily discoverable by external partners, allows self-service subscription, and scales without managing per-partner IAM or copies of data. It maintains centralized control, auditing, and real-time access to the same underlying data, which fits the requirements better than exports, authorized views, or direct IAM grants.
$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.