wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

PDE-2022-4

Total questions: 36

Worksheet time: 1hrs 12mins

Name
Class
Date
1.

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.

2.

Your company currently runs a large on-premises cluster using Spark, Hive, and HDFS in a colocation facility. The cluster is designed to accommodate peak usage on the system; however, many jobs are batch in nature, and usage of the cluster fluctuates quite dramatically. Your company is eager to move to the cloud to reduce the overhead associated with on-premises infrastructure and maintenance and to benefit from the cost savings. They are also hoping to modernize their existing infrastructure to use more serverless offerings in order to take advantage of the cloud. Because of the timing of their contract renewal with the colocation facility, they have only 2 months for their initial migration. How would you recommend they approach their upcoming migration strategy so they can maximize their cost savings in the cloud while still executing the migration in time?

a)

Migrate the workloads to Dataproc plus HDFS; modernize later.

b)

Migrate the workloads to Dataproc plus Cloud Storage; modernize later.

c)

Migrate the Spark workload to Dataproc plus HDFS, and modernize the Hive workload for BigQuery.

d)

Modernize the Spark workload for Dataflow and the Hive workload for BigQuery.

3.

You work for a financial institution that lets customers register online. As new customers register, their user data is sent to Pub/Sub before being ingested into BigQuery. For security reasons, you decide to redact your customers' Government issued Identification Number while allowing customer service representatives to view the original values when necessary. What should you do?

a)

Use BigQuery's built-in AEAD encryption to encrypt the SSN column. Save the keys to a new table that is only viewable by permissioned users.

b)

Use BigQuery column-level security. Set the table permissions so that only members of the Customer Service user group can see the SSN column.

c)

Before loading the data into BigQuery, use Cloud Data Loss Prevention (DLP) to replace input values with a cryptographic hash.

d)

Before loading the data into BigQuery, use Cloud Data Loss Prevention (DLP) to replace input values with a cryptographic format-preserving encryption token.

4.

You are migrating a table to BigQuery and are deciding on the data model. Your table stores information related to purchases made across several store locations and includes information like the time of the transaction, items purchased, the store ID, and the city and state in which the store is located. You frequently query this table to see how many of each item were sold over the past 30 days and to look at purchasing trends by state, city, and individual store. How would you model this table for the best query performance?

a)

Partition by transaction time; cluster by state first, then city, then store ID.

b)

Partition by transaction time; cluster by store ID first, then city, then state.

c)

Top-level cluster by state first, then city, then store ID.

d)

Top-level cluster by store ID first, then city, then state.

5.

You are updating the code for a subscriber to a Pub/Sub feed. You are concerned that upon deployment the subscriber may erroneously acknowledge messages, leading to message loss. Your subscriber is not set up to retain acknowledged messages. What should you do to ensure that you can recover from errors after deployment?

a)

Set up the Pub/Sub emulator on your local machine. Validate the behavior of your new subscriber logic before deploying it to production.

b)

Create a Pub/Sub snapshot before deploying new subscriber code. Use a Seek operation to re-deliver messages that became available after the snapshot was created.

c)

Use Cloud Build for your deployment. If an error occurs after deployment, use a Seek operation to locate a timestamp logged by Cloud Build at the start of the deployment.

d)

Enable dead-lettering on the Pub/Sub topic to capture messages that aren't successfully acknowledged. If an error occurs after deployment, re-deliver any messages captured by the dead-letter queue.

6.

You work for a large real estate firm and are preparing 6 TB of home sales data to be used for machine learning. You will use SQL to transform the data and use BigQuery ML to create a machine learning model. You plan to use the model for predictions against a raw dataset that has not been transformed. How should you set up your workflow in order to prevent skew at prediction time?

a)

When creating your model, use BigQuery's TRANSFORM clause to define preprocessing steps. At prediction time, use BigQuery's ML.EVALUATE clause without specifying any transformations on the raw input data.

b)

When creating your model, use BigQuery's TRANSFORM clause to define preprocessing steps. Before requesting predictions, use a saved query to transform your raw input data, and then use ML.EVALUATE.

c)

Use a BigQuery view to define your preprocessing logic. When creating your model, use the view as your model training data. At prediction time, use BigQuery's ML.EVALUATE clause without specifying any transformations on the raw input data.

d)

Preprocess all data using Dataflow. At prediction time, use BigQuery's ML.EVALUATE clause without specifying any further transformations on the input data.

7.

You are analyzing the price of a company's stock. Every 5 seconds, you need to compute a moving average of the past 30 seconds' worth of data. You are reading data from Pub/Sub and using DataFlow to conduct the analysis. How should you set up your windowed pipeline?

a)

Use a fixed window with a duration of 5 seconds. Emit results by setting the following trigger: AfterProcessingTime.pastFirstElementInPane().plusDelayOf (Duration.standardSeconds(30))

b)

Use a fixed window with a duration of 30 seconds. Emit results by setting the following trigger: AfterWatermark.pastEndOfWindow().plusDelayOf (Duration.standardSeconds(5))

c)

Use a sliding window with a duration of 5 seconds. Emit results by setting the following trigger: AfterProcessingTime.pastFirstElementInPane().plusDelayOf (Duration.standardSeconds(30))

d)

Use a sliding window with a duration of 30 seconds and a period of 5 seconds. Emit results by setting the following trigger: AfterWatermark.pastEndOfWindow ()

8.

You are designing a pipeline that publishes application events to a Pub/Sub topic. Although message ordering is not important, you need to be able to aggregate events across disjoint hourly intervals before loading the results to BigQuery for analysis. What technology should you use to process and load this data to BigQuery while ensuring that it will scale with large volumes of events?

a)

Create a Cloud Function to perform the necessary data processing that executes using the Pub/Sub trigger every time a new message is published to the topic.

b)

Schedule a Cloud Function to run hourly, pulling all available messages from the Pub/Sub topic and performing the necessary aggregations.

c)

Schedule a batch Dataflow job to run hourly, pulling all available messages from the Pub/Sub topic and performing the necessary aggregations.

d)

Create a streaming Dataflow job that reads continually from the Pub/Sub topic and performs the necessary aggregations using tumbling windows.

9.

You work for a large financial institution that is planning to use Dialogflow to create a chatbot for the company's mobile app. You have reviewed old chat logs and tagged each conversation for intent based on each customer's stated intention for contacting customer service. About 70% of customer requests are simple requests that are solved within 10 intents. The remaining 30% of inquiries require much longer, more complicated requests. Which intents should you automate first?

a)

Automate the 10 intents that cover 70% of the requests so that live agents can handle more complicated requests.

b)

Automate the more complicated requests first because those require more of the agents' time.

c)

Automate a blend of the shortest and longest intents to be representative of all intents.

d)

Automate intents in places where common words such as 'payment' appear only once so the software isn't confused.

10.

Your company is implementing a data warehouse using BigQuery, and you have been tasked with designing the data model. You move your onpremises sales data warehouse with a star data schema to BigQuery but notice performance issues when querying the data of the past 30 days. Based on Google's recommended practices, what should you do to speed up the query without increasing storage costs?

a)

Denormalize the data.

b)

Shard the data by customer ID.

c)

Materialize the dimensional data in views.

d)

Partition the data by transaction date.

11.

You have uploaded 5 years of log data to Cloud Storage. A user reported that some data points in the log data are outside of their expected ranges, which indicates errors. You need to address this issue and be able to run the process again in the future while keeping the original data for compliance reasons. What should you do?

a)

Import the data from Cloud Storage into BigQuery. Create a new BigQuery table, and skip the rows with errors.

b)

Create a Compute Engine instance and create a new copy of the data in Cloud Storage. Skip the rows with errors.

c)

Create a Dataflow workflow that reads the data from Cloud Storage, checks for values outside the expected range, sets the value to an appropriate default, and writes the updated records to a new dataset in Cloud Storage.

d)

Create a Dataflow workflow that reads the data from Cloud Storage, checks for values outside the expected range, sets the value to an appropriate default, and writes the updated records to the same dataset in Cloud Storage.

12.

You want to rebuild your batch pipeline for structured data on Google Cloud. You are using PySpark to conduct data transformations at scale, but your pipelines are taking over twelve hours to run. To expedite development and pipeline run time, you want to use a serverless tool and SOL syntax. You have already moved your raw data into Cloud Storage. How should you build the pipeline on Google Cloud while meeting speed and processing requirements?

a)

Convert your PySpark commands into SparkSQL queries to transform the data, and then run your pipeline on Dataproc to write the data into BigQuery.

b)

Ingest your data into Cloud SQL, convert your PySpark commands into SparkSQL queries to transform the data, and then use federated quenes from BigQuery for machine learning.

c)

Ingest your data into BigQuery from Cloud Storage, convert your PySpark commands into BigQuery SQL queries to transform the data, and then write the transformations to a new table.

d)

Use Apache Beam Python SDK to build the transformation pipelines, and write the data into BigQuery.

13.

You are testing a Dataflow pipeline to ingest and transform text files. The files are compressed gzip, errors are written to a dead-letter queue, and you are using SideInputs to join data. You noticed that the pipeline is taking longer to complete than expected; what should you do to expedite the Dataflow job?

a)

Switch to compressed Avro files.

b)

Reduce the batch size.

c)

Retry records that throw an error.

d)

Use CoGroupByKey instead of the SideInput.

14.

You are building a real-time prediction engine that streams files, which may contain PII (personal identifiable information) data, into Cloud Storage and eventually into BigQuery. You want to ensure that the sensitive data is masked but still maintains referential integrity, because names and emails are often used as join keys. How should you use the Cloud Data Loss Prevention API (DLP API) to ensure that the PII data is not accessible by unauthorized individuals?

a)

Create a pseudonym by replacing the PII data with cryptogenic tokens, and store the non-tokenized data in a locked-down button.

b)

Redact all PII data, and store a version of the unredacted data in a locked-down bucket.

c)

Scan every table in BigQuery, and mask the data it finds that has PII.

d)

Create a pseudonym by replacing PII data with a cryptographic format-preserving token.

15.

You are migrating an application that tracks library books and information about each book, such as author or year published, from an onpremises data warehouse to BigQuery. In your current relational database, the author information is kept in a separate table and joined to the book information on a common key. Based on Google's recommended practice for schema design, how would you structure the data to ensure optimal speed of queries about the author of each book that has been borrowed?

a)

Keep the schema the same, maintain the different tables for the book and each of the attributes, and query as you are doing today.

b)

Create a table that is wide and includes a column for each attribute, including the author's first name, last name, date of birth, etc.

c)

Create a table that includes information about the books and authors, but nest the author fields inside the author column.

d)

Keep the schema the same, create a view that joins all of the tables, and always query the view.

16.

You need to give new website users a globally unique identifier (GUID) using a service that takes in data points and returns a GUID. This data is sourced from both internal and external systems via HTTP calls that you will make via microservices within your pipeline. There will be tens of thousands of messages per second and that can be multi-threaded. and you worry about the backpressure on the system. How should you design your pipeline to minimize that backpressure?

a)

Call out to the service via HTTP.

b)

Create the pipeline statically in the class definition.

c)

Create a new object in the startBundle method of DoFn.

d)

Batch the job into ten-second increments.

17.

You are migrating your data warehouse to Google Cloud and decommissioning your on-premises data center. Because this is a priority for your company, you know that bandwidth will be made available for the initial data load to the cloud. The files being transferred are not large in number, but each file is 90 GB. Additionally, you want your transactional systems to continually update the warehouse on Google Cloud in real time. What tools should you use to migrate the data and ensure that it continues to write to your warehouse?

a)

Storage Transfer Service for the migration; Pub/Sub and Cloud Data Fusion for the real-time updates

b)

BigQuery Data Transfer Service for the migration; Pub/Sub and Dataproc for the real-time updates

c)

gsutil for the migration; Pub/Sub and Dataflow for the real-time updates

d)

gsutil for both the migration and the real-time updates

18.

You are using Bigtable to persist and serve stock market data for each of the major indices. To serve the trading application, you need to access only the most recent stock prices that are streaming in. How should you design your row key and tables to ensure that you can access the data with the simplest query?

a)

Create one unique table for all of the indices, and then use the index and timestamp as the row key design.

b)

Create one unique table for all of the indices, and then use a reverse timestamp as the row key design.

c)

For each index, have a separate table and use a timestamp as the row key design.

d)

For each index, have a separate table and use a reverse timestamp as the row key design.

19.

You are building a report-only data warehouse where the data is streamed into BigQuery via the streaming API. Following Google's best practices, you have both a staging and a production table for the data. How should you design your data loading to ensure that there is only one master dataset without affecting performance on either the ingestion or reporting pieces?

a)

Have a staging table that is an append-only model, and then update the production table every three hours with the changes written to staging.

b)

Have a staging table that is an append-only model, and then update the production table every ninety minutes with the changes written to staging.

c)

Have a staging table that moves the staged data over to the production table and deletes the contents of the staging table every three hours.

d)

Have a staging table that moves the staged data over to the production table and deletes the contents of the staging table every thirty minutes.

20.

You issue a new batch job to Dataflow. The job starts successfully, processes a few elements, and then suddenly fails and shuts down. You navigate to the Dataflow monitoring interface where you find errors related to a particular DoFn in your pipeline. What is the most likely cause of the errors?

a)

Job validation

b)

Exceptions in worker code

c)

Graph or pipeline construction

d)

Insufficient permissions

21.

Your new customer has requested daily reports that show their net consumption of Google Cloud compute resources and who used the resources. You need to quickly and efficiently generate these daily reports. What should you do?

a)

Do daily exports of Cloud Logging data to BigQuery. Create views filtering by project, log type, resource, and user.

b)

Filter data in Cloud Logging by project, resource, and user; then export the data in CSV format.

c)

Filter data in Cloud Logging by project, log type, resource, and user, then import the data into BigQuery.

d)

Export Cloud Logging data to Cloud Storage in CSV format. Cleanse the data using Dataprep, filtering by project, resource, and user.

22.

Your startup has a web application that currently serves customers out of a single region in Asia. You are targeting funding that will allow your startup to serve customers globally. Your current goal is to optimize for cost, and your post-funding goal is to optimize for global presence and performance. You must use a native JDBC driver. What should you do?

a)

Use Cloud Spanner to configure a single region instance initially, and then configure multi-region Cloud Spanner instances after securing funding.

b)

Use a Cloud SQL for PostgreSQL highly available instance first, and Bigtable with US, Europe, and Asia replication after securing funding.

c)

Use a Cloud SQL for PostgreSQL zonal instance first, and Bigtable with US, Europe, and Asia after securing funding.

d)

Use a Cloud SQL for PostgreSQL zonal instance first, and Cloud SQL for PostgreSQL with highly available configuration after securing funding.

23.

You need to migrate 1 PB of data from an on-premises data center to Google Cloud. Data transfer time during the migration should take only a few hours. You want to follow Google-recommended practices to facilitate the large data transfer over a secure connection. What should you do?

a)

Establish a Cloud Interconnect connection between the on-premises data center and Google Cloud, and then use the Storage Transfer Service.

b)

Use a Transfer Appliance and have engineers manually encrypt, decrypt, and verify the data.

c)

Establish a Cloud VPN connection, start gcloud compute scp jobs in parallel, and run checksums to verify the data.

d)

Reduce the data into 3 TB batches, transfer the data using gsutil, and run checksums to verify the data.

24.

You are loading CSV files from Cloud Storage to BigQuery. The files have known data quality issues, including mismatched data types, such as STRINGs and INT64s in the same column, and inconsistent formatting of values such as phone numbers or addresses. You need to create the data pipeline to maintain data quality and perform the required cleansing and transformation. What should you do?

a)

Use Data Fusion to transform the data before loading it into BigQuery.

b)

Use Data Fusion to convert the CSV files to a self-describing data format, such as AVRO, before loading the data to BigQuery.

c)

Load the CSV files into a staging table with the desired schema, perform the transformations with SQL, and then write the results to the final destination table.

d)

Create a table with the desired schema, load the CSV files into the table, and perform the transformations in place using SQL.

25.

You are developing a new deep learning model that predicts a customer's likelihood to buy on your ecommerce site. After running an evaluation of the model against both the original training data and new test data, you find that your model is overfitting the data. You want to improve the accuracy of the model when predicting new data. What should you do?

a)

Increase the size of the training dataset, and increase the number of input features.

b)

Increase the size of the training dataset, and decrease the number of input features.

c)

Reduce the size of the training dataset, and increase the number of input features.

d)

Reduce the size of the training dataset, and decrease the number of input features.

26.

You are implementing a chatbot to help an online retailer streamline their customer service. The chatbot must be able to respond to both text and voice inquiries. You are looking for a low-code or no-cade option, and you want to be able to easily train the chatbot to provide answers to keywords. What should you do?

a)

Use the Cloud Speech-to-Text API to build a Python application in App Engine.

b)

Use the Cloud Speech-to-Text API to build a Python application in a Compute Engine instance.

c)

Use Dialogflow for simple queries and the Cloud Speech-to-Text API for complex queries.

d)

Use Dialogflow to implement the chatbot, defining the intents based on the most common queries collected.

27.

An aerospace company uses a proprietary data format to store its flight data. You need to connect this new data source to BigQuery and stream the data into BigQuery. You want to efficiently import the data into BigQuery while consuming as few resources as possible. What should you do?

a)

Write a shell script that triggers a Cloud Function that performs periodic ETL batch jobs on the new data source.

b)

Use a standard Dataflow pipeline to store the raw data in BigQuery, and then transform the format later when the data is used.

c)

Use Apache Hive to write a Dataproc job that streams the data into BigQuery in CSV format.

d)

Use an Apache Beam custom connector to write a Dataflow pipeline that streams the data into BigQuery in Avro format.

28.

An online brokerage company requires a high volume trade processing architecture. You need to create a secure queuing system that triggers jobs. The jobs will run in Google Cloud and call the company's Python API to execute trades. You need to efficiently implement a solution. What should you do?

a)

Use a Pub/Sub push subscription to trigger a Cloud Function to pass the data to the Python API.

b)

Write an application hosted on a Compute Engine instance that makes a push subscription to the Pub/Sub topic.

c)

Write an application that makes a queue in a NoSQL database.

d)

Use Cloud Composer to subscribe to a Pub/Sub topic and call the Python API.

29.

Your company wants to be able to retrieve large result sets of medical information from your current system, which has over 10 TBs in the database, and store the data in new tables for further query. The database must have a low-maintenance architecture and be accessible via SQL. You need to implement a cost-effective solution that can support data analytics for large result sets. What should you do?

a)

Use Cloud SQL, but first organize the data into tables. Use JOIN in queries to retrieve data.

b)

Use BigQuery as a data warehouse. Set output destinations for caching large queries.

c)

Use a MySQL cluster installed on a Compute Engine managed instance group for scalability

d)

Use Cloud Spanner to replicate the data across regions. Normalize the data in a series of tables.

30.

You have 15 TB of data in your on-premises data center that you want to transfer to Google Cloud. Your data changes weekly and is stored in a POSIX-compliant source. The network operations team has granted you 500 Mbps bandwidth to the public internet. You want to follow Google recommended practices to reliably transfer your data to Google Cloud on a weekly basis. What should you do?

a)

Use Cloud Scheduler to trigger the gsutil command. Use the -m parameter for optimal parallelism.

b)

Use Transfer Appliance to migrate your data into a Google Kubernetes Engine cluster, and then configure a weekly transfer job.

c)

Install Storage Transfer Service for on-premises data in your data center, and then configure a weekly transfer job

d)

Install Storage Transfer Service for on-premises data on a Google Cloud virtual machine, and then configure a weekly transfer job.

31.

You are designing a system that requires an ACID-compliant database. You must ensure that the system requires minimal human intervention in case of a failure. What should you do?

a)

Configure a Cloud SQL for MySQL instance with point-in-time recovery enabled.

b)

Configure a Cloud SQL for PostgreSQL instance with high availability enabled.

c)

Configure a Bigtable instance with more than one cluster.

d)

Configure a BigQuery table with a multi-region configuration.

32.

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?

a)

Use Dataflow for your workflow pipelines. Use Cloud Run triggers for scheduling.

b)

Use Dataflow for your workflow pipelines. Use shell scripts to schedule workflows.

c)

Use Cloud Composer in a Shared VPC configuration. Place the Cloud Composer resources in the host project.

d)

Use Cloud Composer in a Shared VPC configuration. Place the Cloud Composer resources in the service project.

33.

You are using BigQuery and Data Studio to design a customer-facing dashboard that displays large quantities of aggregated data. You expect a high volume of concurrent users. You need to optimize the dashboard to provide quick visualizations with minimal latency. What should you do?

a)

Use BigQuery BI Engine with materialized views.

b)

Use BigQuery BI Engine with logical views.

c)

Use BigQuery BI Engine with streaming data.

d)

Use BigQuery BI Engine with authorized views.

34.

Government regulations in the banking industry mandate the protection of clients' personally identifiable information (PII). Your company requires PII to be access controlled, encrypted, and compliant with major data protection standards. In addition to using Cloud Data Loss Prevention (Cloud DLP), you want to follow Google-recommended practices and use service accounts to control access to PII. What should you do?

a)

Assign the required Identity and Access Management (IAM) roles to every employee, and create a single service account to access project resources.

b)

Use one service account to access a Cloud SQL database, and use separate service accounts for each human user.

c)

Use Cloud Storage to comply with major data protection standards. Use one service account shared by all users.

d)

Use Cloud Storage to comply with major data protection standards. Use multiple service accounts attached to IAM groups to grant the appropriate access to each group.

35.

You need to migrate a Redis database from an on-premises data center to a Memorystore for Redis instance. You want to follow Google recommended practices and perform the migration for minimal cost, time and effort. What should you do?

a)

Make an RDB backup of the Redis database, use the gsutil utility to copy the RDB file into a Cloud Storage bucket, and then import the RDB file into the Memorystore for Redis instance.

b)

Make a secondary instance of the Redis database on a Compute Engine instance and then perform a live cutover.

c)

Create a Dataflow job to read the Redis database from the on-premises data center and write the data to a Memorystore for Redis instance.

d)

Write a shell script to migrate the Redis data and create a new Memorystore for Redis instance.

36.

Your platform on your on-premises environment generates 100 GB of data daily, composed of millions of structured JSON text files. Your on premises environment cannot be accessed from the public internet. You want to use Google Cloud products to query and explore the platform data. What should you do?

a)

Use Cloud Scheduler to copy data daily from your on-premises environment to Cloud Storage. Use the BigQuery Data Transfer Service to import data into BigQuery.

b)

Use a Transfer Appliance to copy data from your on-premises environment to Cloud Storage. Use the BigQuery Data Transfer Service to import data into BigQuery.

c)

Use Transfer Service for on-premises data to copy data from your on-premises environment to Cloud Storage. Use the BigQuery Data Transfer Service to import data into BigQuer

d)

Use the BigQuery Data Transfer Service dataset copy to transfer all data into BigQuery.