Scaling a Cloud Dataproc cluster typically involves ____.
Correct Answer: A
After creating a Cloud Dataproc cluster, you can scale the cluster by increasing or decreasing the number of worker nodes in the cluster at any time, even when jobs are running on the cluster. Cloud Dataproc clusters are typically scaled to: 1 ) increase the number of workers to make a job run faster 2 ) decrease the number of workers to save money 3 ) increase the number of nodes to expand available Hadoop Distributed Filesystem (HDFS) storage Reference: https://cloud.google.com/dataproc/docs/concepts/scaling-clusters
Professional-Data-Engineer Exam Question 97
You stream order data by using a Dataflow pipeline, and write the aggregated result to Memorystore. You provisioned a Memorystore for Redis instance with Basic Tier. 4 GB capacity, which is used by 40 clients for read-only access. You are expecting the number of read-only clients to increase significantly to a few hundred and you need to be able to support the demand. You want to ensure that read and write access availability is not impacted, and any changes you make can be deployed quickly. What should you do?
Correct Answer: D
The Basic Tier of Memorystore for Redis provides a standalone Redis instance that is not replicated and does not support read replicas. This means that it cannot scale horizontally to handle more read requests, and it does not provide high availability or automatic failover. If thenumber of read-only clients increases significantly, the Basic Tier instance may not be able to handle the demand and may impact the read and write access availability. Therefore, option A is not a good solution, as it would require creating multiple Basic Tier instances and modifying the Dataflow pipeline and the clients to distribute the load among them. This would increase the complexity and the management overhead of the solution. The Standard Tier of Memorystore for Redis provides a highly available Redis instance that supports replication and read replicas. Replication ensures that the data is backed up in another zone and can fail over automatically in case of a primary node failure. Read replicas allow scaling the read throughput by adding up to five replicas to an instance and using them for read-only queries. The Standard Tier also supports in-transit encryption and maintenance windows. Therefore, option D is the best solution, as it would create a new Standard Tier instance with a higher capacity (5 GB) and multiple read replicas to handle the increased demand. The old instance can be deleted after migrating the data to the new instance. Option B is not a good solution, as it would create a new Standard Tier instance with the same capacity (4 GB) and no read replicas. This would not improve the read throughput or the availability of the solution. Option C is not a good solution, as it would create a new Memorystore for Memcached instance, which is a different service that uses a different protocol and data model than Redis. This would require changing the code of the Dataflow pipeline and the clients to use the Memcached protocol and data structures, which would take more time and effort than migrating to a new Redis instance. References: Redis tier capabilities | Memorystore for Redis | Google Cloud, Pricing | Memorystore for Redis | Google Cloud, What is Memorystore? | Google Cloud Blog, Working with GCP Memorystore - Simple Talk - Redgate Software
Professional-Data-Engineer Exam Question 98
Which Cloud Dataflow / Beam feature should you use to aggregate data in an unbounded data source every hour based on the time when the data entered the pipeline?
Correct Answer: D
When collecting and grouping data into windows, Beam uses triggers to determine when to emit the aggregated results of each window. Processing time triggers. These triggers operate on the processing time - the time when the data element is processed at any given stage in the pipeline. Event time triggers. These triggers operate on the event time, as indicated by the timestamp on each data element. Beam's default trigger is event time-based. Reference: https://beam.apache.org/documentation/programming-guide/#triggers
Professional-Data-Engineer Exam Question 99
You are planning to load some of your existing on-premises data into BigQuery on Google Cloud. You want to either stream or batch-load data, depending on your use case. Additionally, you want to mask some sensitive data before loading into BigQuery. You need to do this in a programmatic way while keeping costs to a minimum. What should you do?
Correct Answer: B
To load on-premises data into BigQuery while masking sensitive data, we need a solution that offers flexibility for both streaming and batch processing, as well as data masking capabilities. Here's a detailed explanation of why option B is the best choice: Apache Beam and Dataflow: Apache Beam SDKprovides a unified programming model for both batch and stream data processing. Google Cloud Dataflowis a fully managed service for executing Apache Beam pipelines, offering scalability and ease of use. Customization for Different Use Cases: By using the Apache Beam SDK, you can write custom pipelines that can handle both streaming and batch processing within the same framework. This allows you to switch between streaming and batch modes based on your use case without changing the core logic of your data pipeline. Data Masking with Cloud DLP: Google Cloud Data Loss Prevention (DLP)API can be integrated into your Apache Beam pipeline to de- identify and mask sensitive data programmatically before loading it into BigQuery. This ensures that sensitive data is handled securely and complies with privacy requirements. Cost Efficiency: Using Dataflow can be cost-effective because it is a fully managed service, reducing the operational overhead associated with managing your own infrastructure. The pay-as-you-go model ensures you only pay for the resources you consume, which can help keep costs under control. Implementation Steps: Set up Apache Beam Pipeline: Write a pipeline using the Apache Beam SDK for Python that reads data from your on-premises storage. Add transformations for data processing, including the integration with Cloud DLP for data masking. Configure Dataflow: Deploy the Apache Beam pipeline on Google Cloud Dataflow. Customize the pipeline options for both streaming and batch use cases. Load Data into BigQuery: Set BigQuery as the sink for your data in the Apache Beam pipeline. Ensure the processed and masked data is loaded into the appropriate BigQuery tables. Reference Links: Apache Beam Documentation Google Cloud Dataflow Documentation Google Cloud DLP Documentation BigQuery Documentation
Professional-Data-Engineer Exam Question 100
You have Cloud Functions written in Node.js that pull messages from Cloud Pub/Sub and send the data to BigQuery. You observe that the message processing rate on the Pub/Sub topic is orders of magnitude higher than anticipated, but there is no error logged in Stackdriver Log Viewer. What are the two most likely causes of this problem? Choose 2 answers.