Google

Professional Data Engineer Free Practice Questions — Page 11

Question 83

You are planning to use Cloud Storage as part of your data lake solution. The Cloud Storage bucket will contain objects ingested from external systems. Each object will be ingested once, and the access patterns of individual objects will be random. You want to minimize the cost of storing and retrieving these objects. You want to ensure that any cost optimization efforts are transparent to the users and applications. What should you do?

A. Create a Cloud Storage bucket with Autoclass enabled.
B. Create a Cloud Storage bucket with an Object Lifecycle Management policy to transition objects from Standard to Coldline storage class if an object age reaches 30 days.
C. Create a Cloud Storage bucket with an Object Lifecycle Management policy to transition objects from Standard to Coldline storage class if an object is not live.
D. Create two Cloud Storage buckets. Use the Standard storage class for the first bucket, and use the Coldline storage class for the second bucket. Migrate objects from the first bucket to the second bucket after 30 days.
Show Answer
Correct Answer: A
Explanation:
Autoclass is designed to automatically optimize storage class based on object access patterns across Standard, Nearline, Coldline, and Archive while keeping the bucket interface unchanged for users and applications. This minimizes storage costs transparently without requiring manual lifecycle thresholds or moving objects between buckets. Lifecycle rules based only on age are less adaptive to random access patterns, and using two buckets adds operational complexity and is not transparent.

Question 84

You are deploying an Apache Airflow directed acyclic graph (DAG) in a Cloud Composer 2 instance. You have incoming files in a Cloud Storage bucket that the DAG processes, one file at a time. The Cloud Composer instance is deployed in a subnetwork with no Internet access. Instead of running the DAG based on a schedule, you want to run the DAG in a reactive way every time a new file is received. What should you do?

A. 1. Enable Private Google Access in the subnetwork, and set up Cloud Storage notifications to a Pub/Sub topic. 2. Create a push subscription that points to the web server URL.
B. 1. Enable the Cloud Composer API, and set up Cloud Storage notifications to trigger a Cloud Function. 2. Write a Cloud Function instance to call the DAG by using the Cloud Composer API and the web server URL. 3. Use VPC Serverless Access to reach the web server URL.
C. 1. Enable the Airflow REST API, and set up Cloud Storage notifications to trigger a Cloud Function instance. 2. Create a Private Service Connect (PSC) endpoint. 3. Write a Cloud Function that connects to the Cloud Composer cluster through the PSC endpoint.
D. 1. Enable the Airflow REST API, and set up Cloud Storage notifications to trigger a Cloud Function instance. 2. Write a Cloud Function instance to call the DAG by using the Airflow REST API and the web server URL. 3. Use VPC Serverless Access to reach the web server URL.
Show Answer
Correct Answer: A
Explanation:
For a Cloud Composer 2 environment without Internet access, the recommended reactive pattern is to use Cloud Storage notifications to Pub/Sub and have Airflow consume/trigger work from Pub/Sub rather than invoking the private Airflow web server. Options B, C, and D rely on calling the Airflow web server/REST API, which is problematic for private environments as described in Cloud Composer guidance. Enabling Private Google Access allows private resources to access Google APIs such as Pub/Sub.

Question 85

You have an Oracle database deployed in a VM as part of a Virtual Private Cloud (VPC) network. You want to replicate and continuously synchronize 50 tables to BigQuery. You want to minimize the need to manage infrastructure. What should you do?

A. Deploy Apache Kafka in the same VPC network, use Kafka Connect Oracle Change Data Capture (CDC), and Dataflow to stream the Kafka topic to BigQuery.
B. Create a Pub/Sub subscription to write to BigQuery directly. Deploy the Debezium Oracle connector to capture changes in the Oracle database, and sink to the Pub/Sub topic.
C. Deploy Apache Kafka in the same VPC network, use Kafka Connect Oracle change data capture (CDC), and the Kafka Connect Google BigQuery Sink Connector.
D. Create a Datastream service from Oracle to BigQuery, use a private connectivity configuration to the same VPC network, and a connection profile to BigQuery.
Show Answer
Correct Answer: D
Explanation:
Datastream is Google Cloud's fully managed, serverless change data capture (CDC) service that supports continuous replication from Oracle to BigQuery. Using private connectivity within the VPC minimizes infrastructure management while providing ongoing synchronization of the Oracle tables.

Question 86

You are running a Dataflow streaming pipeline, with Streaming Engine and Horizontal Autoscaling enabled. You have set the maximum number of workers to 1000. The input of your pipeline is Pub/Sub messages with notifications from Cloud Storage. One of the pipeline transforms reads CSV files and emits an element for every CSV line. The job performance is low, the pipeline is using only 10 workers, and you notice that the autoscaler is not spinning up additional workers. What should you do to improve performance?

A. Enable Vertical Autoscaling to let the pipeline use larger workers.
B. Change the pipeline code, and introduce a Reshuffle step to prevent fusion.
C. Update the job to increase the maximum number of workers.
D. Use Dataflow Prime, and enable Right Fitting to increase the worker resources.
Show Answer
Correct Answer: B
Explanation:
The most likely cause is Dataflow fusion limiting parallelism. Reading a CSV file and emitting one element per line can keep downstream work fused with the file read, preventing sufficient parallelization and giving the autoscaler little reason to add workers. Introducing a Reshuffle step breaks fusion, allowing work to be redistributed across more workers and improving throughput. Increasing the maximum workers is irrelevant because it is already set very high, and larger workers or Right Fitting do not address the lack of parallelism in this streaming pipeline.

Question 87

You are deploying a batch pipeline in Dataflow. This pipeline reads data from Cloud Storage, transforms the data, and then writes the data into BigQuery. The security team has enabled an organizational constraint in Google Cloud, requiring all Compute Engine instances to use only internal IP addresses and no external IP addresses. What should you do?

A. Ensure that your workers have network tags to access Cloud Storage and BigQuery. Use Dataflow with only internal IP addresses.
B. Ensure that the firewall rules allow access to Cloud Storage and BigQuery. Use Dataflow with only internal IPs.
C. Create a VPC Service Controls perimeter that contains the VPC network and add Dataflow, Cloud Storage, and BigQuery as allowed services in the perimeter. Use Dataflow with only internal IP addresses.
D. Ensure that Private Google Access is enabled in the subnetwork. Use Dataflow with only internal IP addresses.
Show Answer
Correct Answer: D
Explanation:
Dataflow workers running without external IP addresses must still reach Google APIs such as Cloud Storage and BigQuery. The required configuration is to enable Private Google Access on the subnetwork and configure Dataflow to use only internal IP addresses. Network tags and firewall rules do not provide access to Google APIs without external IPs, and VPC Service Controls are for defining service perimeters, not for enabling connectivity from private-only VMs.

Question 88

You are designing a data warehouse in BigQuery to analyze sales data for a telecommunication service provider. You need to create a data model for customers, products, and subscriptions. All customers, products, and subscriptions can be updated monthly, but you must maintain a historical record of all data. You plan to use the visualization layer for current and historical reporting. You need to ensure that the data model is simple, easy-to-use, and cost-effective. What should you do?

A. Create a normalized model with tables for each entity. Use snapshots before updates to track historical data.
B. Create a normalized model with tables for each entity. Keep all input files in a Cloud Storage bucket to track historical data.
C. Create a denormalized model with nested and repeated fields. Update the table and use snapshots to track historical data.
D. Create a denormalized, append-only model with nested and repeated fields. Use the ingestion timestamp to track historical data.
Show Answer
Correct Answer: D
Explanation:
A denormalized, append-only model with nested and repeated fields aligns with BigQuery best practices by minimizing joins and simplifying analytics. Appending new versions instead of updating rows preserves full history without snapshot management, and an ingestion timestamp (or version timestamp) enables both current and historical reporting efficiently. Snapshots add operational complexity and storage overhead for regularly changing data, while storing raw files alone does not provide a usable historical analytical model.

Question 89

You have important legal hold documents in a Cloud Storage bucket. You need to ensure that these documents are not deleted or modified. What should you do?

A. Set a retention policy. Lock the retention policy.
B. Set a retention policy. Set the default storage class to Archive for long-term digital preservation.
C. Enable the Object Versioning feature. Add a lifecycle rule.
D. Enable the Object Versioning feature. Create a copy in a bucket in a different region.
Show Answer
Correct Answer: A
Explanation:
A bucket retention policy prevents objects from being deleted or replaced until the retention period expires. Locking the retention policy (Bucket Lock) makes the policy immutable, ensuring the retention settings cannot be reduced or removed, which is appropriate for legal hold/compliance requirements. Archive storage class affects cost, not immutability, and Object Versioning alone does not prevent deletion or modification.

Question 90

Your company's data platform ingests CSV file dumps of booking and user profile data from upstream sources into Cloud Storage. The data analyst team wants to join these datasets on the email field available in both the datasets to perform analysis. However, personally identifiable information (PII) should not be accessible to the analysts. You need to de-identify the email field in both the datasets before loading them into BigQuery for analysts. What should you do?

A. 1. Create a pipeline to de-identify the email field by using recordTransformations in Cloud Data Loss Prevention (Cloud DLP) with masking as the de-identification transformations type. 2. Load the booking and user profile data into a BigQuery table.
B. 1. Create a pipeline to de-identify the email field by using recordTransformations in Cloud DLP with format-preserving encryption with FFX as the de-identification transformation type. 2. Load the booking and user profile data into a BigQuery table.
C. 1. Load the CSV files from Cloud Storage into a BigQuery table, and enable dynamic data masking. 2. Create a policy tag with the email mask as the data masking rule. 3. Assign the policy to the email field in both tables. A 4. Assign the Identity and Access Management bigquerydatapolicy.maskedReader role for the BigQuery tables to the analysts.
D. 1. Load the CSV files from Cloud Storage into a BigQuery table, and enable dynamic data masking. 2. Create a policy tag with the default masking value as the data masking rule. 3. Assign the policy to the email field in both tables. 4. Assign the Identity and Access Management bigquerydatapolicy.maskedReader role for the BigQuery tables to the analysts
Show Answer
Correct Answer: B
Explanation:
The requirement is to de-identify email addresses before loading the data into BigQuery while still allowing analysts to join the two datasets on the email field. Simple masking destroys uniqueness, preventing reliable joins. BigQuery dynamic data masking occurs after the data is loaded and therefore does not satisfy the requirement to de-identify before loading. Cloud DLP format-preserving encryption (FFX) provides deterministic pseudonymization so the same email is transformed into the same encrypted value across both datasets, enabling joins without exposing the original PII.

Question 92

Your company operates in three domains: airlines, hotels, and ride-hailing services. Each domain has two teams: analytics and data science, which create data assets in BigQuery with the help of a central data platform team. However, as each domain is evolving rapidly, the central data platform team is becoming a bottleneck. This is causing delays in deriving insights from data, and resulting in stale data when pipelines are not kept up to date. You need to design a data mesh architecture by using Dataplex to eliminate the bottleneck. What should you do?

A. 1. Create one lake for each team. Inside each lake, create one zone for each domain. 2. Attach each of the BigQuery datasets created by the individual teams as assets to the respective zone. 3. Have the central data platform team manage all zones’ data assets.
B. 1. Create one lake for each team. Inside each lake, create one zone for each domain. 2. Attach each of the BigQuery datasets created by the individual teams as assets to the respective zone. 3. Direct each domain to manage their own zone’s data assets.
C. 1. Create one lake for each domain. Inside each lake, create one zone for each team. 2. Attach each of the BigQuery datasets created by the individual teams as assets to the respective zone. 3. Direct each domain to manage their own lake’s data assets.
D. 1. Create one lake for each domain. Inside each lake, create one zone for each team. 2. Attach each of the BigQuery datasets created by the individual teams as assets to the respective zone. 3. Have the central data platform team manage all lakes’ data assets.
Show Answer
Correct Answer: C
Explanation:
A domain-oriented data mesh in Dataplex is organized with one lake per business domain, allowing each domain to own and govern its data independently. Within each domain lake, separate zones can represent the analytics and data science teams. BigQuery datasets are attached as assets to the appropriate zones, and ownership remains with the domain rather than a centralized platform team, eliminating the bottleneck.

Question 93

You have one BigQuery dataset which includes customers’ street addresses. You want to retrieve all occurrences of street addresses from the dataset. What should you do?

A. Write a SQL query in BigQuery by using REGEXP_CONTAINS on all tables in your dataset to find rows where the word “street” appears.
B. Create a deep inspection job on each table in your dataset with Cloud Data Loss Prevention and create an inspection template that includes the STREET_ADDRESS infoType.
C. Create a discovery scan configuration on your organization with Cloud Data Loss Prevention and create an inspection template that includes the STREET_ADDRESS infoType.
D. Create a de-identification job in Cloud Data Loss Prevention and use the masking transformation.
Show Answer
Correct Answer: B
Explanation:
Cloud Data Loss Prevention (Sensitive Data Protection) includes a built-in STREET_ADDRESS infoType that is designed to inspect structured data such as BigQuery tables for street addresses. A deep inspection job targeted at the dataset's tables will identify all occurrences. REGEXP_CONTAINS for the literal word 'street' would miss many valid addresses, discovery scan configurations are intended for broad organizational data profiling rather than a targeted dataset retrieval task, and de-identification jobs are for masking/transformation rather than finding occurrences.

$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.