Professional Data Engineer Practice Test practice questions, page 13 of 14, with answer review and explanations.
Question 61
Your analytics team wants to build a simple statistical model to determine which customers are most likely to work with your company again, based on a few different metrics. They want to run the model on Apache Spark, using data housed in Google Cloud Storage, and you have recommended using Google Cloud Dataproc to execute this job. Testing has shown that this workload can run in approximately 30 minutes on a 15-node cluster, outputting the results into Google BigQuery. The plan is to run this workload weekly. How should you optimize the cluster for cost?
Migrate the workload to Google Cloud Dataflow
Use pre-emptible virtual machines (VMs) for the cluster
Use a higher-memory node so that the job runs faster
Use SSDs on the worker nodes so that the job can run faster
Question 62
Your company receives both batch- and stream-based event data. You want to process the data using Google Cloud Dataflow over a predictable time period. However, you realize that in some instances data can arrive late or out of order. How should you design your Cloud Dataflow pipeline to handle data that is late or out of order?
Set a single global window to capture all the data.
Set sliding windows to capture all the lagged data.
Use watermarks and timestamps to capture the lagged data.
Ensure every datasource type (stream or batch) has a timestamp, and use the timestamps to define the logic for lagged data.
Question 63
You have some data, which is shown in the graphic below. The two dimensions are X and Y, and the shade of each dot represents what class it is. You want to classify this data accurately using a linear algorithm. To do this you need to add a synthetic feature. What should the value of that feature be?
X2+Y2
X2
Y2
cos(X)
Question 64
You are integrating one of your internal IT applications and Google BigQuery, so users can query BigQuery from the application's interface. You do not want individual users to authenticate to BigQuery and you do not want to give them access to the dataset. You need to securely access BigQuery from your IT application. What should you do?
Create groups for your users and give those groups access to the dataset
Integrate with a single sign-on (SSO) platform, and pass each user's credentials along with the query request
Create a service account and grant dataset access to that account. Use the service account's private key to access the dataset
Create a dummy user and grant dataset access to that user. Store the username and password for that user in a file on the files system, and use those credentials to access the BigQuery dataset
Question 65
You are building a data pipeline on Google Cloud. You need to prepare data using a casual method for a machine-learning process. You want to support a logistic regression model. You also need to monitor and adjust for null values, which must remain real-valued and cannot be removed. What should you do?
Use Cloud Dataprep to find null values in sample source data. Convert all nulls to 'none' using a Cloud Dataproc job.
Use Cloud Dataprep to find null values in sample source data. Convert all nulls to 0 using a Cloud Dataprep job.
Use Cloud Dataflow to find null values in sample source data. Convert all nulls to 'none' using a Cloud Dataprep job.
Use Cloud Dataflow to find null values in sample source data. Convert all nulls to 0 using a custom script.