Professional Data Engineer Free Practice Questions — Page 2
Question 3
You are using Dataflow to build a streaming data pipeline to analyze user website click activity from Pub/Sub. You need to calculate the number of clicks for each user site visit. A site visit is defined as a period of activity followed by 30 minutes of inactivity for a specific user. What should you do?
A. Use tumbling windows with a 30-minute window.
B. Use hopping windows with a 30-minute window, and a 1-minute period.
C. Use hopping windows with a 30-minute window, and a 30-minute period.
D. Use session windows with a 30-minute gap duration.
Show Answer
Correct Answer: D
Explanation: A session window is specifically designed to group events separated by periods of inactivity. Defining a 30-minute gap duration means all clicks from the same user are counted in the same session until there has been 30 minutes with no activity, which matches the site visit definition. Tumbling and hopping windows use fixed time boundaries and do not adapt to user inactivity.
Question 4
You are collecting IoT sensor data from millions of devices across the world and storing the data in BigQuery. Your access pattern is based on recent data, filtered by location_id and device_version with the following query:
You want to optimize your queries for cost and performance. How should you structure your data?
A. Partition table data by create_date, location_id, and device_version.
B. Partition table data by create_date, cluster table data by location_id, and device_version.
C. Cluster table data by create_date, location_id, and device_version.
D. Cluster table data by create_date, partition by location_id, and device_version.
Show Answer
Correct Answer: B
Explanation: Partition the table by `create_date` so BigQuery can prune partitions outside the recent date range. Cluster within those partitions by `location_id` and `device_version` to make the equality filters more efficient and reduce data scanned.
Question 4
You are defining the data governance strategy for a new BigQuery table with medical and financial data. You want a scalable solution that ensures the clinical researchers can access patient medical data without financial information, while allowing the accounting team to access only financial data with minimal patient identifiers. What should you do?
A. Implement column-level security policies in BigQuery tables with IAM permissions.
B. Create separate tables for personally identifiable information (PII), financial data, and anonymized medical data. Use IAM permissions to control access to each table.
C. Implement row-level security policies in BigQuery tables with IAM permissions.
D. Create separate datasets with authorized views exposing only approved data.
Show Answer
Correct Answer: A
Explanation: Column-level security in BigQuery, implemented with Data Catalog policy tags and enforced through IAM, is designed to restrict access to specific columns within the same table. This provides a scalable solution where clinical researchers can see medical columns but not financial columns, while accounting can access financial columns and only the minimal identifier columns they require. Row-level security filters records rather than columns, and splitting data into separate tables or relying on authorized views adds more maintenance overhead and is less scalable for this use case.
Question 5
Your company is selecting a system to centralize data ingestion and delivery. You are considering messaging and data integration systems to address the requirements. The key requirements are:
✑ The ability to seek to a particular offset in a topic, possibly back to the start of all data ever captured
✑ Support for publish/subscribe semantics on hundreds of topics
Retain per-key ordering -
Which system should you choose?
A. Apache Kafka
B. Cloud Storage
C. Dataflow
D. Firebase Cloud Messaging
Show Answer
Correct Answer: A
Explanation: Apache Kafka supports seeking to a specific offset in a topic, publish/subscribe across many topics, and ordered messages within each partition. Using the same key to route related messages to the same partition preserves per-key ordering. Access to older data depends on the topic’s retention settings.
Question 5
You are designing a data lake on Google Cloud to store vast amounts of customer interaction data from various sources, such as websites, mobile apps, and social media. You need to ensure that this data, which arrives in different formats, is consistently cataloged and easy for data analysts to discover and use. You also want to perform basic data quality checks and transformations before the data is consumed by downstream applications. You need an automated and managed data governance solution. What should you do?
A. Use Cloud Storage as the central repository. Use Vertex AI to classify and process the data and perform data quality checks.
B. Stream all the data directly into BigQuery, where it is automatically cataloged and governed.
C. Use Cloud Storage and BigQuery as repositories. Use Dataplex Universal Catalog for metadata discovery, data quality checks, and transformations.
D. Use Cloud Storage as the central repository. Use a Cloud Run function to catalog, transform the data, and perform data quality checks.
Show Answer
Correct Answer: C
Explanation: Dataplex is Google Cloud's managed data fabric and governance service for data lakes. It provides a universal catalog for metadata discovery, supports data quality scanning, and integrates with Cloud Storage and BigQuery while enabling managed governance and transformations. The other options either use services not intended for catalog/governance (Vertex AI, Cloud Run) or incorrectly imply BigQuery alone provides the required governance across heterogeneous lake data.
Question 6
You are designing a basket abandonment system for an ecommerce company. The system will send a message to a user based on these rules:
✑ No interaction by the user on the site for 1 hour
Has added more than $30 worth of products to the basket
✑ Has not completed a transaction
You use Google Cloud Dataflow to process the data and decide if a message should be sent. How should you design the pipeline?
A. Use a fixed-time window with a duration of 60 minutes.
B. Use a sliding time window with a duration of 60 minutes.
C. Use a session window with a gap time duration of 60 minutes.
D. Use a global window with a time based trigger with a delay of 60 minutes.
Show Answer
Correct Answer: C
Explanation: Use a session window keyed by user with a 60-minute inactivity gap. It groups each user’s activity into a session and closes the session after an hour without interaction, allowing the pipeline to check the basket value and whether a transaction was completed before sending a message.
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 precompute and incrementally maintain aggregation results in BigQuery. When multiple queries repeatedly use the same aggregation, they reduce repeated computation, lower query costs, and improve performance compared with recomputing the aggregation each time. Creating a separate CSV table is manual and not automatically maintained, join acceleration is unrelated to repeated aggregations, and partitioning reduces scanned data but does not eliminate repeated aggregation work.
Question 7
Your 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?
A. 'bigquery-public-data.noaa_gsod.gsod'
B. bigquery-public-data.noaa_gsod.gsod*
C. 'bigquery-public-data.noaa_gsod.gsod'*
D. 'bigquery-public-data.noaa_gsod.gsod*`
Show Answer
Correct Answer: D
Explanation: BigQuery wildcard table names must be enclosed in backticks, including the `*`. The correct identifier is `bigquery-public-data.noaa_gsod.gsod*`. Option D appears to have a formatting typo; it is the intended backtick-quoted option.
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 avoided by applying the same preprocessing transformations at inference that were used during training. Replicating the identical scaling and one-hot encoding logic ensures the model receives inputs in the same representation. The other options do not address consistency of preprocessing; while embedding preprocessing in serving can work, the key requirement is identical preprocessing, making B the best answer.
Question 8
Flowlogistic Case Study -
Company Overview -
Flowlogistic is a leading logistics and supply chain provider. They help businesses throughout the world manage their resources and transport them to their final destination. The company has grown rapidly, expanding their offerings to include rail, truck, aircraft, and oceanic shipping.
Company Background -
The company started as a regional trucking company, and then expanded into other logistics market. Because they have not updated their infrastructure, managing and tracking orders and shipments has become a bottleneck. To improve operations, Flowlogistic developed proprietary technology for tracking shipments in real time at the parcel level. However, they are unable to deploy it because their technology stack, based on Apache Kafka, cannot support the processing volume. In addition, Flowlogistic wants to further analyze their orders and shipments to determine how best to deploy their resources.
Solution Concept -
Flowlogistic wants to implement two concepts using the cloud:
✑ Use their proprietary technology in a real-time inventory-tracking system that indicates the location of their loads
✑ Perform analytics on all their orders and shipment logs, which contain both structured and unstructured data, to determine how best to deploy resources, which markets to expand info. They also want to use predictive analytics to learn earlier when a shipment will be delayed.
Existing Technical Environment -
Flowlogistic architecture resides in a single data center:
✑ Databases
8 physical servers in 2 clusters
- SQL Server `" user data, inventory, static data
3 physical servers
- Cassandra `" metadata, tracking messages
10 Kafka servers `" tracking message aggregation and batch insert
✑ Application servers `" customer front end, middleware for order/customs
60 virtual machines across 20 physical servers
- Tomcat `" Java services
- Nginx `" static content
- Batch servers
✑ Storage appliances
- iSCSI for virtual machine (VM) hosts
- Fibre Channel storage area network (FC SAN) `" SQL server storage
- Network-attached storage (NAS) image storage, logs, backups
✑ 10 Apache Hadoop /Spark servers
- Core Data Lake
- Data analysis workloads
✑ 20 miscellaneous servers
- Jenkins, monitoring, bastion hosts,
Business Requirements -
Build a reliable and reproducible environment with scaled panty of production.
✑ Aggregate data in a centralized Data Lake for analysis
✑ Use historical data to perform predictive analytics on future shipments
✑ Accurately track every shipment worldwide using proprietary technology
✑ Improve business agility and speed of innovation through rapid provisioning of new resources
✑ Analyze and optimize architecture for performance in the cloud
✑ Migrate fully to the cloud if all other requirements are met
Technical Requirements -
✑ Handle both streaming and batch data
✑ Migrate existing Hadoop workloads
✑ Ensure architecture is scalable and elastic to meet the changing demands of the company.
✑ Use managed services whenever possible
✑ Encrypt data flight and at rest
✑ Connect a VPN between the production data center and cloud environment
SEO Statement -
We have grown so quickly that our inability to upgrade our infrastructure is really hampering further growth and efficiency. We are efficient at moving shipments around the world, but we are inefficient at moving data around.
We need to organize our information so we can more easily understand where our customers are and what they are shipping.
CTO Statement -
IT has never been a priority for us, so as our data has grown, we have not invested enough in our technology. I have a good staff to manage IT, but they are so busy managing our infrastructure that I cannot get them to do the things that really matter, such as organizing our data, building the analytics, and figuring out how to implement the CFO' s tracking technology.
CFO Statement -
Part of our competitive advantage is that we penalize ourselves for late shipments and deliveries. Knowing where out shipments are at all times has a direct correlation to our bottom line and profitability. Additionally, I don't want to commit capital to building out a server environment.
Flowlogistic wants to use Google BigQuery as their primary analysis system, but they still have Apache Hadoop and Spark workloads that they cannot move to
BigQuery. Flowlogistic does not know how to store the data that is common to both workloads. What should they do?
A. Store the common data in BigQuery as partitioned tables.
B. Store the common data in BigQuery and expose authorized views.
C. Store the common data encoded as Avro in Google Cloud Storage.
D. Store he common data in the HDFS storage for a Google Cloud Dataproc cluster.
Show Answer
Correct Answer: C
Explanation: Store the shared data as Avro files in Cloud Storage. BigQuery can query Avro data in Cloud Storage, and Hadoop/Spark workloads can also read it, giving both systems access to a common dataset. BigQuery views do not make data directly available to Hadoop/Spark, and Dataproc HDFS storage is not an appropriate shared, durable store.
$19
Get all 332 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.