πŸ”

PDE β€” questions

Page 9 of 18 Β· 341 total questions.

Topic 1 Β· Question 161

You need to choose a database to store time series CPU and memory usage for millions of computers. You need to store this data in one-second interval samples. Analysts will be performing real-time, ad hoc analytics against the database. You want to avoid being charged for every query executed and ensure that the schema design will allow for future growth of the dataset. Which database and data model should you choose?

  • ACreate a table in BigQuery, and append the new samples for CPU and memory to the table
  • BCreate a wide table in BigQuery, create a column for the sample value at each second, and update the row with the interval for each second
  • CCreate a narrow table in Bigtable with a row key that combines the Computer Engine computer identifier with the sample time at each second (correct answer)
  • DCreate a wide table in Bigtable with a row key that combines the computer identifier with the sample time at each minute, and combine the values for each second as column data.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Create a narrow table in Bigtable with a row key that combines the Computer Engine computer identifier with the sample time at each second

Explanation

Cloud Bigtable is a managed, low-latency NoSQL wide-column store for very high-throughput workloads. This option meets the real-time / low-latency performance requirement.

Topic 1 Β· Question 162

You want to archive data in Cloud Storage. Because some data is very sensitive, you want to use the `Trust No One` (TNO) approach to encrypt your data to prevent the cloud provider staff from decrypting your data. What should you do?

  • AUse gcloud kms keys create to create a symmetric key. Then use gcloud kms encrypt to encrypt each archival file with the key and unique additional authenticated data (AAD). Use gsutil cp to upload each encrypted file to the Cloud Storage bucket, and keep the AAD outside of Google Cloud.
  • BUse gcloud kms keys create to create a symmetric key. Then use gcloud kms encrypt to encrypt each archival file with the key. Use gsutil cp to upload each encrypted file to the Cloud Storage bucket. Manually destroy the key previously used for encryption, and rotate the key once.
  • CSpecify customer-supplied encryption key (CSEK) in the .boto configuration file. Use gsutil cp to upload each archival file to the Cloud Storage bucket. Save the CSEK in Cloud Memorystore as permanent storage of the secret.
  • DSpecify customer-supplied encryption key (CSEK) in the .boto configuration file. Use gsutil cp to upload each archival file to the Cloud Storage bucket. Save the CSEK in a different project that only the security team can access. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Specify customer-supplied encryption key (CSEK) in the.boto configuration file. Use gsutil cp to upload each archival file to the Cloud Storage bucket. Save the CSEK in a different project that only the security team...

Explanation

Cloud Storage provides durable, scalable object storage that is fully managed.

Topic 1 Β· Question 163

You have data pipelines running on BigQuery, Dataflow, and Dataproc. You need to perform health checks and monitor their behavior, and then notify the team managing the pipelines if they fail. You also need to be able to work across multiple projects. Your preference is to use managed products or features of the platform. What should you do?

  • AExport the information to Cloud Monitoring, and set up an Alerting policy (correct answer)
  • BRun a Virtual Machine in Compute Engine with Airflow, and export the information to Cloud Monitoring
  • CExport the logs to BigQuery, and set up App Engine to read that information and send emails if you find a failure in the logs
  • DDevelop an App Engine application to consume logs using GCP API calls, and send emails if you find a failure in the logs
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Export the information to Cloud Monitoring, and set up an Alerting policy

Explanation

Cloud Monitoring collects metrics, dashboards, and alerts to observe system health.

Topic 1 Β· Question 164

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?

  • ACreate a new view with BigQuery that does not include a column with city information.
  • BUse SQL in BigQuery to transform the state column using a one-hot encoding method, and make each city a column with binary values. (correct answer)
  • CUse TensorFlow to create a categorical variable with a vocabulary list. Create the vocabulary file and upload that as part of your model to BigQuery ML.
  • DUse 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.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Use SQL in BigQuery to transform the state column using a one-hot encoding method, and make each city a column with binary values.

Explanation

BigQuery is a serverless, petabyte-scale data warehouse for fast SQL analytics with no infrastructure to manage.

Topic 1 Β· Question 165

You work for a large bank that operates in locations throughout North America. You are setting up a data storage system that will handle bank account transactions. You require ACID compliance and the ability to access data with SQL. Which solution is appropriate?

  • AStore transaction data in Cloud Spanner. Enable stale reads to reduce latency.
  • BStore transaction in Cloud Spanner. Use locking read-write transactions. (correct answer)
  • CStore transaction data in BigQuery. Disabled the query cache to ensure consistency.
  • DStore transaction data in Cloud SQL. Use a federated query BigQuery for analysis.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Store transaction in Cloud Spanner. Use locking read-write transactions.

Explanation

Cloud Spanner is a horizontally scalable, strongly consistent relational database with global reach.

Topic 1 Β· Question 166

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?

  • AImplement clustering in BigQuery on the ingest date column.
  • BImplement clustering in BigQuery on the package-tracking ID column. (correct answer)
  • CTier older data onto Cloud Storage files and create a BigQuery table using Cloud Storage as an external data source.
  • DRe-create the table using data partitioning on the package delivery date.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Implement clustering in BigQuery on the package-tracking ID column.

Explanation

BigQuery is a serverless, petabyte-scale data warehouse for fast SQL analytics with no infrastructure to manage. This option meets the real-time / low-latency performance requirement.

Topic 1 Β· Question 167

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?

  • AMigrate the workloads to Dataproc plus HDFS; modernize later.
  • BMigrate the workloads to Dataproc plus Cloud Storage; modernize later. (correct answer)
  • CMigrate the Spark workload to Dataproc plus HDFS, and modernize the Hive workload for BigQuery.
  • DModernize the Spark workload for Dataflow and the Hive workload for BigQuery.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Migrate the workloads to Dataproc plus Cloud Storage; modernize later.

Explanation

Cloud Storage provides durable, scalable object storage that is fully managed. Dataproc runs managed Spark and Hadoop clusters for big-data processing.

Topic 1 Β· Question 168

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?

  • AUse 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.
  • BUse BigQuery column-level security. Set the table permissions so that only members of the Customer Service user group can see the SSN column.
  • CBefore loading the data into BigQuery, use Cloud Data Loss Prevention (DLP) to replace input values with a cryptographic hash.
  • DBefore loading the data into BigQuery, use Cloud Data Loss Prevention (DLP) to replace input values with a cryptographic format-preserving encryption token. (correct answer)
Reveal answer & explanation
Correct answer: D

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

Explanation

BigQuery is a serverless, petabyte-scale data warehouse for fast SQL analytics with no infrastructure to manage.

Topic 1 Β· Question 169

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?

  • APartition by transaction time; cluster by state first, then city, then store ID. (correct answer)
  • BPartition by transaction time; cluster by store ID first, then city, then state.
  • CTop-level cluster by state first, then city, then store ID.
  • DTop-level cluster by store ID first, then city, then state.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Partition by transaction time; cluster by state first, then city, then store ID.

Topic 1 Β· Question 170

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?

  • ASet up the Pub/Sub emulator on your local machine. Validate the behavior of your new subscriber logic before deploying it to production.
  • BCreate 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. (correct answer)
  • CUse 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.
  • DEnable 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.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option 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.

Explanation

Pub/Sub is a serverless, global messaging service that decouples services and ingests high-volume event streams.

Topic 1 Β· Question 171

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?

  • AWhen 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. (correct answer)
  • BWhen 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.
  • CUse 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.
  • DPreprocess all data using Dataflow. At prediction time, use BigQuery's ML.EVALUATE clause without specifying any further transformations on the input data.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option 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.

Explanation

BigQuery is a serverless, petabyte-scale data warehouse for fast SQL analytics with no infrastructure to manage.

Topic 1 Β· Question 172

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?

  • AUse a fixed window with a duration of 5 seconds. Emit results by setting the following trigger: AfterProcessingTime.pastFirstElementInPane().plusDelayOf (Duration.standardSeconds(30))
  • BUse a fixed window with a duration of 30 seconds. Emit results by setting the following trigger: AfterWatermark.pastEndOfWindow().plusDelayOf (Duration.standardSeconds(5))
  • CUse a sliding window with a duration of 5 seconds. Emit results by setting the following trigger: AfterProcessingTime.pastFirstElementInPane().plusDelayOf (Duration.standardSeconds(30))
  • DUse a sliding window with a duration of 30 seconds and a period of 5 seconds. Emit results by setting the following trigger: AfterWatermark.pastEndOfWindow () (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option 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 ().

Topic 1 Β· Question 173

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?

  • ACreate 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.
  • BSchedule a Cloud Function to run hourly, pulling all available messages from the Pub/Sub topic and performing the necessary aggregations.
  • CSchedule a batch Dataflow job to run hourly, pulling all available messages from the Pub/Sub topic and performing the necessary aggregations.
  • DCreate a streaming Dataflow job that reads continually from the Pub/Sub topic and performs the necessary aggregations using tumbling windows. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Create a streaming Dataflow job that reads continually from the Pub/Sub topic and performs the necessary aggregations using tumbling windows.

Explanation

Dataflow runs serverless Apache Beam pipelines for stream and batch data processing with autoscaling. Pub/Sub is a serverless, global messaging service that decouples services and ingests high-volume event streams.

Topic 1 Β· Question 174

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?

  • AAutomate the 10 intents that cover 70% of the requests so that live agents can handle more complicated requests. (correct answer)
  • BAutomate the more complicated requests first because those require more of the agents' time.
  • CAutomate a blend of the shortest and longest intents to be representative of all intents.
  • DAutomate intents in places where common words such as 'payment' appear only once so the software isn't confused.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Automate the 10 intents that cover 70% of the requests so that live agents can handle more complicated requests.

Topic 1 Β· Question 175

Your company is implementing a data warehouse using BigQuery, and you have been tasked with designing the data model. You move your on-premises 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?

  • ADenormalize the data.
  • BShard the data by customer ID.
  • CMaterialize the dimensional data in views.
  • DPartition the data by transaction date. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Partition the data by transaction date.

Topic 1 Β· Question 176

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?

  • AImport the data from Cloud Storage into BigQuery. Create a new BigQuery table, and skip the rows with errors.
  • BCreate a Compute Engine instance and create a new copy of the data in Cloud Storage. Skip the rows with errors.
  • CCreate 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. (correct answer)
  • DCreate 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.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option 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.

Explanation

Cloud Storage provides durable, scalable object storage that is fully managed. Dataflow runs serverless Apache Beam pipelines for stream and batch data processing with autoscaling.

Topic 1 Β· Question 177

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?

  • AConvert your PySpark commands into SparkSQL queries to transform the data, and then run your pipeline on Dataproc to write the data into BigQuery.
  • BIngest 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.
  • CIngest 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. (correct answer)
  • DUse Apache Beam Python SDK to build the transformation pipelines, and write the data into BigQuery.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option 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.

Explanation

Cloud Storage provides durable, scalable object storage that is fully managed. BigQuery is a serverless, petabyte-scale data warehouse for fast SQL analytics with no infrastructure to manage.

Topic 1 Β· Question 178

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?

  • ASwitch to compressed Avro files.
  • BReduce the batch size.
  • CRetry records that throw an error.
  • DUse CoGroupByKey instead of the SideInput. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Use CoGroupByKey instead of the SideInput.

Topic 1 Β· Question 179

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?

  • ACreate a pseudonym by replacing the PII data with cryptogenic tokens, and store the non-tokenized data in a locked-down button.
  • BRedact all PII data, and store a version of the unredacted data in a locked-down bucket.
  • CScan every table in BigQuery, and mask the data it finds that has PII.
  • DCreate a pseudonym by replacing PII data with a cryptographic format-preserving token. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Create a pseudonym by replacing PII data with a cryptographic format-preserving token. This option meets the real-time / low-latency performance requirement.

Topic 1 Β· Question 180

You are migrating an application that tracks library books and information about each book, such as author or year published, from an on-premises 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?

  • AKeep the schema the same, maintain the different tables for the book and each of the attributes, and query as you are doing today.
  • BCreate a table that is wide and includes a column for each attribute, including the author's first name, last name, date of birth, etc.
  • CCreate a table that includes information about the books and authors, but nest the author fields inside the author column. (correct answer)
  • DKeep the schema the same, create a view that joins all of the tables, and always query the view.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Create a table that includes information about the books and authors, but nest the author fields inside the author column.

Showing questions 161–180 of 341 Β· Page 9 of 18