Google

Professional Data Engineer Free Practice Questions — Page 16

Question 138

You have a data processing application that runs on Google Kubernetes Engine (GKE). Containers need to be launched with their latest available configurations from a container registry. Your GKE nodes need to have GPUs, local SSDs, and 8 Gbps bandwidth. You want to efficiently provision the data processing infrastructure and manage the deployment process. What should you do?

A. Use Compute Engine startup scripts to pull container images, and use gcloud commands to provision the infrastructure.
B. Use Cloud Build to schedule a job using Terraform build to provision the infrastructure and launch with the most current container images.
C. Use GKE to autoscale containers, and use gcloud commands to provision the infrastructure.
D. Use Dataflow to provision the data pipeline, and use Cloud Scheduler to run the job.
Show Answer
Correct Answer: B
Explanation:
Option B best matches the requirements for automated infrastructure provisioning and deployment. Terraform provides infrastructure as code to create a GKE cluster with the required node characteristics (such as GPUs, local SSDs, and machine/network configuration), while Cloud Build can automate provisioning and deployment so workloads use the latest container images from the registry. The other options rely on manual gcloud workflows, misuse Compute Engine startup scripts for GKE deployment, or use Dataflow, which is not the service for provisioning GKE infrastructure.

Question 139

You want to create a machine learning model using BigQuery ML and create an endpoint for hosting the model using Vertex AI. This will enable the processing of continuous streaming data in near-real time from multiple vendors. The data may contain invalid values. What should you do?

A. Create a new BigQuery dataset and use streaming inserts to land the data from multiple vendors. Configure your BigQuery ML model to use the "ingestion" dataset as the framing data.
B. Use BigQuery streaming inserts to land the data from multiple vendors where your BigQuery dataset ML model is deployed.
C. Create a Pub/Sub topic and send all vendor data to it. Connect a Cloud Function to the topic to process the data and store it in BigQuery.
D. Create a Pub/Sub topic and send all vendor data to it. Use Dataflow to process and sanitize the Pub/Sub data and stream it to BigQuery.
Show Answer
Correct Answer: D
Explanation:
For continuous streaming data from multiple vendors, Pub/Sub is the appropriate ingestion layer. Because the data may contain invalid values, Dataflow is the recommended streaming processing service to validate, clean, transform, and filter records before streaming them into BigQuery. BigQuery ML can then train models on the curated data, and models can be deployed to Vertex AI endpoints as needed. The other options either stream directly into BigQuery without data sanitization or use Cloud Functions, which are less suitable for scalable streaming ETL.

Question 140

A TensorFlow machine learning model on Compute Engine virtual machines (n2-standard-32) takes two days to complete training. The model has custom TensorFlow operations that must run partially on a CPU. You want to reduce the training time in a cost-effective manner. What should you do?

A. Change the VM type to n2-highmem-32.
B. Change the VM type to e2-standard-32.
C. Train the model using a VM with a GPU hardware accelerator.
D. Train the model using a VM with a TPU hardware accelerator.
Show Answer
Correct Answer: C
Explanation:
GPU-accelerated Compute Engine VMs are the best fit because the TensorFlow model includes custom operations that must run partially on the CPU. GPUs work well with mixed CPU/GPU execution, while TPUs are less suitable for models that rely on custom TensorFlow ops executing on CPUs. Simply changing to a different CPU-only machine type is unlikely to provide a comparable reduction in training time.

Question 141

You are a head of BI at a large enterprise company with multiple business units that each have different priorities and budgets. You use on-demand pricing for BigQuery with a quota of 2K concurrent on-demand slots per project. Users at your organization sometimes don't get slots to execute their query and you need to correct this. You'd like to avoid introducing new projects to your account. What should you do?

A. Convert your batch BQ queries into interactive BQ queries.
B. Create an additional project to overcome the 2K on-demand per-project quota.
C. Switch to flat-rate pricing and establish a hierarchical priority model for your projects.
D. Increase the amount of concurrent slots per project at the Quotas page at the Cloud Console.
Show Answer
Correct Answer: C
Explanation:
The issue is the per-project limit of concurrent on-demand slots. The requirement is to avoid creating new projects while supporting multiple business units with different priorities and budgets. Switching to flat-rate (capacity-based) pricing with reservations and assignments allows dedicated slot capacity and hierarchical allocation/prioritization across workloads, avoiding reliance on the 2,000 on-demand slot limit. A does not increase available slots, B violates the requirement to avoid new projects, and D is not a configurable quota beyond the documented limit.

Question 142

You have enabled the free integration between Firebase Analytics and Google BigQuery. Firebase now automatically creates a new table daily in BigQuery in the format app_events_YYYYMMDD. You want to query all of the tables for the past 30 days in legacy SQL. What should you do?

A. Use the TABLE_DATE_RANGE function
B. Use the WHERE_PARTITIONTIME pseudo column
C. Use WHERE date BETWEEN YYYY-MM-DD AND YYYY-MM-DD
D. Use SELECT IF.(date >= YYYY-MM-DD AND date <= YYYY-MM-DD
Show Answer
Correct Answer: A
Explanation:
In BigQuery legacy SQL, when querying sharded daily tables named with a date suffix such as app_events_YYYYMMDD, the TABLE_DATE_RANGE function is the legacy SQL mechanism for querying a range of those daily tables. The _PARTITIONTIME pseudo column applies to partitioned tables, not date-sharded tables, and the other options only filter rows rather than selecting multiple sharded tables.

Question 143

Each analytics team in your organization is running BigQuery jobs in their own projects. You want to enable each team to monitor slot usage within their projects. What should you do?

A. Create a Cloud Monitoring dashboard based on the BigQuery metric query/scanned_bytes
B. Create a Cloud Monitoring dashboard based on the BigQuery metric slots/allocated_for_project
C. Create a log export for each project, capture the BigQuery job execution logs, create a custom metric based on the totalSlotMs, and create a Cloud Monitoring dashboard based on the custom metric
D. Create an aggregated log export at the organization level, capture the BigQuery job execution logs, create a custom metric based on the totalSlotMs, and create a Cloud Monitoring dashboard based on the custom metric
Show Answer
Correct Answer: B
Explanation:
Use the built-in Cloud Monitoring BigQuery metric for project slot allocation/usage. The metric `slots/allocated_for_project` is intended to monitor slots used by project and avoids the unnecessary complexity of exporting logs and creating custom metrics. `query/scanned_bytes` measures data scanned, not slots, and the log-export approaches are not the recommended solution when the built-in monitoring metric exists.

Question 144

You are designing a cloud-native historical data processing system to meet the following conditions: ✑ The data being analyzed is in CSV, Avro, and PDF formats and will be accessed by multiple analysis tools including Dataproc, BigQuery, and Compute Engine. ✑ A batch pipeline moves daily data. ✑ Performance is not a factor in the solution. ✑ The solution design should maximize availability. How should you design data storage for this solution?

A. Create a Dataproc cluster with high availability. Store the data in HDFS, and perform analysis as needed.
B. Store the data in BigQuery. Access the data using the BigQuery Connector on Dataproc and Compute Engine.
C. Store the data in a regional Cloud Storage bucket. Access the bucket directly using Dataproc, BigQuery, and Compute Engine.
D. Store the data in a multi-regional Cloud Storage bucket. Access the data directly using Dataproc, BigQuery, and Compute Engine.
Show Answer
Correct Answer: D
Explanation:
A multi-regional Cloud Storage bucket provides the highest availability and is the appropriate shared storage layer for heterogeneous file formats such as CSV, Avro, and PDF. Cloud Storage is directly accessible from Dataproc, BigQuery (including external tables or load jobs), and Compute Engine. HDFS is tied to a Dataproc cluster and is not ideal for durable shared storage, BigQuery is not suitable as the primary storage for PDFs, and a regional bucket offers lower availability than a multi-regional bucket.

Question 145

An online retailer has built their current application on Google App Engine. A new initiative at the company mandates that they extend their application to allow their customers to transact directly via the application. They need to manage their shopping transactions and analyze combined data from multiple datasets using a business intelligence (BI) tool. They want to use only a single database for this purpose. Which Google Cloud database should they choose?

A. BigQuery
B. Cloud SQL
C. Cloud BigTable
D. Cloud Datastore
Show Answer
Correct Answer: B
Explanation:
The application requires an OLTP database to manage shopping transactions while also supporting BI access using a single database. Cloud SQL is a managed relational database designed for transactional workloads and can be queried by BI tools. BigQuery is an analytics data warehouse, not the appropriate primary transactional database for an e-commerce application. Cloud Bigtable and Cloud Datastore are NoSQL databases and are not the best fit for relational transactions plus BI.

Question 147

You need to create a new transaction table in Cloud Spanner that stores product sales data. You are deciding what to use as a primary key. From a performance perspective, which strategy should you choose?

A. The current epoch time
B. A concatenation of the product name and the current epoch time
C. A random universally unique identifier number (version 4 UUID)
D. The original order identification number from the sales system, which is a monotonically increasing integer
Show Answer
Correct Answer: C
Explanation:
Cloud Spanner performs best when primary keys distribute writes evenly to avoid hotspots. Monotonically increasing keys such as timestamps or increasing integers concentrate writes at the end of the key range. A version 4 UUID is random and provides good write distribution across splits, making it the recommended choice for high-write transaction tables. Concatenating a product name with a timestamp can still create skew and includes a monotonically increasing component.

Question 148

A shipping company has live package-tracking data that is sent to an Apache Kafka stream in real time. This is then loaded into BigQuery. Analysts in your company want to query the tracking data in BigQuery to analyze geospatial trends in the lifecycle of a package. The table was originally created with ingest-date partitioning. Over time, the query processing time has increased. You need to implement a change that would improve query performance in BigQuery. What should you do?

A. Implement clustering in BigQuery on the ingest date column.
B. Implement clustering in BigQuery on the package-tracking ID column.
C. Tier older data onto Cloud Storage files and create a BigQuery table using Cloud Storage as an external data source.
D. Re-create the table using data partitioning on the package delivery date.
Show Answer
Correct Answer: B
Explanation:
The table is already partitioned by ingestion date. Re-partitioning by delivery date is problematic because tracking events occur throughout a package's lifecycle and many events before delivery would not naturally partition by a delivery date. To improve performance for queries that analyze a package's lifecycle, clustering on the package-tracking ID co-locates rows for the same package within each partition, reducing data scanned for queries filtering or aggregating by package ID. Clustering complements existing partitioning, whereas clustering on the ingest date duplicates the partition key and external tables would generally reduce, not improve, query performance.

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