Google

Professional Data Engineer Free Practice Questions — Page 8

Question 53

You are migrating a large number of files from a public HTTPS endpoint to Cloud Storage. The files are protected from unauthorized access using signed URLs. You created a TSV file that contains the list of object URLs and started a transfer job by using Storage Transfer Service. You notice that the job has run for a long time and eventually failed. Checking the logs of the transfer job reveals that the job was running fine until one point, and then it failed due to HTTP 403 errors on the remaining files. You verified that there were no changes to the source system. You need to fix the problem to resume the migration process. What should you do?

A. Set up Cloud Storage FUSE, and mount the Cloud Storage bucket on a Compute Engine instance. Remove the completed files from the TSV file. Use a shell script to iterate through the TSV file and download the remaining URLs to the FUSE mount point.
B. Renew the TLS certificate of the HTTPS endpoint. Remove the completed files from the TSV file and rerun the Storage Transfer Service job.
C. Create a new TSV file for the remaining files by generating signed URLs with a longer validity period. Split the TSV file into multiple smaller files and submit them as separate Storage Transfer Service jobs in parallel.
D. Update the file checksums in the TSV file from using MD5 to SHA256. Remove the completed files from the TSV file and rerun the Storage Transfer Service job.
Show Answer
Correct Answer: C
Explanation:
HTTP 403 errors occurring after the transfer ran successfully for some time strongly indicate that the signed URLs expired during the long-running job. Storage Transfer Service relies on those URLs remaining valid for the duration of the transfer. Regenerating signed URLs with a longer expiration for the remaining objects resolves the authorization issue. Splitting the remaining transfers into smaller parallel jobs helps ensure completion before the URLs expire again. The other options do not address expired signed URLs: renewing the TLS certificate is unrelated to HTTP 403 authorization failures, changing checksums does not affect access, and manually downloading via FUSE is unnecessary and not the recommended fix.

Question 54

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?

A. Migrate and modernize your database with Cloud Spanner.
B. Migrate your workloads to AlloyDB for PostgreSQL.
C. Migrate to BigQuery to optimize analytics.
D. Migrate your PostgreSQL database to Cloud SQL for PostgreSQL.
Show Answer
Correct Answer: B
Explanation:
AlloyDB for PostgreSQL is the Google Cloud service designed to keep PostgreSQL compatibility while supporting both high-performance transactional workloads and analytics in a single database through HTAP-oriented features such as its columnar engine. Cloud SQL preserves PostgreSQL at lower cost but is not the platform positioned for combined transactional and analytical workloads in one database. Cloud Spanner changes the database system, and BigQuery is an analytics warehouse rather than a transactional database.

Question 55

You migrated your on-premises Apache Hadoop Distributed File System (HDFS) data lake to Cloud Storage. The data scientist team needs to process the data by using Apache Spark and SQL. Security policies need to be enforced at the column level. You need a cost-effective solution that can scale into a data mesh. What should you do?

A. 1. Deploy a long-living Dataproc cluster with Apache Hive and Ranger enabled. 2. Configure Ranger for column level security. 3. Process with Dataproc Spark or Hive SQL.
B. 1. Define a BigLake table. 2. Create a taxonomy of policy tags in Data Catalog. 3. Add policy tags to columns. 4. Process with the Spark-BigQuery connector or BigQuery SQL.
C. 1. Load the data to BigQuery tables. 2. Create a taxonomy of policy tags in Data Catalog. 3. Add policy tags to columns. 4. Process with the Spark-BigQuery connector or BigQuery SQL.
D. 1. Apply an Identity and Access Management (IAM) policy at the file level in Cloud Storage. 2. Define a BigQuery external table for SQL processing. 3. Use Dataproc Spark to process the Cloud Storage files.
Show Answer
Correct Answer: B
Explanation:
BigLake lets you keep the data in Cloud Storage while exposing it as governed tables for both BigQuery SQL and Apache Spark via the Spark-BigQuery connector. Column-level security is implemented using Data Catalog policy tags (taxonomy + column tags). This is serverless, avoids loading data into BigQuery unnecessarily, is more cost-effective than maintaining long-running Dataproc clusters, and aligns with scalable data mesh architectures.

Question 56

You are designing the architecture to process your data from Cloud Storage to BigQuery by using Dataflow. The network team provided you with the Shared VPC network and subnetwork to be used by your pipelines. You need to enable the deployment of the pipeline on the Shared VPC network. What should you do?

A. Assign the compute.networkUser role to the Dataflow service agent.
B. Assign the compute.networkUser role to the service account that executes the Dataflow pipeline.
C. Assign the dataflow.admin role to the Dataflow service agent.
D. Assign the dataflow.admin role to the service account that executes the Dataflow pipeline.
Show Answer
Correct Answer: B
Explanation:
For Dataflow jobs running on a Shared VPC, the service account that executes the Dataflow pipeline (the worker service account/Dataflow service account used by the job) must have the Compute Network User (roles/compute.networkUser) role on the Shared VPC subnetwork in the host project. The Dataflow admin role is unrelated to Shared VPC network attachment permissions. Sources: https://cloud.google.com/dataflow/docs/guides/specifying-networks

Question 57

You work for a large ecommerce company. You are using Pub/Sub to ingest the clickstream data to Google Cloud for analytics. You observe that when a new subscriber connects to an existing topic to analyze data, they are unable to subscribe to older data. For an upcoming yearly sale event in two months, you need a solution that, once implemented, will enable any new subscriber to read the last 30 days of data. What should you do?

A. Create a new topic, and publish the last 30 days of data each time a new subscriber connects to an existing topic.
B. Set the topic retention policy to 30 days.
C. Set the subscriber retention policy to 30 days.
D. Ask the source system to re-push the data to Pub/Sub, and subscribe to it.
Show Answer
Correct Answer: B
Explanation:
A new subscription can only replay historical messages if the topic retains them. Topic message retention stores published messages for the configured period (up to 31 days), allowing newly created subscriptions to seek back and consume retained messages. Subscription retention applies to an existing subscription's state and does not enable brand-new subscribers to read older messages. Republishing or asking the source to resend data is unnecessary.

Question 58

Your organization is modernizing their IT services and migrating to Google Cloud. You need to organize the data that will be stored in Cloud Storage and BigQuery. You need to enable a data mesh approach to share the data between sales, product design, and marketing departments. What should you do?

A. 1. Create a project for storage of the data for each of your departments. 2. Enable each department to create Cloud Storage buckets and BigQuery datasets. 3. Create user groups for authorized readers for each bucket and dataset. 4. Enable the IT team to administer the user groups to add or remove users as the departments’ request.
B. 1. Create multiple projects for storage of the data for each of your departments’ applications. 2. Enable each department to create Cloud Storage buckets and BigQuery datasets. 3. Publish the data that each department shared in Analytics Hub. 4. Enable all departments to discover and subscribe to the data they need in Analytics Hub.
C. 1. Create a project for storage of the data for your organization. 2. Create a central Cloud Storage bucket with three folders to store the files for each department. 3. Create a central BigQuery dataset with tables prefixed with the department name. 4. Give viewer rights for the storage project for the users of your departments.
D. 1. Create multiple projects for storage of the data for each of your departments’ applications. 2. Enable each department to create Cloud Storage buckets and BigQuery datasets. 3. In Dataplex, map each department to a data lake and the Cloud Storage buckets, and map the BigQuery datasets to zones. 4. Enable each department to own and share the data of their data lakes.
Show Answer
Correct Answer: D
Explanation:
A data mesh emphasizes decentralized domain ownership with governed self-service access. Dataplex is Google's data management and governance service designed to support data mesh across Cloud Storage and BigQuery by organizing data into lakes and zones while allowing domains to own and share their data. Analytics Hub is primarily for sharing BigQuery data, not Cloud Storage assets, so it does not fully address the requirement covering both Cloud Storage and BigQuery.

Question 59

You have terabytes of customer behavioral data streaming from Google Analytics into BigQuery daily. Your customers’ information, such as their preferences, is hosted on a Cloud SQL for MySQL database. Your CRM database is hosted on a Cloud SQL for PostgreSQL instance. The marketing team wants to use your customers’ information from the two databases and the customer behavioral data to create marketing campaigns for yearly active customers. You need to ensure that the marketing team can run the campaigns over 100 times a day on typical days and up to 300 during sales. At the same time, you want to keep the load on the Cloud SQL databases to a minimum. What should you do?

A. Create BigQuery connections to both Cloud SQL databases. Use BigQuery federated queries on the two databases and the Google Analytics data on BigQuery to run these queries.
B. Create a job on Apache Spark with Dataproc Serverless to query both Cloud SQL databases and the Google Analytics data on BigQuery for these queries.
C. Create streams in Datastream to replicate the required tables from both Cloud SQL databases to BigQuery for these queries.
D. Create a Dataproc cluster with Trino to establish connections to both Cloud SQL databases and BigQuery, to execute the queries.
Show Answer
Correct Answer: C
Explanation:
Replicate the required Cloud SQL tables into BigQuery using Datastream (CDC). This keeps analytical queries off the Cloud SQL instances, minimizing database load while enabling frequent, scalable joins with the existing Google Analytics data already in BigQuery. Federated queries would execute against Cloud SQL for each campaign run, increasing load and latency, while Dataproc-based solutions add unnecessary complexity and do not address the requirement to minimize Cloud SQL load.

Question 60

You designed a data warehouse in BigQuery to analyze sales data. You want a self-serving, low-maintenance, and cost- effective solution to share the sales dataset to other business units in your organization. What should you do?

A. Create an Analytics Hub private exchange, and publish the sales dataset.
B. Enable the other business units’ projects to access the authorized views of the sales dataset.
C. Create and share views with the users in the other business units.
D. Use the BigQuery Data Transfer Service to create a schedule that copies the sales dataset to the other business units’ projects.
Show Answer
Correct Answer: A
Explanation:
Analytics Hub is designed for self-service, low-maintenance, and cost-effective sharing of BigQuery datasets across teams. A private exchange allows publishers to share datasets centrally while consumers can subscribe without copying data. Authorized views (B) are useful for controlled access but require ongoing management of views and permissions, making them less self-service at organizational scale. Shared views (C) have similar maintenance drawbacks, and copying data with BigQuery Data Transfer Service (D) duplicates storage and increases maintenance and cost.

Question 61

You are designing a messaging system by using Pub/Sub to process clickstream data with an event-driven consumer app that relies on a push subscription. You need to configure the messaging system that is reliable enough to handle temporary downtime of the consumer app. You also need the messaging system to store the input messages that cannot be consumed by the subscriber. The system needs to retry failed messages gradually, avoiding overloading the consumer app, and store the failed messages after a maximum of 10 retries in a topic. How should you configure the Pub/Sub subscription?

A. Increase the acknowledgement deadline to 10 minutes.
B. Use immediate redelivery as the subscription retry policy, and configure dead lettering to a different topic with maximum delivery attempts set to 10.
C. Use exponential backoff as the subscription retry policy, and configure dead lettering to the same source topic with maximum delivery attempts set to 10.
D. Use exponential backoff as the subscription retry policy, and configure dead lettering to a different topic with maximum delivery attempts set to 10.
Show Answer
Correct Answer: D
Explanation:
Exponential backoff gradually increases the delay between redelivery attempts, reducing the risk of overwhelming a temporarily unavailable or recovering push consumer. A dead-letter topic stores messages that still cannot be processed after the configured maximum delivery attempts. Setting the maximum delivery attempts to 10 satisfies the requirement to retry up to 10 times before routing failed messages to a separate topic.

Question 62

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?

A. Use Cloud Data Fusion and Wrangler to normalize the data, and set up a recurring job.
B. Use Dataflow SQL to create a job that normalizes the data, and that after the first run of the job, schedule the pipeline to execute recurrently.
C. Create a Spark job and submit it to Dataproc Serverless.
D. Use BigQuery and GoogleSQL to normalize the data, and schedule recurring queries in BigQuery.
Show Answer
Correct Answer: A
Explanation:
Cloud Data Fusion with Wrangler is the Google Cloud no-code/low-code data preparation tool designed for visually cleaning and standardizing data. It supports building recurring pipelines without writing transformation code. The other options require SQL or programming (BigQuery scheduled queries, Dataflow SQL, Spark), which do not best satisfy the explicit 'requires no coding' requirement.

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