Limited-Time Offer: Enjoy 50% Savings! Ends in 00h 00m 00s Coupon code: 50OFF
Skip to content

Free Google Cloud Certified Professional Data Engineer Professional-Data-Engineer Exam Questions

Page: 1 / 27 Total 401 questions

Want more questions? Get Premium Access.

Question 1

You want to analyze hundreds of thousands of social media posts daily at the lowest cost and with the fewest steps.

You have the following requirements:

You will batch-load the posts once per day and run them through the Cloud Natural Language API.

You will extract topics and sentiment from the posts.

You must store the raw posts for archiving and reprocessing.

You will create dashboards to be shared with people both inside and outside your organization.

You need to store both the data extracted from the API to perform analysis as well as the raw social media posts for historical archiving. What should you do?

Correct Answer: D. Feed to social media posts into the API directly from the source, and write the extracted data from the API into BigQuery.

Question 2

You have data located in BigQuery that is used to generate reports for your company. You have noticed some weekly executive report fields do not correspond to format according to company standards for example, report errors include different telephone formats and different country code identifiers. This is a frequent issue, so you need to create a recurring job to normalize the data. You want a quick solution that requires no coding What should you do?

Correct Answer: A. Use Cloud Data Fusion and Wrangler to normalize the data, and set up a recurring job.
Explanation:

Cloud Data Fusion is a fully managed, cloud-native data integration service that allows you to build and manage data pipelines with a graphical interface. Wrangler is a feature of Cloud Data Fusion that enables you to interactively explore, clean, and transform data using a spreadsheet-like UI. You can use Wrangler to normalize the data in BigQuery by applying various directives, such as parsing, formatting, replacing, and validating data. You can also preview the results and export the wrangled data to BigQuery or other destinations. You can then set up a recurring job in Cloud Data Fusion to run the Wrangler pipeline on a schedule, such as weekly or daily. This way, you can create a quick and code-free solution to normalize the data for your reports.Reference:

Cloud Data Fusion overview

Wrangler overview

Wrangle data from BigQuery

[Scheduling pipelines]


Question 3

You have a BigQuery table that contains customer data, including sensitive information such as names and addresses. You need to share the customer data with your data analytics and consumer support teams securely. The data analytics team needs to access the data of all the customers, but must not be able to access the sensitive data. The consumer support team needs access to all data columns, but must not be able to access customers that no longer have active contracts. You enforced these requirements by using an authorized dataset and policy tags After implementing these steps, the data analytics team reports that they still have access to the sensitive columns. You need to ensure that the data analytics team does not have access to restricted data What should you do?

Choose 2 answers

Correct Answer: B. Ensure that the data analytics team members do not have the Data Catalog Fine-Grained Reader role for the policy tags.; C. Enforce access control in the policy tag taxonomy.
Explanation:

To ensure that the data analytics team does not have access to sensitive columns, you should:

B . Ensure that the data analytics team members do not have the Data Catalog Fine-Grained Reader role for the policy tags.This role allows users to read metadata for data assets that have policy tags applied, which could include sensitive information.

C . Enforce access control in the policy tag taxonomy.By setting access control at the policy tag level, you can restrict access to specific columns within a dataset, ensuring that only authorized users can view sensitive data.


Question 4

You are running a streaming pipeline with Dataflow and are using hopping windows to group the data as the data arrives. You noticed that some data is arriving late but is not being marked as late data, which is resulting in inaccurate aggregations downstream. You need to find a solution that allows you to capture the late data in the appropriate window. What should you do?

Correct Answer: D. Use watermarks to define the expected data arrival window Allow late data as it arrives.
Explanation:

Watermarks are a way of tracking the progress of time in a streaming pipeline. They are used to determine when a window can be closed and the results emitted. Watermarks can be either event-time based or processing-time based. Event-time watermarks track the progress of time based on the timestamps of the data elements, while processing-time watermarks track the progress of time based on the system clock. Event-time watermarks are more accurate, but they require the data source to provide reliable timestamps. Processing-time watermarks are simpler, but they can be affected by system delays or backlogs.

By using watermarks, you can define the expected data arrival window for each windowing function. You can also specify how to handle late data, which is data that arrives after the watermark has passed. You can either discard late data, or allow late data and update the results as new data arrives. Allowing late data requires you to use triggers to control when the results are emitted.

In this case, using watermarks and allowing late data is the best solution to capture the late data in the appropriate window. Changing the windowing function to session windows or tumbling windows will not solve the problem of late data, as they still rely on watermarks to determine when to close the windows. Expanding the hopping window might reduce the amount of late data, but it will also change the semantics of the windowing function and the results.


Streaming pipelines | Cloud Dataflow | Google Cloud

Windowing | Apache Beam

Question 5

Which is the preferred method to use to avoid hotspotting in time series data in Bigtable?

Correct Answer: A. Field promotion
Explanation:

By default, prefer field promotion. Field promotion avoids hotspotting in almost all cases, and it tends to make it easier to design a row key that facilitates queries.


Question 6

You are implementing workflow pipeline scheduling using open source-based tools and Google Kubernetes Engine (GKE). You want to use a Google managed service to simplify and automate the task. You also want to accommodate Shared VPC networking considerations. What should you do?

Correct Answer: D. Use Cloud Composer in a Shared VPC configuration. Place the Cloud Composer resources in the service project.
Explanation:

Shared VPC requires that you designate a host project to which networks and subnetworks belong and a service project, which is attached to the host project. When Cloud Composer participates in a Shared VPC, the Cloud Composer environment is in the service project.Reference:https://cloud.google.com/composer/docs/how-to/managing/configuring-shared-vpc


Question 7

Which row keys are likely to cause a disproportionate number of reads and/or writes on a particular node in a Bigtable cluster (select 2 answers)?

Correct Answer: A. A sequential numeric ID; B. A timestamp followed by a stock symbol
Explanation:

using a timestamp as the first element of a row key can cause a variety of problems.

In brief, when a row key for a time series includes a timestamp, all of your writes will target a single node; fill that node; and then move onto the next node in the cluster, resulting in hotspotting.

Suppose your system assigns a numeric ID to each of your application's users. You might be tempted to use the user's numeric ID as the row key for your table. However, since new users are more likely to be active users, this approach is likely to push most of your traffic to a small number of nodes. [https://cloud.google.com/bigtable/docs/schema-design]


Question 8

Your team is responsible for developing and maintaining ETLs in your company. One of your Dataflow jobs is failing because of some errors in the input data, and you need to improve reliability of the pipeline (incl. being able to reprocess all failing data).

What should you do?

Correct Answer: C. Add a try... catch block to your DoFn that transforms the data, write erroneous rows to PubSub directly from the DoFn.

Question 9

You store and analyze your relational data in BigQuery on Google Cloud with all data that resides in US regions. You also have a variety of object stores across Microsoft Azure and Amazon Web Services (AWS), also in US regions. You want to query all your data in BigQuery daily with as little movement of data as possible. What should you do?

Correct Answer: B. Create a Dataflow pipeline to ingest files from Azure and AWS to BigQuery.
Explanation:

BigQuery Omni is a multi-cloud analytics solution that lets you use the BigQuery interface to analyze data stored in other public clouds, such as AWS and Azure, without moving or copying the data. BigLake tables are a type of external table that let you query structured data in external data stores with access delegation. By using BigQuery Omni and BigLake tables, you can query data in AWS and Azure object stores directly from BigQuery, with minimal data movement and consistent performance.Reference:

1: Introduction to BigLake tables

2: Deep dive on how BigLake accelerates query performance

3: BigQuery Omni and BigLake (Analytics Data Federation on GCP)


Question 10

You are working on a linear regression model on BigQuery ML to predict a customer's likelihood of purchasing your company's products. Your model uses a city name variable as a key predictive component in order to train and serve the model your data must be organized in columns. You want to prepare your data using the least amount of coding while maintaining the predictable variables. What should you do?

Correct Answer: C. Cloud Data Fusion to assign each city to a region that is labeled as 1, 2 3, 4, or 5, and then use that number to represent the city in the model.

Question 11

Which of the following job types are supported by Cloud Dataproc (select 3 answers)?

Correct Answer: A. Hive; B. Pig; D. Spark
Explanation:

Cloud Dataproc provides out-of-the box and end-to-end support for many of the most popular job types, including Spark, Spark SQL, PySpark, MapReduce, Hive, and Pig jobs.


Question 12

The Dataflow SDKs have been recently transitioned into which Apache service?

Correct Answer: D. Apache Beam
Explanation:

Dataflow SDKs are being transitioned to Apache Beam, as per the latest Google directive


Question 13

Which of the following is NOT one of the three main types of triggers that Dataflow supports?

Correct Answer: A. Trigger based on element size in bytes
Explanation:

There are three major kinds of triggers that Dataflow supports: 1. Time-based triggers 2. Data-driven triggers. You can set a trigger to emit results from a window when that window has received a certain number of data elements. 3. Composite triggers. These triggers combine multiple time-based or data-driven triggers in some logical way


Question 14

You currently have transactional data stored on-premises in a PostgreSQL database. To modernize your data environment, you want to run transactional workloads and support analytics needs with a single database. You need to move to Google Cloud without changing database management systems, and minimize cost and complexity. What should you do?

Correct Answer: A. Migrate your workloads to AlloyDB for PostgreSQL.
Explanation:

The key requirements are:

On-premises PostgreSQL database.

Run transactional workloads AND support analytics needs with a single database.

Move to Google Cloud without changing database management systems (i.e., remain PostgreSQL-compatible).

Minimize cost and complexity.

AlloyDB for PostgreSQL (Option A) is the best fit for these requirements.

PostgreSQL-Compatible: AlloyDB is fully PostgreSQL-compatible, meaning minimal to no application changes are required ('without changing database management systems').

Transactional and Analytical Workloads: AlloyDB is designed to handle demanding transactional workloads while also providing significantly faster analytical query performance compared to standard PostgreSQL. It achieves this through its intelligent, database-optimized storage layer and columnar engine integration. This addresses the 'single database' for both needs.

Cost and Complexity: As a managed service, it reduces operational complexity. Its performance benefits for both OLTP and OLAP can lead to better cost-efficiency by handling mixed workloads effectively on a single system.

Let's analyze why other options are less suitable:

B (Migrate to BigQuery): BigQuery is an analytical data warehouse, not designed for transactional workloads. This violates the 'single database' for both types of workloads and 'without changing database management systems' (as BigQuery is not PostgreSQL).

C (Migrate to Cloud Spanner): Cloud Spanner is a globally distributed, horizontally scalable relational database. While excellent for high-availability transactional workloads, it has its own SQL dialect (ANSI 2011 with extensions, not fully PostgreSQL wire-compatible without tools like PGAdapter, which adds complexity) and a different architecture. This would involve more significant changes than moving to a PostgreSQL-compatible system. The requirement was 'without changing database management systems.'

D (Migrate to Cloud SQL for PostgreSQL): Cloud SQL for PostgreSQL is a fully managed PostgreSQL service. It's excellent for transactional workloads and simpler analytical queries. However, for more demanding analytical needs on the same database instance, AlloyDB is specifically optimized to provide superior performance due to its architectural enhancements (like the columnar engine). If the analytical needs are significant, AlloyDB offers a better converged experience. While Cloud SQL is PostgreSQL-compatible, AlloyDB is positioned for superior performance on mixed workloads.


Google Cloud Documentation: AlloyDB for PostgreSQL > Overview. 'AlloyDB for PostgreSQL is a fully managed, PostgreSQL-compatible database service for your most demandingtransactional and analytical workloads... AlloyDB offers full PostgreSQL compatibility, so you can migrate your existing PostgreSQL applications with no code changes.'

Google Cloud Documentation: AlloyDB for PostgreSQL > Key benefits. Highlights include 'Industry-leading performance: ...up to 100x faster analytical queries than standard PostgreSQL.' and 'Support for transactional and analytical workloads: AlloyDB is designed to efficiently handle both transactional and analytical queries, allowing you to use a single database for a wide range of applications.'

Question 15

You are building a Dataflow pipeline to ingest customer feedback. Before loading to your data warehouse, you must validate email addresses and enrich unstructured comment strings with a generative AI sentiment classification. Invalid records need to be routed for manual review. How should you implement this pipeline?

Correct Answer: A. Apply a ParDo transform in Dataflow to validate each element, use a RunInference transform to assign sentiment scores, and use side outputs to route valid/invalid records.
Explanation:

This scenario requires a sophisticated streaming or batch ETL pipeline involving validation, AI enrichment, and branching logic. Apache Beam (Dataflow) is the standard tool for this on Google Cloud.

Validation via ParDo: A ParDo (Parallel Do) transform is the fundamental way to perform element-wise logic in Dataflow. It can be used to run regex or validation logic on email strings for every record in the stream.

Enrichment via RunInference: For integrating Generative AI or machine learning models into a Dataflow pipeline, the RunInference transform is the Google-recommended approach. It manages model loading and optimization (batching requests) to services like Vertex AI or local models, allowing for efficient sentiment classification during the 'flight' of the data.

Routing via Side Outputs: This is a key feature of Apache Beam. While a transform usually produces one main output, Side Outputs allow a single ParDo to emit data to multiple 'p-collections.' One collection can contain valid records destined for the data warehouse, while another contains invalid records routed to a 'dead-letter' bucket or table for manual review.

Correcting other options:

B & C: These are 'post-processing' approaches. Moving invalid data into a warehouse or a secondary service after the load increases complexity and cost, and violates the requirement to validate and enrich before loading.

D: Relying on the source system for validation is often impossible in real-world data engineering where you don't control the source, and using BigQuery ML after the fact doesn't address the requirement of routing invalid records within the pipeline.


'Side outputs are a powerful feature of the Beam model that allow you to produce multiple output PCollections from a single ParDo. This is useful for routing data to different destinations based on certain criteria, such as sending malformed data to a dead-letter queue.' (Source: Apache Beam Programming Guide - Additional Outputs)

'The RunInference transform lets you perform internal and external model inference within your pipeline... It handles the complexities of using machine learning models in a distributed data processing system.' (Source: Dataflow ML - Use RunInference)