Featured image of post Preparation for Google Cloud: Professional Data Engineer (PDE) Exam

Preparation for Google Cloud: Professional Data Engineer (PDE) Exam

My journey on how I prepared for the Google PDE exam, resources I used, insights, and practical tips.

I recently passed the Google Cloud Professional Cloud Architect (PCA) exam. With multiple cloud certifications under my belt, I have decided to shift my career towards data engineering and machine learning. This transition aligns with my growing interest in moving away from infrastructure and focusing more on Data and AI. Most of the time, I worked on provisioning, architecting, and maintaining solutions for other teams. Now, I want to be on the other side a bit more. As part of this journey, I’m pursuing the Google Cloud Professional Data Engineer (PDE) certification, and in this article, I’ll share my preparation journey, useful resources, and key takeaways to help you navigate your own study path. All referenced links are listed at the end of the post.

TL;DR

  • Followed Google Cloud Skills Boost Data Engineer Path
  • Focused on BigQuery, Dataflow, Dataproc, Pub/Sub
  • Practiced with ExamPrepper mock tests
  • Did some Practice Exams I found on Udemy

1. Google Cloud Skills Boost

I started with Google Cloud Skills Boost, specifically the Data Engineer Learning Path, which consists of various hands-on labs. I focused on:

  • BigQuery: Optimizing queries, partitioning, and clustering.
  • Dataflow: Streaming and batch processing.
  • Dataproc: Running Hadoop/Spark jobs on GCP.
  • Pub/Sub: Event-driven architectures and message queues.
  • ML/AI: Using Vertex AI, AI Platform, and AutoML.

While Skills Boost provided a solid foundation, in my opinion it lacks in-depth content. The videos are too short, so if you want to follow that format I recommend finding a good course at Udemy or Coursera. I tried to make the best of the labs, tinkering outside the tasks to leverage the free credits. Each module has a Quiz at the end, which also serves as a practice test.

2. Practice Tests

  • ExamPrepper: There are currently 319 questions available for free and with comments from members. Extremely useful.
  • Google’s Official Sample Questions: 21 questions, straight from the source. Not enough to prepare, but good to get a feel for the exam.

3. Key Skills for a Google Professional Data Engineer

  • Designing Data Processing Systems: Architecting batch and streaming data processing solutions using GCP tools such as Dataflow, Dataproc, and Pub/Sub.
  • Operationalizing Machine Learning Models: Deploying and managing ML models using Vertex AI, AI Platform, and AutoML.
  • Building and Maintaining Data Pipelines: Implementing reliable and efficient ETL workflows with Cloud Composer and Dataflow.
  • Ensuring Solution Quality: Applying best practices for data governance, security, and compliance using IAM, Data Catalog, and encryption techniques.
  • Optimizing Data Solutions: Performance tuning and cost optimization for BigQuery, Cloud Storage, and other GCP data services.
  • Monitoring and Troubleshooting Data Pipelines: Implementing observability with Cloud Logging, Cloud Monitoring, and error handling strategies.

3. Minimum Services to Know

Data Storage

Data Processing

ML & AI

Security & Governance

4. Understanding open source versus Google Cloud managed services

Many powerful open-source tools support modern data engineering workflows. To streamline operations at scale, Google Cloud often provides fully managed counterparts to these tools. The table below maps essential open-source technologies to their Google Cloud equivalents, highlighting key services.

Open sourceGoogle Cloud managed service
Hadoop, Spark, HiveDataproc
BeamDataflow
AirflowCloud Composer
Kafka, RabbitMQPub/Sub
CassandraCloud Bigtable

5. Notes on Services

5.1. Data Storage & Management

  • a. BigQuery:

    • Schema Design:

      • Star Schema: Fact table (metrics) surrounded by dimension tables (attributes). Exam Question: “A retail company needs to analyze sales data by region, product category, and time. Which schema is most suitable for this purpose?” (Answer: Star Schema). Understand the benefits of denormalization for analytical queries.
      • Snowflake Schema: Dimension tables are further normalized. Exam Question: “In which scenario is Snowflake Schema more appropriate than Star Schema?” (Answer: When dimension tables have complex relationships and data redundancy needs to be minimized). Understand trade-offs between query performance and data consistency.
      • Partitioning: Dividing tables into smaller segments based on a column (e.g., date). Exam Question: “How can you optimize query performance on a large table that is frequently queried by date range?” (Answer: Partition the table by the date column). Understand partitioning key selection (cardinality, data skew).
      • Clustering: Ordering data within partitions based on one or more columns. Exam Question: “A table partitioned by date is frequently queried based on product ID. How can you further improve query performance?” (Answer: Cluster the table by product ID). Understand the interaction between partitioning and clustering.
      • Best Practices: Consider data types (use appropriate types for storage and performance), avoid overly wide tables, and choose partitioning and clustering keys carefully. Exam Question: “Which data type is most efficient for storing boolean values in BigQuery?” (Answer: BOOL).
    • Query Optimization:

      • EXPLAIN PLAN: Use EXPLAIN to understand query execution plans and identify bottlenecks (e.g., full table scans). Exam Question: “How can you identify whether a query is performing a full table scan?” (Answer: Use EXPLAIN and look for “Scan” stage with no index).
      • WHERE Clause: Filter data as early as possible in the query. Exam Question: “Which of the following WHERE clauses is most efficient for querying a partitioned table?” (Answer: The one that includes the partitioning column in the filter).
      • JOIN Optimization: Understand different join types (INNER, LEFT, RIGHT, FULL). Use appropriate join conditions and order tables in the JOIN clause. Exam Question: “What is the potential impact of joining two very large tables without appropriate filtering?” (Answer: Can lead to significant query processing costs and slow performance due to Cartesian product).
      • Materialized Views: Pre-compute and store the results of frequently executed queries. Exam Question: “A dashboard relies on a complex aggregation query that takes several minutes to run. How can you improve the dashboard’s performance?” (Answer: Create a materialized view for the aggregation query). Understand when to use materialized views (data freshness, cost).
    • Cost Management:

      • On-Demand vs. Flat-Rate Pricing: Understand the difference and when each model is most cost-effective. Exam Question: “When is flat-rate pricing more suitable than on-demand pricing?” (Answer: When you have predictable and consistently high BigQuery usage).
      • Query Quotas: Set quotas to limit query costs. Exam Question: “How can you prevent runaway queries from consuming excessive BigQuery resources?” (Answer: Set query quotas).
      • Data Compression: Use columnar formats like Parquet and ORC to reduce storage costs and improve query performance. Exam Question: “Which data format is most efficient for storing large analytical datasets in BigQuery?” (Answer: Parquet).
      • APPROX_COUNT_DISTINCT, APPROX_TOP_COUNT: Use approximate functions for faster and cheaper cardinality estimation. Exam Question: “You need to estimate the number of unique users in a large table. Which function provides a cost-effective approximation?” (Answer: APPROX_COUNT_DISTINCT).
    • Security:

      • IAM Roles: Understand roles like roles/bigquery.dataViewer, roles/bigquery.dataEditor, roles/bigquery.admin. Exam Question: “Which IAM role grants a user the ability to read data from BigQuery tables but not modify them?” (Answer: roles/bigquery.dataViewer).
      • Authorized Views: Grant users access to specific columns or rows in a table without granting access to the entire table. Exam Question: “How can you grant a user access to only a subset of columns in a BigQuery table?” (Answer: Create an authorized view that selects only the desired columns).
      • Data Masking: Mask sensitive data in BigQuery tables to protect privacy. Exam Question: “How can you protect sensitive data like credit card numbers in BigQuery tables while still allowing analysts to perform aggregations?” (Answer: Use data masking).
      • Encryption: BigQuery encrypts data at rest and in transit. Understand CMEK (Customer Managed Encryption Keys) for greater control. Exam Question: “What is the benefit of using CMEK in BigQuery?” (Answer: It gives you control over the encryption keys used to protect your data).
    • Data Loading:

      • Batch Loading: Using bq load command or the BigQuery Data Transfer Service. Exam Question: “Which method is most suitable for loading a large CSV file from Cloud Storage into BigQuery?” (Answer: Batch loading using bq load).
      • Streaming Inserts: Inserting data in real-time using the BigQuery Storage Write API. Exam Question: “Which method is most suitable for ingesting real-time data from a streaming source into BigQuery?” (Answer: Streaming inserts using the Storage Write API). Understand the trade-offs between cost and latency.
      • Data Transfer Service: Scheduling automated data transfers from various sources. Exam Question: “How can you automate the transfer of data from YouTube Analytics to BigQuery?” (Answer: Use the BigQuery Data Transfer Service).
    • Data Formats:

      • CSV/JSON: Row-oriented, less efficient for analytical queries.
      • Avro/Parquet/ORC: Columnar formats, more efficient for analytical queries, support schema evolution. Exam Question: “Which data format is most efficient for storing analytical data in BigQuery and supports schema evolution?” (Answer: Avro or Parquet). Understand the benefits of columnar storage (reduced I/O, better compression).
    • BigQuery ML:

      • Understand creating and evaluating models directly within BigQuery using SQL. Exam Question: “How can you build and deploy a linear regression model directly within BigQuery without using external tools?” (Answer: Use BigQuery ML with the CREATE MODEL statement).
    • BigQuery Omni:

      • Know the functionality of querying data residing on other clouds (AWS, Azure) directly from BigQuery. Exam Question: “Your organization has data stored in both BigQuery and AWS S3. How can you analyze this data together using a single SQL interface?” (Answer: Use BigQuery Omni).
  • b. Cloud Storage:

    • Storage Classes:

      • Standard: Frequently accessed data. Exam Question: “Which storage class is best suited for data that needs to be accessed frequently with low latency?” (Answer: Standard).
      • Nearline: Infrequently accessed data with low storage costs but higher access costs. Exam Question: “Which storage class is best suited for data that is accessed less than once a month?” (Answer: Nearline).
      • Coldline: Data accessed very infrequently (e.g., archives). Exam Question: “Which storage class is best suited for data that is accessed less than once a quarter?” (Answer: Coldline).
      • Archive: Data accessed extremely rarely (e.g., disaster recovery backups). Exam Question: “Which storage class is best suited for data that is accessed less than once a year?” (Answer: Archive). Understand the cost and retrieval time trade-offs.
    • Lifecycle Management:

      • Automatically transition objects between storage classes based on age or other criteria. Exam Question: “How can you automatically move objects from Standard storage to Nearline storage after 30 days?” (Answer: Configure a lifecycle rule). Understand conditions and actions within lifecycle rules.
    • Access Control:

      • IAM Roles: Understand roles like roles/storage.objectViewer, roles/storage.objectCreator, roles/storage.admin. Exam Question: “Which IAM role allows a user to upload objects to a Cloud Storage bucket but not delete them?” (Answer: roles/storage.objectCreator).
      • Signed URLs: Grant temporary access to objects. Exam Question: “How can you grant a user temporary access to download a specific object from Cloud Storage without requiring them to have a Google account?” (Answer: Generate a signed URL). Understand the expiration time and security implications.
    • Data Transfer:

      • gsutil: Command-line tool for interacting with Cloud Storage. Exam Question: “What command-line tool is used to copy files between your local machine and Cloud Storage?” (Answer: gsutil).
      • Storage Transfer Service: Migrate large datasets from other cloud providers or on-premises storage to Cloud Storage. Exam Question: “How can you migrate a large dataset from AWS S3 to Cloud Storage?” (Answer: Use the Storage Transfer Service).
    • Object Versioning:

      • Keep multiple versions of an object. Exam Question: “How can you recover a previous version of an object that has been accidentally overwritten in Cloud Storage?” (Answer: Enable object versioning). Understand cost implications and how to manage versions.
  • c. Cloud SQL:

    • Database Options:

      • MySQL: Popular open-source relational database.
      • PostgreSQL: Another popular open-source relational database known for its advanced features.
      • SQL Server: Microsoft’s relational database. Exam Question: “Your application requires support for stored procedures written in T-SQL. Which Cloud SQL database option is most suitable?” (Answer: SQL Server). Understand use cases for each database type.
    • High Availability:

      • Failover replicas to provide automatic failover in case of a primary instance failure. Exam Question: “How can you ensure that your Cloud SQL database remains available even if the primary instance fails?” (Answer: Configure a failover replica). Understand the trade-offs between cost and availability.
    • Backups and Recovery:

      • Automated backups and point-in-time recovery. Exam Question: “How can you restore your Cloud SQL database to a specific point in time before a data corruption incident?” (Answer: Use point-in-time recovery from a backup).
    • Performance Tuning:

      • Query optimization, indexing, connection pooling. Exam Question: “What is the purpose of indexing in a relational database like Cloud SQL?” (Answer: To improve the performance of queries that filter or sort data on the indexed column).
    • Security:

      • Network configuration, firewall rules, IAM roles. Exam Question: “How can you restrict access to your Cloud SQL instance to only specific IP addresses?” (Answer: Configure firewall rules).
    • Cloud SQL Proxy:

      • Provides secure access to Cloud SQL instances without exposing them to the public internet. Exam Question: “What is the primary benefit of using the Cloud SQL Proxy?” (Answer: Provides secure access to Cloud SQL instances). Understand how it works (encrypting traffic, authenticating connections).
  • d. Cloud Spanner:

    • Schema Design:
      • Interleaved Tables: Store related data together to improve query performance. Exam Question: “How can you optimize queries that frequently join data from two tables in Cloud Spanner?” (Answer: Interleave the child table within the parent table).
      • Indexes: Create indexes to speed up queries that filter or sort data. Exam Question: “How can you improve the performance of queries that filter data based on a non-key column in Cloud Spanner?” (Answer: Create an index on that column).
      • Primary Key Selection: The primary key determines how data is distributed across Spanner nodes. Exam Question: “What is the potential impact of choosing a monotonically increasing primary key in Cloud Spanner?” (Answer: Can lead to hotspots and uneven data distribution).
    • Data Modeling:
      • Consider data access patterns and relationships when designing the schema.
    • Instance Configuration:
      • Choosing the appropriate number of nodes based on workload.
    • Transactions:
      • Ensure data consistency and integrity.
    • Performance Monitoring:
      • Identify potential bottlenecks.
    • Use Cases:
      • When Spanner is a good fit (global scale, strong consistency requirements) and when it’s not (smaller applications, simpler data models).
  • e. Datastore (Firestore in Datastore mode):

    • NoSQL concepts: Understand the differences between relational and NoSQL databases. Exam Question: “What are the key characteristics of a NoSQL database like Datastore?” (Answer: Schema-less, horizontal scalability, eventual consistency).
    • Schema-less design: Understand that data can have varying attributes. Exam Question: “What does schema-less mean in the context of Datastore?” (Answer: Documents in a collection can have different sets of attributes).
    • Querying limitations: Understand the limitations of querying without indexes. Exam Question: “What happens if you attempt to run a query in Datastore that is not supported by an index?” (Answer: The query will fail).
    • Scalability: Datastore is designed to scale horizontally. Exam Question: “How does Datastore handle increasing data volumes and user traffic?” (Answer: It scales horizontally by distributing data across multiple servers).
    • Transactions: ACID properties for data consistency. Exam Question: “What are the ACID properties of transactions in Datastore?” (Answer: Atomicity, Consistency, Isolation, Durability).
    • Indexes: Creating indexes for efficient queries. Exam Question: “When is it necessary to create an index in Datastore?” (Answer: When you need to query data based on specific properties).

5.2. Data Processing & Pipelines

  • a. Dataflow:

    • Apache Beam:

      • PCollections: Represent distributed datasets. Exam Question: “What is a PCollection in Apache Beam?” (Answer: An immutable, distributed collection of data).
      • PTransforms: Represent data processing operations. Exam Question: “What is a PTransform in Apache Beam?” (Answer: An operation that transforms one or more PCollections into one or more PCollections).
      • Pipelines: Represent the overall data processing workflow. Exam Question: “What is the purpose of a Pipeline object in Apache Beam?” (Answer: To define the overall data processing workflow). Understand the building blocks of Beam pipelines.
    • Batch vs. Stream Processing:

      • Batch: Processing data in bulk. Exam Question: “Which processing mode is most suitable for analyzing historical data?” (Answer: Batch processing).
      • Stream: Processing data in real-time. Exam Question: “Which processing mode is most suitable for processing real-time sensor data?” (Answer: Stream processing).
    • Windowing:

      • Fixed Windows: Divide data into fixed-size time intervals. Exam Question: “How do fixed windows divide data in stream processing?” (Answer: Into non-overlapping time intervals of a fixed duration).
      • Sliding Windows: Overlapping time intervals. Exam Question: “What is the key difference between fixed windows and sliding windows?” (Answer: Sliding windows overlap, while fixed windows do not).
      • Session Windows: Group data based on activity. Exam Question: “Which type of window is best suited for analyzing user sessions based on periods of inactivity?” (Answer: Session windows). Understand the use cases for each window type.
    • Triggers:

      • Control when results are emitted from a window. Exam Question: “What is the purpose of a trigger in stream processing?” (Answer: To control when results are emitted from a window). Understand early firing, late data handling.
    • Fault Tolerance:

      • Dataflow automatically handles failures. Exam Question: “How does Dataflow handle worker failures during pipeline execution?” (Answer: It automatically restarts the failed workers and reprocesses the data).
    • Autoscaling:

      • Dataflow automatically scales resources based on workload. Exam Question: “How does Dataflow automatically adjust resources based on workload?” (Answer: By dynamically adding or removing workers).
    • Templates:

      • Reusable pipelines. Exam Question: “What is the purpose of Dataflow templates?” (Answer: To create reusable pipelines that can be launched with different parameters).
    • Monitoring:

      • Using Cloud Monitoring and Dataflow’s UI to track pipeline performance.
  • b. Dataproc:

    • Spark and Hadoop:

      • Understand the basics of Spark and Hadoop:
        • Hadoop: Understand the core components: HDFS (Hadoop Distributed File System) for storage and MapReduce for processing. Exam Question: “What is the primary function of HDFS in a Hadoop cluster?” (Answer: To provide distributed, fault-tolerant storage for large datasets). Know the limitations of MapReduce (e.g., iterative processing).
        • Spark: Understand Spark’s core concepts: RDDs (Resilient Distributed Datasets), DataFrames, Spark SQL, Spark Streaming, MLlib (machine learning library), GraphX (graph processing). Exam Question: “What is an RDD in Spark?” (Answer: An immutable, distributed collection of data). Understand the benefits of Spark’s in-memory processing. Know when to use Spark SQL for structured data processing.
        • Comparison: Understand the differences between Hadoop and Spark and when to choose each. Exam Question: “In what scenario is Spark generally more performant than MapReduce?” (Answer: When processing data iteratively, such as in machine learning algorithms).
    • Cluster Configuration:

      • Choosing the appropriate machine types and number of workers:
        • Machine Types: Understand the different machine types available on GCP (e.g., Compute Engine instance types) and their characteristics (CPU, memory, disk). Exam Question: “Which machine type is best suited for CPU-intensive Spark jobs?” (Answer: A machine type with a high number of vCPUs). Consider general-purpose, compute-optimized, and memory-optimized machine types.
        • Number of Workers: Understand how the number of workers affects performance and cost. Consider the size of the dataset, the complexity of the job, and the desired processing time. Exam Question: “Increasing the number of workers in a Dataproc cluster typically leads to which of the following?” (Answer: Increased parallelism and potentially faster job completion time, but also increased cost). Understand the concept of over-provisioning and under-provisioning.
        • Preemptible VMs: Know how to use preemptible VMs to reduce costs. Exam Question: “How can you reduce the cost of a Dataproc cluster if the job is fault-tolerant and can tolerate interruptions?” (Answer: Use preemptible VMs for worker nodes). Understand the limitations of preemptible VMs (they can be terminated at any time).
    • Autoscaling:

      • Automatically scaling the number of workers based on workload:
        • Autoscaling Policies: Understand how to configure autoscaling policies (minimum and maximum number of workers, scaling triggers). Exam Question: “How can you configure a Dataproc cluster to automatically scale up when CPU utilization exceeds a certain threshold?” (Answer: Configure an autoscaling policy with a CPU utilization metric trigger).
        • Scaling Triggers: Understand different scaling triggers (CPU utilization, memory utilization, YARN pending memory). Exam Question: “Which metric is most appropriate for triggering autoscaling in a Dataproc cluster that is running memory-intensive Spark jobs?” (Answer: Memory utilization).
        • Graceful Decommissioning: Understand how Dataproc handles worker decommissioning during autoscaling. Exam Question: “What happens to running Spark executors when a worker node is decommissioned during autoscaling?” (Answer: Dataproc attempts to gracefully decommission the executors to minimize data loss).
    • Job Submission:

      • Submitting Spark and Hadoop jobs to Dataproc:
        • gcloud dataproc jobs submit command: Understand how to use the gcloud command-line tool to submit jobs. Exam Question: “Which command is used to submit a Spark job to a Dataproc cluster from the command line?” (Answer: gcloud dataproc jobs submit spark).
        • Spark Submit Arguments: Understand common Spark submit arguments (e.g., --class, --jars, --driver-memory, --executor-memory). Exam Question: “Which Spark submit argument specifies the main class of the Spark application?” (Answer: --class).
        • Hadoop JAR Jobs: Understand how to submit Hadoop JAR jobs to Dataproc. Exam Question: “How can you submit a MapReduce job to a Dataproc cluster?” (Answer: Submit a Hadoop JAR job).
        • Jupyter Notebooks: Understand how to use Jupyter notebooks with Dataproc.
    • Integration with other GCP services:

      • Cloud Storage, BigQuery, and other GCP services:
        • Cloud Storage: Understand how to use Cloud Storage as the input and output for Dataproc jobs. Exam Question: “How can you configure a Dataproc job to read data from a Cloud Storage bucket?” (Answer: Specify the Cloud Storage bucket path as the input path for the job). Understand the gs:// URI scheme.
        • BigQuery: Understand how to use Spark SQL to query data in BigQuery. Exam Question: “How can you use Spark to read data from a BigQuery table?” (Answer: Use the BigQuery connector for Spark). Understand how to write data from Spark to BigQuery.
        • Cloud Logging: Understand how to integrate Dataproc with Cloud Logging for monitoring and troubleshooting. Exam Question: “How can you collect logs from a Dataproc cluster for analysis?” (Answer: Integrate Dataproc with Cloud Logging).
    • Initialization Actions:

      • Customizing Dataproc clusters:
        • Shell Scripts: Understand how to use initialization actions to run shell scripts when creating a Dataproc cluster. Exam Question: “How can you install custom software on all nodes in a Dataproc cluster?” (Answer: Use an initialization action to run a shell script that installs the software).
        • Python Scripts: Understand how to use initialization actions to run Python scripts.
        • Use Cases: Common use cases for initialization actions (e.g., installing dependencies, configuring environment variables, setting up security). Exam Question: “You need to install a specific Python library on all nodes in a Dataproc cluster. How can you automate this process?” (Answer: Use an initialization action to run a pip install command).
    • Versioning:

      • Managing different versions of Spark and Hadoop:
        • Dataproc Image Versions: Understand how to select the Dataproc image version when creating a cluster. Exam Question: “How can you ensure that a Dataproc cluster is running a specific version of Spark?” (Answer: Select the appropriate Dataproc image version when creating the cluster). Understand the components included in each image version.
        • Component Gateway: Understand how to access the web UIs for different components (e.g., Spark UI, Hadoop YARN UI) through the Component Gateway.
  • c. Pub/Sub:

    • Publishers and Subscribers:

      • Publishers send messages to topics. Subscribers receive messages from subscriptions.
        • Publisher Responsibilities: Creating and sending messages to a Pub/Sub topic. Error handling for message publishing failures. Exam Question: “What is the primary responsibility of a publisher in a Pub/Sub system?” (Answer: To send messages to a topic).
        • Subscriber Responsibilities: Receiving and processing messages from a subscription. Acknowledging messages to prevent redelivery. Error handling for message processing failures. Exam Question: “What must a subscriber do after receiving a message to prevent it from being redelivered?” (Answer: Acknowledge the message).
        • Decoupling: Understand how Pub/Sub decouples publishers and subscribers. Exam Question: “What is the main benefit of using Pub/Sub to decouple applications?” (Answer: It allows publishers and subscribers to operate independently and scale separately).
    • Topics and Subscriptions:

      • Topics are named channels for messages. Subscriptions are named configurations that attach to a topic.
        • Topic Creation: Creating topics with appropriate settings (e.g., message retention duration). Exam Question: “How long are messages retained in a Pub/Sub topic by default?” (Answer: 7 days).
        • Subscription Types: Understanding different subscription types (push, pull).
        • Subscription Configuration: Configuring subscriptions with appropriate settings (e.g., acknowledgement deadline, message filtering).
        • Message Filtering: Using filters to receive only a subset of messages based on attributes. Exam Question: “How can a subscriber receive only messages with a specific attribute value?” (Answer: Configure a filter on the subscription).
    • Message Ordering:

      • Pub/Sub provides at-least-once delivery and best-effort ordering.
        • At-Least-Once Delivery: Understand that Pub/Sub guarantees that each message will be delivered at least once, but may be delivered more than once. Exam Question: “What is the delivery guarantee provided by Pub/Sub?” (Answer: At-least-once delivery).
        • Best-Effort Ordering: Understand that Pub/Sub attempts to deliver messages in the order they were published, but this is not guaranteed. Exam Question: “Does Pub/Sub guarantee strict message ordering?” (Answer: No, it provides best-effort ordering).
        • Ordering Keys: Understand how to use ordering keys to ensure that messages with the same key are delivered in order. Exam Question: “How can you ensure that messages with the same key are delivered in the order they were published?” (Answer: Use ordering keys).
    • Exactly-Once Delivery:

      • Achieving exactly-once delivery with Pub/Sub.
        • Idempotency: Understand the concept of idempotency and how to design subscribers to be idempotent. Exam Question: “What is idempotency and why is it important when processing messages from Pub/Sub?” (Answer: Idempotency means that processing the same message multiple times has the same effect as processing it once. This is important because Pub/Sub provides at-least-once delivery).
        • Deduplication: Using a mechanism to deduplicate messages at the subscriber.
    • Push and Pull Subscriptions:

      • Push subscriptions: Pub/Sub pushes messages to a subscriber endpoint. Pull subscriptions: Subscribers pull messages from Pub/Sub.
        • Push Subscription Configuration: Configuring a push subscription with the correct endpoint URL and authentication settings. Exam Question: “What type of authentication is typically required for a push subscription?” (Answer: The subscriber endpoint must authenticate with Pub/Sub).
        • Pull Subscription Configuration: Understanding how subscribers pull messages from a pull subscription.
        • Use Cases: Know when to use push subscriptions (e.g., when the subscriber is a web server) and when to use pull subscriptions (e.g., when the subscriber needs more control over message processing). Exam Question: “In what scenario is a pull subscription generally preferred over a push subscription?” (Answer: When the subscriber needs to control the rate at which it receives messages).
    • Dead Letter Queues:

      • Handling undeliverable messages.
        • Dead Letter Topic: Configuring a dead letter topic for a subscription. Exam Question: “How can you configure a subscription to send undeliverable messages to a separate topic?” (Answer: Configure a dead letter topic).
        • Reprocessing Messages: Understanding how to reprocess messages from a dead letter topic. Exam Question: “What is the purpose of a dead letter queue?” (Answer: To store messages that could not be delivered to the subscriber, allowing them to be investigated and potentially reprocessed).
    • Monitoring:

      • Using Cloud Monitoring to track Pub/Sub performance.
        • Key Metrics: Monitoring key metrics such as message publish rate, message delivery rate, and message acknowledgement latency. Exam Question: “Which Cloud Monitoring metric is most useful for tracking the rate at which messages are being published to a Pub/Sub topic?” (Answer: pubsub.googleapis.com/topic/send_message_operation_count).
        • Alerting: Setting up alerts based on these metrics to detect issues.
  • d. Cloud Composer:

    • Apache Airflow:

      • Understand the basics of Apache Airflow (DAGs, tasks, operators).
        • DAGs (Directed Acyclic Graphs): Understand how DAGs define workflows as a series of tasks. Exam Question: “What is a DAG in Apache Airflow?” (Answer: A Directed Acyclic Graph that represents a workflow). Know how to define dependencies between tasks.
        • Tasks: Understand that tasks are the basic units of work in a DAG. Exam Question: “What is a task in Apache Airflow?” (Answer: A single unit of work to be performed in a DAG).
        • Operators: Understand how operators define the type of work that a task performs. Exam Question: “What is the purpose of an operator in Apache Airflow?” (Answer: To define the type of work that a task performs). Be familiar with common operators (e.g., BigQueryOperator, DataflowOperator, BashOperator).
    • DAG Design:

      • Designing DAGs to represent complex workflows.
        • Task Dependencies: Defining task dependencies to control the order of execution. Exam Question: “How can you ensure that a task only runs after another task has completed successfully?” (Answer: Define a dependency between the two tasks).
        • Error Handling: Implementing error handling mechanisms in DAGs (e.g., retries, failure callbacks). Exam Question: “How can you configure a task to automatically retry if it fails?” (Answer: Set the retries parameter for the task).
        • Idempotency: Designing tasks to be idempotent.
    • Operators:

      • Using Airflow operators.
        • Common Operators: Be familiar with common operators such as BigQueryOperator, DataflowOperator, PubSubPublishOperator, BashOperator, PythonOperator. Exam Question: “Which operator is used to execute a SQL query in BigQuery from an Airflow DAG?” (Answer: BigQueryOperator).
        • Custom Operators: Understand how to create custom operators.
        • Operator Parameters: Understand the parameters that are available for each operator.
    • Variables and Connections:

      • Managing configuration and credentials.
        • Variables: Using Airflow variables to store configuration values. Exam Question: “How can you store a configuration value that can be accessed by multiple tasks in an Airflow DAG?” (Answer: Use an Airflow variable).
        • Connections: Using Airflow connections to store credentials for accessing external systems. Exam Question: “How can you securely store the credentials for accessing a BigQuery dataset from an Airflow DAG?” (Answer: Create an Airflow connection with the appropriate credentials).
    • Scheduling:

      • Scheduling DAGs to run automatically.
        • Cron Expressions: Using cron expressions to define the schedule for a DAG. Exam Question: “How can you schedule a DAG to run every day at midnight?” (Answer: Use the cron expression 0 0 * * *).
        • Timetables: Using timetables to define more complex schedules.
        • Catchup: Understanding the catchup parameter and its impact on DAG execution.
    • Monitoring:

      • Using the Airflow UI and Cloud Monitoring to track DAGs.
        • Airflow UI: Using the Airflow UI to monitor DAG runs, task states, and logs. Exam Question: “How can you view the logs for a specific task in an Airflow DAG?” (Answer: Use the Airflow UI to navigate to the task and view its logs).
        • Cloud Monitoring: Using Cloud Monitoring to track metrics such as DAG run duration and task success rate.
    • Environments:

      • Creating and managing Cloud Composer environments.
        • Environment Configuration: Configuring the environment with the appropriate settings (e.g., machine type, number of workers).
        • PyPI Packages: Installing custom PyPI packages in the environment. Exam Question: “How can you install a custom Python library in a Cloud Composer environment?” (Answer: Specify the library in the PyPI packages configuration).
        • Airflow Version: Selecting the appropriate Airflow version for the environment.
  • e. Cloud Functions:

    • Event Triggers:

      • Understand the different event triggers (e.g., Cloud Storage events, Pub/Sub messages, HTTP requests).
        • Cloud Storage Triggers: Triggering a Cloud Function when a file is uploaded to Cloud Storage. Exam Question: “How can you automatically trigger a function when a new image is uploaded to a Cloud Storage bucket?” (Answer: Use a Cloud Storage trigger). Know different event types (e.g., google.storage.object.finalize).
        • Pub/Sub Triggers: Triggering a Cloud Function when a message is published to a Pub/Sub topic. Exam Question: “How can you automatically process messages published to a Pub/Sub topic?” (Answer: Use a Pub/Sub trigger).
        • HTTP Triggers: Triggering a Cloud Function via an HTTP request. Exam Question: “How can you create a serverless API endpoint using Cloud Functions?” (Answer: Use an HTTP trigger).
        • Cloud Scheduler: Triggering a Cloud Function on a schedule.
        • Firebase Triggers: Triggering a Cloud Function based on Firebase events (e.g., user creation, database updates).
    • Languages:

      • Supported languages (Python, Node.js, Go, Java, .NET, Ruby, PHP).
        • Language Selection: Choosing the appropriate language based on the requirements of the function. Exam Question: “Your function requires access to a specific Python library. Which language should you use for your Cloud Function?” (Answer: Python).
        • Runtime Environment: Understanding the runtime environment for each language.
    • Scaling:

      • Cloud Functions automatically scale to handle incoming requests.
        • Automatic Scaling: Understand that Cloud Functions automatically scale based on the number of incoming requests. Exam Question: “How does Cloud Functions handle increasing traffic to an HTTP-triggered function?” (Answer: It automatically scales the number of function instances).
        • Concurrency: Understanding the concept of concurrency and how it affects scaling.
    • Execution Time Limits:

      • Be aware of the execution time limits.
        • Function Timeout: Understand that Cloud Functions have a maximum execution time. Exam Question: “What happens if a Cloud Function exceeds its maximum execution time?” (Answer: The function is terminated). Know the default and maximum timeout values.
        • Background Functions: Understanding how to use background functions for long-running tasks.
    • Cold Starts:

      • Understand the concept of cold starts.
        • Cold Start Latency: Understand that cold starts can introduce latency. Exam Question: “What is a cold start in Cloud Functions?” (Answer: The time it takes to initialize a new function instance when it is invoked for the first time or after a period of inactivity).
        • Minimizing Cold Starts: Techniques for minimizing cold starts (e.g., keeping functions warm, using languages with faster startup times).
  • f. IAM Roles:

    • Granting Cloud Functions access to other GCP services.

      • Service Account: Understand that Cloud Functions run under a service account. Exam Question: “Under what identity does a Cloud Function typically run?” (Answer: A service account).
      • IAM Permissions: Granting the service account the necessary IAM permissions to access other GCP services. Exam Question: “Your Cloud Function needs to write data to a BigQuery table. What IAM permission is required?” (Answer: roles/bigquery.dataEditor on the BigQuery dataset).
    • Use Cases:

      • Know appropriate use cases (e.g., image resizing, data validation, event-driven processing).
        • Image Resizing: Resizing images when they are uploaded to Cloud Storage.
        • Data Validation: Validating data when it is published to Pub/Sub.
        • Event-Driven Processing: Responding to events in real-time.
  • 5.3. Machine Learning

    • a. Vertex AI:

      • Model Training:

        • Understand different options for training models (e.g., using pre-built algorithms, custom training with TensorFlow or PyTorch).
          • Pre-built Algorithms: Understand the available pre-built algorithms in Vertex AI (e.g., tabular regression, tabular classification, image classification, object detection). Exam Question: “You need to train a model to predict customer churn based on tabular data. Which type of pre-built algorithm in Vertex AI is most suitable?” (Answer: Tabular classification). Know the input data requirements for each algorithm.
          • Custom Training: Using TensorFlow, PyTorch, or other frameworks to train models. Exam Question: “When is it necessary to use custom training instead of a pre-built algorithm in Vertex AI?” (Answer: When you need to use a specific model architecture or training procedure that is not supported by the pre-built algorithms). Understand how to package and submit custom training jobs to Vertex AI.
          • Managed Datasets: Understand how to create and manage datasets in Vertex AI for training.
          • Training Pipelines: Orchestrating multiple training steps using Vertex AI Pipelines.
          • Distributed Training: Leveraging distributed training to accelerate model training.
      • Hyperparameter Tuning:

        • Using Vertex AI’s hyperparameter tuning service.
          • Hyperparameters: Understand what hyperparameters are and how they affect model performance. Exam Question: “What are hyperparameters in machine learning?” (Answer: Parameters that control the training process of a model).
          • Search Algorithms: Understand the different search algorithms available in Vertex AI’s hyperparameter tuning service (e.g., grid search, random search, Bayesian optimization). Exam Question: “Which search algorithm is generally most effective for finding optimal hyperparameter values?” (Answer: Bayesian optimization).
          • Optimization Objective: Defining the objective metric to optimize (e.g., accuracy, precision, recall).
          • Trial Budget: Setting a budget for the hyperparameter tuning process.
      • Model Deployment:

        • Deploying models to Vertex AI’s prediction service.
          • Endpoint Creation: Creating an endpoint for serving predictions.
          • Model Deployment: Deploying a model to an endpoint. Exam Question: “What is an endpoint in Vertex AI’s prediction service?” (Answer: A serving environment where models are deployed to receive prediction requests).
          • Traffic Splitting: Splitting traffic between different model versions.
          • Online Prediction: Serving predictions in real-time.
          • Batch Prediction: Generating predictions in batch mode.
      • Model Monitoring:

        • Monitoring model performance and detecting drift.
          • Performance Metrics: Monitoring performance metrics such as accuracy, precision, recall, and AUC.
          • Data Drift: Detecting data drift, which occurs when the input data distribution changes over time.
          • Prediction Drift: Detecting prediction drift, which occurs when the model’s predictions become less accurate over time.
          • Alerting: Setting up alerts to notify you when model performance degrades or data drift is detected.
          • Explainable AI: Using Explainable AI to understand why a model is making certain predictions.
      • Feature Store:

        • Managing and serving features for ML models.
          • Feature Definition: Defining features and their data types.
          • Feature Storage: Storing features in a scalable and reliable feature store.
          • Feature Serving: Serving features to models for training and prediction. Exam Question: “What is the purpose of a feature store in Vertex AI?” (Answer: To provide a centralized repository for managing and serving features for ML models).
          • Online and Offline Serving: Serving features in both online (real-time) and offline (batch) modes.
      • AutoML:

        • Automatically training and deploying machine learning models.
          • Data Preparation: Preparing data for AutoML training.
          • Model Selection: AutoML automatically selects the best model architecture and hyperparameters for the given data.
          • Model Deployment: AutoML automatically deploys the trained model to Vertex AI’s prediction service.
          • Use Cases: Understand appropriate use cases for AutoML (e.g., when you need to train a model quickly and easily without extensive machine learning expertise). Exam Question: “When is AutoML a good choice for training a machine learning model?” (Answer: When you want to quickly train a model with minimal manual effort and machine learning expertise).
    • b. TensorFlow and PyTorch on GCP:

      • Framework fundamentals.
        • TensorFlow: Understand the basics of TensorFlow, including tensors, variables, layers, models, and training loops.
        • PyTorch: Understand the basics of PyTorch, including tensors, autograd, models, and training loops.
      • Training on Vertex AI.
        • Custom Training Jobs: Packaging and submitting TensorFlow and PyTorch training jobs to Vertex AI.
        • Distributed Training: Leveraging distributed training with TensorFlow and PyTorch on Vertex AI.
        • GPU and TPU Support: Using GPUs and TPUs to accelerate model training. Exam Question: “What is the primary benefit of using TPUs for training TensorFlow models on GCP?” (Answer: TPUs are designed specifically for machine learning workloads and can provide significant performance improvements over GPUs).
      • TPUs.
        • TPU Architecture: Understand the architecture of TPUs and how they differ from CPUs and GPUs.
        • TPU Pods: Leveraging TPU Pods for large-scale distributed training.
        • TPU Usage: How to configure TensorFlow and PyTorch to use TPUs.

5.4. Data Security & Governance

  • a. IAM (Identity and Access Management):

    • Roles:
      • Predefined roles and custom roles.
        • Predefined Roles: Understand common predefined roles (e.g., roles/viewer, roles/editor, roles/owner, roles/storage.objectViewer, roles/bigquery.dataViewer). Exam Question: “Which predefined role grants a user read-only access to all resources in a project?” (Answer: roles/viewer).
        • Custom Roles: Creating custom roles to grant specific permissions. Exam Question: “When is it necessary to create a custom role?” (Answer: When the predefined roles do not provide the required level of granularity or access control). Understand how to define permissions in a custom role.
    • Principals:
      • Users, service accounts, groups.
        • Users: Google accounts that represent individual users.
        • Service Accounts: Non-human accounts used by applications and services. Exam Question: “What type of principal should be used for a Cloud Function that needs to access a BigQuery dataset?” (Answer: A service account). Understand how to create and manage service accounts.
        • Groups: Collections of users and/or service accounts.
    • Resource Hierarchy:
      • Organization, folder, project.
        • IAM Policy Inheritance: Understand how IAM policies are inherited through the resource hierarchy. Exam Question: “If an IAM policy is set at the organization level, will it apply to all projects within that organization?” (Answer: Yes, unless overridden at a lower level in the hierarchy).
        • Policy Overriding: Understand how policies can be overridden at lower levels in the hierarchy.
    • Service Accounts:
      • Best practices for using service accounts.
        • Least Privilege: Granting service accounts only the necessary permissions.
        • Key Management: Managing service account keys securely. Exam Question: “What is the recommended way to manage service account keys?” (Answer: Use the IAM service account key management features to rotate and disable keys).
        • Auditing: Auditing service account usage.
    • Least Privilege:
      • Applying the principle of least privilege.
        • Granting Only Necessary Permissions: Granting users and service accounts only the permissions they need to perform their tasks.
        • Avoiding Overly Broad Roles: Avoiding the use of overly broad roles such as roles/owner.
  • b. Data Loss Prevention (DLP):

    • InfoTypes:
      • Different InfoTypes that DLP can detect (e.g., credit card numbers, social security numbers).
        • Predefined InfoTypes: Understand common predefined InfoTypes such as CREDIT_CARD_NUMBER, US_SOCIAL_SECURITY_NUMBER, EMAIL_ADDRESS.
        • Custom InfoTypes: Creating custom InfoTypes to detect specific types of sensitive data. Exam Question: “You need to detect a specific type of internal employee ID that is not covered by the predefined InfoTypes. How can you achieve this?” (Answer: Create a custom InfoType).
    • Inspection Templates:
      • Creating inspection templates.
        • Defining Inspection Configuration: Defining the InfoTypes to detect, the data transformations to apply, and the actions to take. Exam Question: “What is the purpose of an inspection template in DLP?” (Answer: To define a reusable configuration for inspecting data for sensitive information).
        • Reusing Inspection Configurations: Reusing inspection configurations across multiple jobs.
    • Actions:
      • Different actions that DLP can take (e.g., redaction, masking, tokenization).
        • Redaction: Removing sensitive data from the output.
        • Masking: Replacing sensitive data with a mask character.
        • Tokenization: Replacing sensitive data with a surrogate value (token). Exam Question: “Which DLP action is most suitable for protecting sensitive data while still allowing it to be used for analysis?” (Answer: Tokenization).
        • De-identification: Transforming data to remove identifying information.
    • Integration:
      • Integrating with other GCP services (e.g., Cloud Storage, BigQuery).
        • Scanning Cloud Storage: Scanning Cloud Storage buckets for sensitive data. Exam Question: “How can you use DLP to scan a Cloud Storage bucket for credit card numbers?” (Answer: Create a DLP job that targets the Cloud Storage bucket and specifies the CREDIT_CARD_NUMBER InfoType).
        • Scanning BigQuery: Scanning BigQuery tables for sensitive data.
        • Real-time and Batch Processing: Using DLP for both real-time and batch processing of data.
  • c. Cloud KMS (Key Management Service):

    • Key Rings and Keys:
      • Key Rings and Keys
        • Key Rings: Understand that key rings are logical groupings of keys.
        • Keys: Understand that keys are used for encryption and decryption. Different key types (Symmetric, Asymmetric).
    • Key Rotation:
      • Rotating encryption keys.
        • Automatic Key Rotation: Configuring automatic key rotation. Exam Question: “What is the best practice for managing encryption keys in Cloud KMS?” (Answer: Enable automatic key rotation).
        • Manual Key Rotation: Manually rotating keys.
    • Encryption and Decryption:
      • Using KMS to encrypt and decrypt data.
        • Using the KMS API: Using the KMS API to encrypt and decrypt data.
        • Envelope Encryption: Understanding envelope encryption.
    • IAM Roles:
      • IAM roles required to manage and use encryption keys.
        • roles/cloudkms.cryptoKeyEncrypterDecrypter: Role for encrypting and decrypting data with a key.
        • roles/cloudkms.cryptoKeyAdmin: Role for managing keys and key rings.
    • Customer-Managed Encryption Keys (CMEK):
      • Using CMEK.
        • Controlling Encryption Keys: Using CMEK to control the encryption keys used to protect your data. Exam Question: “What is the main benefit of using Customer-Managed Encryption Keys (CMEK)?” (Answer: It gives you control over the encryption keys used to protect your data).
        • Compliance: Meeting compliance requirements.

5.5. Monitoring & Logging

  • a. Cloud Monitoring:

    • Metrics and Logs
      • Metrics: Numerical data that describes the performance and health of your systems. Exam Question: “What are metrics used for in Cloud Monitoring?” (Answer: To track the performance and health of your systems).
      • Logs: Textual data that provides information about events that have occurred in your systems. Exam Question: “What are logs used for in Cloud Logging?” (Answer: To provide information about events that have occurred in your systems).
    • Alerting
      • Creating Alerts: Creating alerts to notify you when metrics exceed certain thresholds. Exam Question: “How can you be notified when CPU utilization on a Compute Engine instance exceeds 80%?” (Answer: Create an alert in Cloud Monitoring).
      • Alert Channels: Configuring alert channels to receive notifications (e.g., email, SMS, PagerDuty).
    • Dashboards
      • Creating Dashboards: Creating dashboards to visualize metrics and logs. Exam Question: “How can you visualize the CPU utilization of all Compute Engine instances in a project?” (Answer: Create a dashboard in Cloud Monitoring).
      • Custom Dashboards: Creating custom dashboards with specific metrics and visualizations.
    • Log-based Metrics
      • Creating Metrics from Logs: Creating metrics based on log data. Exam Question: “How can you create a metric to track the number of errors in your application logs?” (Answer: Create a log-based metric in Cloud Logging).
  • b. Cloud Logging:

    • Metrics and Logs
      • Structured Logging: Understand the benefits of structured logging (e.g., JSON format).
      • Log Fields: Understanding the different fields in a log entry (e.g., timestamp, severity, resource).
    • Alerting
      • Creating Alerts: Creating alerts based on log data.
      • Log Filters: Using log filters to define the criteria for triggering alerts.
    • Dashboards
      • Creating Dashboards: Creating dashboards to visualize log data.
      • Log Explorer: Using the Log Explorer to search and analyze logs.
    • Sinks
      • Routing logs to different destinations (e.g., Cloud Storage, BigQuery, Pub/Sub).
        • Cloud Storage: Exporting logs to Cloud Storage for long-term storage. Exam Question: “How can you archive your application logs for compliance purposes?” (Answer: Export the logs to Cloud Storage using a sink).
        • BigQuery: Exporting logs to BigQuery for analysis. Exam Question: “How can you analyze your application logs using SQL?” (Answer: Export the logs to BigQuery using a sink).
        • Pub/Sub: Exporting logs to Pub/Sub for real-time processing.
        • Log Router Filters: Using log router filters to route specific logs to different destinations.
    • Filtering
      • Using filters to find specific log entries.
        • Basic Filters: Using basic filters to search for log entries based on keywords.
        • Advanced Filters: Using advanced filters to search for log entries based on complex criteria.
    • Log-based Metrics
      • Creating Metrics from Logs: Creating metrics based on log data.

6. Summary

My preparation involved structured learning through Google Cloud Skills Boost, deep dive with labs and extensive practice exams. Understanding data storage, processing, security, architecture and use cases is critical. If you plan to take the PDE exam, ensure hands-on experience with BigQuery, Dataflow, and Dataproc, and be ready to evaluate real-world scenarios involving data engineering.

7. Resources

Good luck with your PDE journey!

comments powered by Disqus
Built with Hugo
Theme Stack designed by Jimmy