CertSafari

    Free Google Professional Data Engineer Sample Questions

    35 free sample questions from our bank of 360+, covering every exam domain, with answers and detailed explanations. Updated August 2026.

    Domain 1: Designing data processing systems

    Subdomain 1.2: Designing for reliability and fidelity

    1.A retail company uses Cloud Bigtable to store user profile data. The application experiences high throughput reads and writes. You need to ensure row-level atomicity for updates that modify multiple columns within a single row. The updates must succeed or fail as a unit. Which approach should you take?

    1. A.Perform read-modify-write operations on the client side using the Bigtable client library.
    2. B.Use Bigtable Mutations to group the modifications into a single row mutation request.
    3. C.Enable multi-row transactions in the Bigtable instance configuration.
    4. D.Use Cloud Functions to orchestrate the updates to ensure they happen sequentially.
    Show answer & explanation

    Correct answer: BUse Bigtable Mutations to group the modifications into a single row mutation request.

    • A. Performing read-modify-write operations on the client side (a manual read followed by a write) introduces race conditions and is not atomic. While Bigtable offers a specific ReadModifyWriteRow API for atomic appends and increments, standard multi-column updates should be bundled in a single mutation request to guarantee atomicity without network-trip overhead or consistency risks.
    • B. Cloud Bigtable guarantees that all modifications within a single 'MutateRow' request (which can contain multiple column updates, deletions, or 'SetCell' operations) are applied atomically. This ensures that the update for the single row either succeeds completely or fails completely, meeting the requirement for row-level atomicity.
    • C. Cloud Bigtable does not support multi-row transactions, and there is no configuration setting to enable them. Atomicity in Bigtable is strictly scoped to the single row level.
    • D. Orchestrating updates sequentially using Cloud Functions does not provide atomicity. If a failure occurs midway through the sequence, the data remains in an inconsistent, partially updated state. True atomicity is handled at the storage layer via single-row mutations.

    Subdomain 1.4: Designing data migrations

    2.Your company uses Google Ads for marketing and wants to analyze ad performance data combined with CRM data in BigQuery. The marketing team wants the data to be refreshed daily without writing custom code or managing API keys manually. Which solution is the most cost-effective and requires the least engineering effort?

    1. A.Develop a Cloud Function to query the Google Ads API and insert data into BigQuery.
    2. B.Use BigQuery Data Transfer Service for Google Ads.
    3. C.Export Google Ads data to CSV, store in Drive, and create a federated table in BigQuery.
    4. D.Use a Dataflow template to pull data from Google Ads.
    Show answer & explanation

    Correct answer: BUse BigQuery Data Transfer Service for Google Ads.

    • A. Developing a Cloud Function requires writing and maintaining custom code, handling OAuth/API keys, retries, and setting up a scheduling mechanism like Cloud Scheduler. This significantly increases engineering effort and operational overhead compared to a managed service.
    • B. BigQuery Data Transfer Service (DTS) provides a native, fully managed connector for Google Ads. It automates data ingestion with built-in authentication, scheduling, and incremental loads, requiring zero custom code or manual API key management. This is the most cost-effective and lowest-effort solution for this requirement.
    • C. Exporting Google Ads data to CSV and using a Google Drive-backed federated table involves manual steps or additional custom automation. Federated queries have performance limitations and quota restrictions, and this method does not provide a reliable, automated daily refresh without significant extra effort.
    • D. Using a Dataflow template is a more complex and heavyweight approach compared to BigQuery DTS. It requires managing job executions, handling credentials, and potentially customizing templates, which leads to higher engineering effort and operational costs for a standard data migration task.

    Subdomain 1.4: Designing data migrations

    3.You are migrating an Oracle database to Cloud SQL for PostgreSQL. The schema conversion has been handled by a third-party tool. You need to migrate the data with minimal downtime. You decide to use Datastream. Which two steps are required to configure Datastream for this scenario?(Select 2)

    1. A.Configure the Oracle source to use LogMiner or XStream to capture changes.
    2. B.Install the Cloud SQL Proxy on the Oracle server.
    3. C.Configure a Reverse SSH Tunnel in Datastream.
    4. D.Create a connection profile for the Oracle source and the Cloud Storage destination.
    5. E.Create a connection profile for the Oracle source and the Cloud SQL for PostgreSQL destination.
    Show answer & explanation

    Correct answers: A, DConfigure the Oracle source to use LogMiner or XStream to capture changes.; Create a connection profile for the Oracle source and the Cloud Storage destination.

    • A. Correct. To perform Change Data Capture (CDC) from an Oracle database, Datastream requires either Oracle LogMiner or XStream to be configured on the source database to allow the service to read the redo logs.
    • B. Incorrect. The Cloud SQL Proxy is used to provide secure access to Cloud SQL instances for client applications, but it is not a requirement or a step for configuring Datastream.
    • C. Incorrect. While a Reverse SSH Tunnel is one of the connectivity options for Datastream to reach a source database, it is not a mandatory requirement for all configurations (other methods include VPC peering or IP allowlisting).
    • D. Correct. Datastream does not support Cloud SQL as a direct destination. The standard migration path for Oracle to Cloud SQL via Datastream requires streaming the changes into a Cloud Storage bucket (the destination profile) before they are applied to Cloud SQL using a tool like Dataflow.
    • E. Incorrect. Datastream natively supports Cloud Storage, BigQuery, Spanner, and AlloyDB as destinations. It does not have a direct destination connection profile for Cloud SQL for PostgreSQL.

    Subdomain 1.3: Designing for flexibility and portability

    4.You are designing a staging area for a data warehouse. External vendors upload CSV files daily. The schema of these files changes frequently (columns added/removed). You need a pipeline that is resilient to schema drift and allows you to analyze the raw data immediately in BigQuery before transforming it. What is the most flexible approach?

    1. A.Define a strict schema in BigQuery and reject any CSV files that do not match.
    2. B.Load the CSVs into BigQuery as a single column of type STRING and parse it with SQL.
    3. C.Load the CSVs into BigQuery using the 'schema_update_options=ALLOW_FIELD_ADDITION' flag.
    4. D.Convert CSVs to Avro in Cloud Functions before loading to BigQuery.
    Show answer & explanation

    Correct answer: BLoad the CSVs into BigQuery as a single column of type STRING and parse it with SQL.

    • A. Defining a strict schema causes frequent pipeline failures and requires manual intervention whenever vendors change columns. This approach is the opposite of resilient and prevents the immediate analysis of raw data because non-conforming files are blocked entirely.
    • B. This is a common 'landing table' pattern. Loading CSVs as a single STRING column preserves the raw row content regardless of additions, removals, or reordering of columns. It allows for immediate ingestion and querying using BigQuery's SQL functions (like SPLIT, REGEXP_EXTRACT, or JSON functions if the string is structured) to parse the data dynamically, providing maximum flexibility for schema drift.
    • C. The 'ALLOW_FIELD_ADDITION' flag only permits adding new columns at the end of the schema. It does not robustly handle column removals, reordering, or data type changes. Because CSV loading in BigQuery is often position-dependent, this flag is insufficient for handling frequent and unpredictable schema drift.
    • D. Converting CSVs to Avro adds operational complexity and an extra processing step via Cloud Functions. While Avro supports schema evolution, the conversion logic itself would likely break or require updates whenever the source CSV schema changes. This hinders the goal of immediate analysis compared to direct loading.

    Subdomain 1.3: Designing for flexibility and portability

    5.A global gaming company generates massive amounts of telemetry data. They need to store this data in a database that offers global consistency and horizontal scalability. They also require the database to support standard SQL to minimize the learning curve for their analysts and ensure some level of query logic portability. Which Google Cloud service fits best?

    1. A.Cloud Bigtable
    2. B.Cloud Spanner
    3. C.Cloud SQL
    4. D.Firestore
    Show answer & explanation

    Correct answer: BCloud Spanner

    • A. Cloud Bigtable is a high-performance NoSQL wide-column store designed for high-throughput, low-latency workloads. However, it does not support standard SQL and only offers single-row consistency rather than the global transactional consistency required for this use case.
    • B. Cloud Spanner is a globally distributed, horizontally scalable relational database that provides strong external consistency. It supports a standard SQL dialect, making it the only service that meets the combined requirements of massive scale, global consistency, and query logic portability for analysts.
    • C. Cloud SQL is a managed relational database service (MySQL, PostgreSQL, SQL Server) that supports standard SQL. While familiar to analysts, it is primarily designed for vertical scaling and lacks the built-in global horizontal write scalability and global transactional consistency of Cloud Spanner.
    • D. Firestore is a NoSQL document database optimized for mobile and web development. It does not support standard SQL and its query model is distinct from relational databases, which would fail to meet the requirement for query logic portability for SQL-based analysts.

    Subdomain 1.1: Designing for security and compliance

    6.Your organization has a strict data sovereignty requirement. All data stored in Google Cloud must physically reside within the 'europe-west3' (Frankfurt) region. You want to enforce this constraint at the organization level to prevent any project admin from accidentally creating resources in other regions. Which two actions should you take?(Select 2)

    1. A.Configure the 'Resource Location Restriction' (gcp.resourceLocations) organization policy constraint.
    2. B.Set the policy value to 'allow' only 'in:europe-west3'.
    3. C.Configure the 'Domain Restricted Sharing' organization policy.
    4. D.Remove the 'Owner' role from all users and assign only 'Editor' roles.
    5. E.Set the policy value to 'deny' only 'in:us-central1'.
    Show answer & explanation

    Correct answers: A, BConfigure the 'Resource Location Restriction' (gcp.resourceLocations) organization policy constraint.; Set the policy value to 'allow' only 'in:europe-west3'.

    • A. The 'Resource Location Restriction' (constraints/gcp.resourceLocations) organization policy constraint is the standard Google Cloud mechanism for enforcing geographic compliance. Applying it at the organization level ensures the constraint is inherited by all projects, effectively preventing any resource creation outside of the specified locations.
    • B. To meet strict sovereignty requirements for a specific region, you must use an 'allow' list approach. Setting the policy value to 'allow' for 'in:europe-west3' ensures that only resources within the Frankfurt region can be provisioned, while implicitly denying all other regions globally.
    • C. The 'Domain Restricted Sharing' organization policy is used to limit resource sharing to specific Cloud Identity or Google Workspace domains. It does not control the physical location of resources or data residency.
    • D. IAM roles like 'Owner' or 'Editor' define what actions a user can perform, but they do not define where those actions can take place. Changing these roles does not enforce geographic restrictions.
    • E. Using a 'deny' list for a specific region like 'us-central1' only blocks that single region. Project admins would still be able to create resources in any other available region (e.g., asia-east1, us-east4), which violates the requirement to restrict data solely to europe-west3.

    Subdomain 1.1: Designing for security and compliance

    7.You are setting up a new BigQuery dataset that will contain sensitive data. You need to ensure that all data written to this dataset is encrypted using a key managed by your security team (CMEK). The key is hosted in Cloud KMS. Which three steps are required to configure this?(Select 3)

    1. A.Create a KeyRing and a CryptoKey in Cloud KMS in the same location as the BigQuery dataset.
    2. B.Grant the 'BigQuery Service Agent' the 'Cloud KMS CryptoKey Encrypter/Decrypter' role on the CryptoKey.
    3. C.Configure the default encryption key for the BigQuery dataset to use the Cloud KMS key resource ID.
    4. D.Grant the 'Storage Admin' role to the BigQuery Service Agent.
    5. E.Download the KMS key and upload it to BigQuery settings.
    6. F.Grant the 'Owner' role to the BigQuery Service Agent on the project.
    Show answer & explanation

    Correct answers: A, B, CCreate a KeyRing and a CryptoKey in Cloud KMS in the same location as the BigQuery dataset.; Grant the 'BigQuery Service Agent' the 'Cloud KMS CryptoKey Encrypter/Decrypter' role on the CryptoKey.; Configure the default encryption key for the BigQuery dataset to use the Cloud KMS key resource ID.

    • A. Correct. BigQuery requires that the Cloud KMS key be located in the same region or multi-region as the dataset to ensure low latency and comply with data residency requirements.
    • B. Correct. The BigQuery Service Agent (a Google-managed service account specific to your project) must have the 'Cloud KMS CryptoKey Encrypter/Decrypter' role to programmatically use the key for encrypting and decrypting the data stored in BigQuery.
    • C. Correct. By setting the default encryption key at the dataset level, you ensure that all new tables created within that dataset are automatically encrypted using the specified CMEK.
    • D. Incorrect. The Storage Admin role relates to Cloud Storage (GCS) permissions and is not required for configuring Cloud KMS encryption within BigQuery.
    • E. Incorrect. Cloud KMS is a hosted service where the private key material never leaves the provider's infrastructure. You cannot download the key; instead, you reference it via its resource ID.
    • F. Incorrect. Granting the 'Owner' role violates the principle of least privilege. The BigQuery Service Agent only needs specific permissions on the CryptoKey itself, not project-wide ownership.

    Domain 2: Ingesting and processing the data

    Subdomain 2.3: Deploying and operationalizing the pipelines

    8.You have a requirement to run a lightweight data processing task that invokes a Cloud Function and then updates a Firestore document. This process occurs sporadically (a few times a day). You need to minimize operational overhead and costs. You want to avoid paying for idle compute resources. Which orchestration service should you choose?

    1. A.Cloud Composer
    2. B.Cloud Workflows
    3. C.Dataflow
    4. D.Dataproc
    Show answer & explanation

    Correct answer: BCloud Workflows

    • A. Cloud Composer is a managed Apache Airflow service suitable for complex workflows and long-running DAGs. However, it requires a persistent environment (GKE cluster and SQL database), which results in significant idle costs. For a sporadic task running only a few times a day, the operational overhead and cost would be disproportionately high.
    • B. Cloud Workflows is a serverless, pay-per-use orchestration service designed for lightweight tasks and API-based integrations. It has no idle compute costs and scales to zero when not in use, making it the most cost-effective and low-overhead solution for sporadic tasks that chain Cloud Functions and Firestore updates.
    • C. Dataflow is a fully managed service for unified stream and batch data processing using Apache Beam. It involves provisioning VM workers, which is overkill for a simple orchestration task involving a single function and a document update. It would result in higher latency and unnecessary infrastructure costs.
    • D. Dataproc is a managed service for running Spark and Hadoop clusters. It is intended for large-scale big data processing. Even with ephemeral clusters, the time and cost associated with provisioning nodes for a lightweight, sporadic task are much higher than serverless alternatives.

    Subdomain 2.3: Deploying and operationalizing the pipelines

    9.You are designing the testing strategy for your Dataflow pipelines within a CI/CD workflow. You want to ensure logic correctness before deploying to production. Which two actions should you include in your build pipeline?(Select 2)

    1. A.Run unit tests on the pipeline code using the DirectRunner.
    2. B.Run integration tests using the DataflowRunner with a sampling of data.
    3. C.Run the pipeline in streaming mode on the production dataset.
    4. D.Deploy the pipeline to production and monitor Cloud Monitoring for errors.
    5. E.Use Cloud Profiler to analyze the local execution.
    Show answer & explanation

    Correct answers: A, BRun unit tests on the pipeline code using the DirectRunner.; Run integration tests using the DataflowRunner with a sampling of data.

    • A. Correct. Running unit tests with the DirectRunner is a standard practice for local verification. It allows for fast, lightweight testing of individual PTransforms and business logic without provisioning cloud resources, making it ideal for CI builds to catch regressions early.
    • B. Correct. Integration testing using the DataflowRunner ensures the pipeline operates correctly within the managed cloud environment. Using a sampling of data and a non-production environment allows you to validate service interactions and runner-specific behavior while keeping costs and execution time low.
    • C. Incorrect. Running a build-stage test against a production dataset is unsafe and violates isolation principles. It can lead to data corruption, excessive costs, and slow CI/CD feedback loops.
    • D. Incorrect. Monitoring production after deployment is an operational practice, not a build-time testing strategy. Logic correctness should be verified in a staging or test environment before code is promoted to production.
    • E. Incorrect. Cloud Profiler is designed to analyze performance bottlenecks (such as CPU or memory usage) in running applications. It is not used to validate the functional or logical correctness of the pipeline's data processing.

    Subdomain 2.2: Building the pipelines

    10.You are designing a data pipeline to process financial transactions. The requirements are strict: you must ensure exactly-once processing to prevent double counting of money. The source is a Pub/Sub topic, and the sink is BigQuery. Which combination of configuration and services satisfies this requirement?

    1. A.Use a Python script on Compute Engine to pull from Pub/Sub and insert into BigQuery.
    2. B.Use Cloud Dataflow with the streaming engine. Rely on Dataflow's built-in exactly-once semantics when consuming from Pub/Sub and writing to BigQuery.
    3. C.Use Cloud Dataproc with Spark Streaming. Enable checkpointing to Cloud Storage.
    4. D.Use Cloud Functions triggered by Pub/Sub to write to BigQuery.
    Show answer & explanation

    Correct answer: BUse Cloud Dataflow with the streaming engine. Rely on Dataflow's built-in exactly-once semantics when consuming from Pub/Sub and writing to BigQuery.

    • A. Incorrect. A custom Python script on Compute Engine does not inherently provide exactly-once guarantees. Both Pub/Sub (at-least-once delivery) and BigQuery streaming inserts do not automatically coordinate to ensure exactly-once processing. Implementing custom deduplication and transactional logic is complex, error-prone, and not recommended for strict financial requirements.
    • B. Correct. Cloud Dataflow, especially with the Streaming Engine, provides built-in exactly-once processing semantics. When using the standard Pub/Sub source and BigQuery sink connectors, Dataflow manages message deduplication, checkpointing, and state, ensuring that each transaction is processed exactly once even in the event of retries or failures.
    • C. Incorrect. While Cloud Dataproc with Spark Streaming and checkpointing can provide strong processing guarantees, it does not provide the same managed, turnkey exactly-once semantics for the Pub/Sub to BigQuery path as Dataflow. Achieving end-to-end exactly-once with Spark and BigQuery often requires additional manual deduplication logic.
    • D. Incorrect. Cloud Functions triggered by Pub/Sub have at-least-once delivery semantics. If a function is retried due to a timeout or failure, it can result in duplicate writes to BigQuery. Cloud Functions lack the built-in state management and global deduplication infrastructure needed for exactly-once processing.

    Subdomain 2.2: Building the pipelines

    11.You have a requirement to process a sequence of game events. The events for a specific `Match_ID` must be processed strictly in the order they were generated. You are using Pub/Sub and Dataflow. How should you configure the ingestion?

    1. A.Use a standard Pub/Sub topic and sort the data in Dataflow using a timestamp.
    2. B.Use Pub/Sub with ordering keys enabled. Publish messages with Match_ID as the ordering key. In Dataflow, simply read from the subscription.
    3. C.Use Pub/Sub Lite as it guarantees global ordering.
    4. D.Use a single-threaded Python script to ensure order.
    Show answer & explanation

    Correct answer: BUse Pub/Sub with ordering keys enabled. Publish messages with Match_ID as the ordering key. In Dataflow, simply read from the subscription.

    • A. Standard Pub/Sub topics do not guarantee message delivery order. Attempting to sort by timestamp in Dataflow cannot guarantee original generation order because of network delays, clock skew, and late-arriving messages. Additionally, sorting requires buffering or watermark delays, which increases latency and complicates the pipeline.
    • B. Pub/Sub ordering keys, when enabled on a topic, ensure that messages with the same ordering key are delivered to subscribers in the order they were published. By using Match_ID as the ordering key, you guarantee that events for a specific match are processed in sequence. Dataflow's PubSubIO respects these ordering keys, allowing for scalable, parallel processing across different keys while maintaining strict order for each individual key.
    • C. Pub/Sub Lite guarantees ordering within a single partition, but it does not provide the same managed per-key ordering functionality as standard Pub/Sub. Using Lite would require you to manually manage the mapping of Match_IDs to partitions to ensure related events stay together, making it more complex and less robust than the standard ordering key feature.
    • D. A single-threaded script is not a scalable or fault-tolerant solution for high-throughput game events. It fails to utilize the distributed processing capabilities of Dataflow and creates a performance bottleneck and a single point of failure in the architecture.

    Subdomain 2.1: Planning the data pipelines

    12.You are designing a pipeline to move data from an on-premises Hadoop cluster to Google Cloud. The data is currently stored in HDFS. You have a 10 Gbps Dedicated Interconnect. You want to move 500 TB of data to Google Cloud Storage as quickly as possible. Which approach should you take?

    1. A.Use gsutil cp running on a single edge node.
    2. B.Use the Storage Transfer Service for on-premises data by installing the transfer agent on multiple nodes in your Hadoop cluster.
    3. C.Write a custom Python script using the GCS client library and run it on Cloud Functions.
    4. D.Use distcp (distributed copy) from the Hadoop cluster to the GCS bucket.
    Show answer & explanation

    Correct answer: DUse distcp (distributed copy) from the Hadoop cluster to the GCS bucket.

    • A. Incorrect. Running gsutil cp on a single edge node creates a significant bottleneck. It is limited by the single node's CPU, disk I/O, and network stack, failing to leverage the distributed nature of the Hadoop cluster or the full 10 Gbps bandwidth of the Dedicated Interconnect.
    • B. Incorrect. The Storage Transfer Service for on-premises data is designed for POSIX-compliant filesystems and NFS. Since HDFS is not a POSIX filesystem, using STS would typically require mounting HDFS via an NFS gateway or staging data to local disks first, which adds significant overhead and complexity compared to native Hadoop tools.
    • C. Incorrect. Cloud Functions is a serverless environment with strict execution time limits (max 9 minutes), memory constraints, and concurrency limits. It is entirely unsuitable for a bulk migration of 500 TB of data, which would require massive parallelization and long-running processes.
    • D. Correct. DistCp (distributed copy) is the standard Hadoop utility for large-scale data inter-cluster and intra-cluster copying. When used with the Google Cloud Storage connector, it leverages the MapReduce engine of the Hadoop cluster to parallelize the transfer across all nodes. This approach maximizes the utilization of the 10 Gbps Dedicated Interconnect and is the recommended practice for HDFS-to-GCS migrations.

    Subdomain 2.1: Planning the data pipelines

    13.You are designing an architecture to ingest data from an external partner via SFTP. The partner uploads CSV files daily. You need to process these files and load them into BigQuery. The solution should be serverless and event-driven. Which combination of services should you use?(Select 2)

    1. A.Run an FTP server on a Compute Engine instance.
    2. B.Use Cloud Composer to poll the SFTP server.
    3. C.Provide the partner with a Google Cloud Storage Transfer Service SFTP endpoint (or trigger a Transfer job).
    4. D.Configure a Pub/Sub notification on the GCS bucket to trigger a Cloud Function or Dataflow job upon file finalization.
    5. E.Use Dataproc to watch the bucket.
    Show answer & explanation

    Correct answers: C, DProvide the partner with a Google Cloud Storage Transfer Service SFTP endpoint (or trigger a Transfer job).; Configure a Pub/Sub notification on the GCS bucket to trigger a Cloud Function or Dataflow job upon file finalization.

    • A. Incorrect. Running an FTP server on a Compute Engine instance requires managing virtual machines and OS-level services, which is Infrastructure-as-a-Service (IaaS) rather than serverless. It increases operational overhead and lacks native event-driven integration into the Google Cloud ecosystem.
    • B. Incorrect. Cloud Composer is a managed Apache Airflow service. While it can orchestrate workflows, it relies on polling mechanisms to check for new data, which is not truly event-driven. Additionally, it involves more operational overhead and cost than a simple event-driven function for daily ingest tasks.
    • C. Correct. Storage Transfer Service (STS) is a fully managed, serverless service that can be used to transfer data from external SFTP sources into Cloud Storage. Using STS automates the ingestion process and eliminates the need to manage custom transfer scripts or infrastructure.
    • D. Correct. Configuring Pub/Sub notifications (Object Change Notifications or GCS Pub/Sub notifications) for object finalization events is the standard event-driven pattern in Google Cloud. This can trigger Cloud Functions or Dataflow to process the CSV and load it into BigQuery immediately after the file arrives in the bucket.
    • E. Incorrect. Dataproc is a managed Spark and Hadoop service that typically involves cluster management. It is not designed to 'watch' a bucket in an event-driven, serverless manner for file ingestion, making it inefficient for this specific use case compared to Cloud Functions or Dataflow.

    Domain 3: Storing the data

    Subdomain 3.3: Using a data lake

    14.You are building a data lake where costs are a primary concern. You have data that is accessed unpredictably. Some objects are accessed daily for a month, then untouched for a year, then accessed again. Other objects are rarely accessed. You do not want to incur retrieval fees or manage complex lifecycle rules based on age alone. Which storage class is most appropriate?

    1. A.Standard
    2. B.Nearline
    3. C.Autoclass
    4. D.Archive
    Show answer & explanation

    Correct answer: CAutoclass

    • A. Standard storage is optimized for frequent access and has no retrieval fees. However, because it has the highest storage cost, it is not cost-effective for data that remains untouched for a year. While it avoids retrieval fees, it fails the cost-optimization requirement for cold data.
    • B. Nearline storage is intended for data accessed less than once a month. It has lower storage costs than Standard but incurs retrieval fees and has a 30-day minimum storage duration, which violates the requirement to avoid retrieval fees.
    • C. Autoclass is the correct choice because it is specifically designed for unpredictable access patterns. It automatically moves objects to colder storage classes (Nearline, Coldline, Archive) as they age without access, and moves them back to Standard storage immediately upon access. Crucially, Autoclass eliminates retrieval fees and transition fees, and does not charge for minimum storage durations, making it the most cost-effective and management-free option for this scenario.
    • D. Archive storage offers the lowest storage price but the highest retrieval fees and a 365-day minimum storage duration. It is meant for long-term backup and disaster recovery where data is rarely accessed, and would be very expensive when the data is eventually retrieved.

    Subdomain 3.3: Using a data lake

    15.You are setting up a Data Mesh architecture using Dataplex. You have defined a 'Sales Domain' Lake. You need to map data located in a GCS bucket and a BigQuery dataset to this lake. These assets are in different Google Cloud projects. What construct should you use to logically group these disparate physical resources into the Dataplex Lake?

    1. A.VPC Service Controls
    2. B.Dataplex Zones
    3. C.Data Catalog Tags
    4. D.Asset Inventory
    Show answer & explanation

    Correct answer: BDataplex Zones

    • A. Incorrect. VPC Service Controls are used to create security perimeters and manage network-level access to Google Cloud resources. They do not serve as a mechanism for logical data organization or grouping physical storage assets within a Dataplex Lake.
    • B. Correct. Dataplex uses a hierarchy of Lake > Zone > Asset. Dataplex Zones (such as Raw or Curated) are the logical subdivisions within a Lake used to organize and group assets. You can register physical resources like GCS buckets and BigQuery datasets as 'Assets' within these zones, even if they reside in different projects, enabling the 'Sales Domain' to manage them centrally.
    • C. Incorrect. Data Catalog tags are used for metadata management, classification, and discovery. While they provide context for your data, they are not the structural construct used to register or logically group physical storage resources into the Dataplex architecture.
    • D. Incorrect. Cloud Asset Inventory is a global Google Cloud service used to track and monitor resources across your organization. While Dataplex uses the term 'Asset' to represent the physical resources it manages, 'Asset Inventory' is not the grouping construct; 'Zones' are the designated grouping mechanism within Dataplex.

    Subdomain 3.1: Selecting storage systems

    16.You are migrating a legacy PostgreSQL database to Google Cloud. The database supports an e-commerce application. The application requires full compatibility with PostgreSQL 14. Additionally, the marketing team needs to run complex analytical queries on the live data throughout the day without impacting the performance of transactional queries (OLTP). You want to avoid setting up a separate ETL pipeline for a data warehouse at this stage. Which managed service is most appropriate?

    1. A.Cloud SQL for PostgreSQL using a High Availability configuration.
    2. B.Cloud Spanner with the PostgreSQL interface.
    3. C.AlloyDB for PostgreSQL, utilizing the columnar engine for analytical queries.
    4. D.BigQuery with a federated query to a Cloud SQL for PostgreSQL instance.
    Show answer & explanation

    Correct answer: CAlloyDB for PostgreSQL, utilizing the columnar engine for analytical queries.

    • A. Incorrect. While Cloud SQL for PostgreSQL provides managed PostgreSQL with HA, running complex analytical queries against the live transactional instance will consume CPU and IOPS, significantly impacting OLTP performance. It lacks a built-in columnar engine to offload heavy analytics natively.
    • B. Incorrect. Cloud Spanner with the PostgreSQL interface provides horizontal scalability, but it does not offer full PostgreSQL 14 feature parity (it is a subset). Furthermore, it does not provide the specific HTAP (Hybrid Transactional/Analytical Processing) columnar acceleration required to run heavy analytics on live data without potential performance interference.
    • C. Correct. AlloyDB for PostgreSQL is fully compatible with PostgreSQL 14 and is designed for enterprise-grade HTAP workloads. It includes an integrated columnar engine that uses machine learning to automatically populate a columnar cache for analytical queries. This allows high-performance OLAP queries to run on the live data with minimal impact on transactional performance, eliminating the immediate need for a separate ETL pipeline.
    • D. Incorrect. BigQuery federated queries allow you to query data in Cloud SQL without ETL, but the query execution actually occurs on the source database. This means complex analytical queries would place a high load on the Cloud SQL instance, degrading the performance of the e-commerce application.

    Subdomain 3.1: Selecting storage systems

    17.A media company stores petabytes of raw video footage and logs. They need to store compliance logs for 7 years. These logs are accessed frequently during the first 30 days for debugging, then rarely (less than once a year) for the remaining time. You need to minimize storage costs while ensuring data remains available if an audit occurs. What is the most cost-effective solution?

    1. A.Store data in Cloud Storage Standard class. Use a Lifecycle Management rule to delete data after 7 years.
    2. B.Store data in Cloud Storage Standard class. Use a Lifecycle Management rule to move data to Nearline after 30 days and to Archive after 90 days. Delete after 7 years.
    3. C.Store data in Cloud Storage Standard class. Use a Lifecycle Management rule to move data to Coldline after 30 days and to Archive after 1 year. Delete after 7 years.
    4. D.Store data in BigQuery Standard storage. Rely on BigQuery's automatic long-term storage pricing after 90 days.
    Show answer & explanation

    Correct answer: BStore data in Cloud Storage Standard class. Use a Lifecycle Management rule to move data to Nearline after 30 days and to Archive after 90 days. Delete after 7 years.

    • A. Incorrect. While keeping data in the Standard class for 7 years meets the availability and retention requirements, it is the most expensive option. For petabytes of data that is rarely accessed after the first month, failing to utilize lower-cost storage classes results in significantly higher costs.
    • B. Correct. This strategy optimizes for the specific access patterns provided. Cloud Storage Standard handles the first 30 days of frequent access. Transitioning to Nearline at 30 days and then to Archive at 90 days places the data into the lowest-cost storage tier for the vast majority of its 7-year lifespan. Archive storage is significantly cheaper than all other tiers for long-term retention of rarely accessed data.
    • C. Incorrect. While this option eventually moves data to Archive, it keeps data in the Coldline tier for a full year. Since the prompt states access is rare (less than once a year) after the first 30 days, moving to Archive at 90 days (as in Option B) is more cost-effective than waiting a full year.
    • D. Incorrect. BigQuery is not suitable for raw video footage. Furthermore, even with long-term storage pricing (which is approximately half the cost of active storage), BigQuery is roughly 10 times more expensive per gigabyte than Cloud Storage Archive storage.

    Subdomain 3.4: Designing for a data platform

    18.Your data platform team wants to reduce cloud spend. You have identified that data in the 'Raw' zone (Cloud Storage) is rarely accessed after 90 days. Data in the 'Curated' zone (BigQuery) is queried frequently for 1 year, then rarely. You want to implement a cost-effective lifecycle strategy. What is the most appropriate configuration?

    1. A.Use Dataplex to set a 'Time to Live' (TTL) of 90 days on the Raw Zone assets. Configure BigQuery table expiration for 1 year.
    2. B.Configure GCS Object Lifecycle Management to move objects to Coldline or Archive storage after 90 days. Configure BigQuery Partition Expiration or move older partitions to long-term storage automatically.
    3. C.Write a Cloud Function to delete GCS files older than 90 days. Use DELETE statements in BigQuery for old data.
    4. D.Move all data to BigQuery Omni to save on storage costs.
    Show answer & explanation

    Correct answer: BConfigure GCS Object Lifecycle Management to move objects to Coldline or Archive storage after 90 days. Configure BigQuery Partition Expiration or move older partitions to long-term storage automatically.

    • A. Using Dataplex TTL or BigQuery table expiration results in the permanent deletion of data. The requirement states data is 'rarely accessed' after specific periods, not that it should be destroyed. Furthermore, table expiration deletes the entire table rather than just the older segments of the data.
    • B. This is the most cost-effective and automated approach. GCS Object Lifecycle Management (OLM) allows for transitioning objects to cheaper storage classes (Coldline/Archive) without deleting them. For BigQuery, data that has not been modified for 90 days automatically transitions to long-term storage pricing (a ~50% reduction), and partitioning allows for granular management of data lifecycle and performance.
    • C. Implementing custom Cloud Functions and manual DELETE statements introduces significant operational overhead and is prone to errors. Deletion also permanently removes data, which contradicts the scenario where data is still needed for occasional/rare access.
    • D. BigQuery Omni is a multi-cloud analytics solution designed to query data residing in AWS S3 or Azure Blob Storage. It does not provide a storage cost optimization mechanism for data already in Google Cloud and would likely increase query costs and architectural complexity.

    Subdomain 3.4: Designing for a data platform

    19.Your organization operates in a hybrid cloud environment. You have 50 TB of sales data in AWS S3 and 100 TB in Azure Blob Storage. You want to use Google Cloud's data platform capabilities to query this data and join it with inventory data stored in Google BigQuery without incurring egress fees or moving the data. Which architecture supports this?

    1. A.Use Storage Transfer Service to copy data to Google Cloud Storage, then query with BigQuery.
    2. B.Use BigQuery Omni to compute on the data in AWS and Azure, and return only the results to Google Cloud for the final join.
    3. C.Mount the S3 and Azure buckets as external tables in BigQuery using signed URLs.
    4. D.Use Dataflow to stream the data from S3 and Azure into BigQuery.
    Show answer & explanation

    Correct answer: BUse BigQuery Omni to compute on the data in AWS and Azure, and return only the results to Google Cloud for the final join.

    • A. Incorrect. Storage Transfer Service is designed to move data from other clouds into Google Cloud Storage. This process incurs egress fees from the source cloud provider and violates the requirement to avoid moving the data.
    • B. Correct. BigQuery Omni is a multi-cloud analytics solution that allows you to run the BigQuery engine on AWS (S3) and Azure (Blob Storage) via Anthos. By running the compute where the data resides, you avoid large-scale data movement and associated egress fees, returning only the final result set to Google Cloud for joining with internal BigQuery datasets.
    • C. Incorrect. Standard BigQuery external tables do not support direct mounting of AWS S3 or Azure Blob Storage via signed URLs for querying. Even if data were accessed via external connections, the processing would typically occur in GCP, which would pull the data across cloud boundaries and incur egress charges.
    • D. Incorrect. Using Dataflow to stream or batch process 150 TB of data from S3 and Azure into BigQuery involves moving the data into Google Cloud. This would result in significant egress costs and fails to meet the requirement of keeping the data in its original location.

    Subdomain 3.2: Planning for using a data warehouse

    20.You are architecting a solution for a dataset that requires granular time-based partitioning. The data spans 10 years, and you initially plan to partition by hour. However, you recall BigQuery has a limit of 4,000 partitions per table. How should you adjust the schema design to support efficient querying by hour?

    1. A.Partition by Day and Cluster by a timestamp/integer representing the hour.
    2. B.Create 4,000 separate tables, one for each day.
    3. C.Partition by Hour anyway; the limit is a soft limit that can be increased.
    4. D.Use Ingestion-Time partitioning and use the _PARTITIONTIME pseudo-column.
    Show answer & explanation

    Correct answer: APartition by Day and Cluster by a timestamp/integer representing the hour.

    • A. Correct. Partitioning by day results in approximately 3,650 partitions for 10 years, which stays within the 4,000-partition hard limit. By clustering the table on the hour field, BigQuery can efficiently colocate and prune data within those daily partitions, enabling performant and cost-effective hourly-level queries.
    • B. Incorrect. Creating thousands of separate tables (table sharding) is an outdated practice in BigQuery. It introduces significant operational complexity, makes cross-table analytics more difficult, and schema management becomes burdensome compared to using a single partitioned and clustered table.
    • C. Incorrect. The limit of 4,000 partitions per table is a hard limit in BigQuery and cannot be increased. Attempting to partition by hour over 10 years would require over 87,000 partitions, leading to errors during data ingestion.
    • D. Incorrect. Ingestion-time partitioning is based on when the data is loaded, not on the timestamps within the data. Furthermore, even ingestion-time partitioning is subject to the same partition limits per table, so it does not solve the constraint of having 10 years of granular data.

    Subdomain 3.2: Planning for using a data warehouse

    21.You have a dataset of CSV files in Cloud Storage that is updated daily. The total size is 500 TB. You need to run complex SQL queries on this data. You initially used External Tables, but performance is poor. You need to improve query performance significantly while keeping the architecture simple.

    1. A.Convert the CSVs to Avro format in Cloud Storage.
    2. B.Load the data into BigQuery native storage.
    3. C.Use Hive partitioning on the External Table.
    4. D.Increase the slot quota for the project.
    Show answer & explanation

    Correct answer: BLoad the data into BigQuery native storage.

    • A. Converting CSVs to Avro can reduce parsing overhead and provide a schema, but Avro is primarily a row-based format and does not offer the same columnar storage benefits as BigQuery's native format. Furthermore, querying data in Cloud Storage still involves remote I/O bottlenecks compared to managed storage.
    • B. Loading data into BigQuery native storage is the most effective way to improve performance. It leverages BigQuery's proprietary columnar storage format (Capacitor), which is highly optimized for complex analytical queries at petabyte scale. This also simplifies the architecture by using BigQuery's fully managed storage and ingestion capabilities.
    • C. Hive partitioning on an external table helps with file pruning (skipping irrelevant files), but it doesn't eliminate the fundamental overhead of reading raw data from Cloud Storage. For complex queries on a 500 TB dataset, the performance gain is negligible compared to native storage.
    • D. Increasing the slot quota adds more compute power but does not address the underlying bottleneck of storage I/O and data parsing associated with external CSV files. It is also a less cost-efficient and more complex way to resolve performance issues compared to optimizing storage.

    Domain 4: Preparing and using data for analysis

    Subdomain 4.1: Preparing data for visualization

    22.A financial analyst needs to analyze 5 TB of data stored in BigQuery using a spreadsheet interface. They are comfortable with pivot tables and formulas but do not know SQL. They need to analyze the full dataset without extracting it to a CSV, due to size limitations and security policies. What solution should you recommend?

    1. A.Use Google Connected Sheets to analyze the BigQuery data directly from Google Sheets.
    2. B.Export the data to Cloud Storage as CSV and open it in Excel.
    3. C.Use the BigQuery console to run queries and save results to Google Drive.
    4. D.Teach the analyst basic SQL to use the BigQuery console.
    Show answer & explanation

    Correct answer: AUse Google Connected Sheets to analyze the BigQuery data directly from Google Sheets.

    • A. Google Connected Sheets (part of the BigQuery Data Connector) allows users to analyze massive BigQuery datasets directly within Google Sheets. It supports familiar spreadsheet tools like pivot tables, charts, and formulas while executing the heavy processing in BigQuery. This satisfies the 5 TB requirement without needing SQL or extracting data to local CSV files.
    • B. Exporting 5 TB of data to Cloud Storage as CSV is impractical due to the massive file size and performance bottlenecks. Furthermore, traditional desktop applications like Excel cannot handle datasets of this magnitude (which exceed row limits), and the prompt explicitly forbids CSV extraction due to security and size constraints.
    • C. The BigQuery console requires users to write SQL queries to manipulate data, which the analyst does not know. Additionally, saving large result sets to Google Drive often involves row limits or data extraction that could violate security policies.
    • D. While teaching SQL is a valid long-term skill, it does not provide an immediate solution that leverages the analyst's existing expertise in pivot tables and formulas. Connected Sheets is specifically designed to bridge the gap between BigQuery's scale and a user's spreadsheet skills.

    Subdomain 4.1: Preparing data for visualization

    23.Which of the following BigQuery features is essentially an in-memory analysis service that accelerates the query response time for high-concurrency BI dashboards?

    1. A.BigQuery Omni
    2. B.BigQuery BI Engine
    3. C.BigQuery ML
    4. D.BigQuery Data Transfer Service
    Show answer & explanation

    Correct answer: BBigQuery BI Engine

    • A. BigQuery Omni is a multi-cloud analytics solution that allows you to run BigQuery queries on data residing in other cloud providers like AWS and Azure. It is not designed as an in-memory acceleration layer for BI dashboards.
    • B. BigQuery BI Engine is a fast, in-memory analysis service that accelerates query response times for interactive, high-concurrency BI dashboards. By caching data in memory and using a specialized execution engine, it provides sub-second latency and high throughput for visualization tools like Looker Studio.
    • C. BigQuery ML allows data scientists and analysts to build and deploy machine learning models directly within BigQuery using standard SQL. While powerful for predictive analytics, it does not serve as an in-memory cache for dashboard acceleration.
    • D. BigQuery Data Transfer Service automates the movement of data from various SaaS applications and external sources into BigQuery. It is a data ingestion and automation tool, not an in-memory analysis service.

    Subdomain 4.3: Sharing data

    24.Which BigQuery feature allows you to share a point-in-time snapshot of a table as it existed 30 days ago with another team, ensuring that subsequent changes to the live table do not affect the shared data, without manually exporting data?

    1. A.Table Clones
    2. B.Table Snapshots
    3. C.Time Travel
    4. D.Materialized Views
    Show answer & explanation

    Correct answer: BTable Snapshots

    • A. Table Clones create a fast, zero-copy copy of a table that is writable. While they capture the state at the time of creation, they are primarily used for development and testing. Furthermore, a clone cannot be retroactively created for a point in time outside of the standard 7-day time travel window.
    • B. Table Snapshots are specifically designed to create an immutable, read-only, point-in-time copy of a table. Once a snapshot is created, it remains unchanged even if the base table is modified or deleted. While creating a snapshot from a past state is limited to BigQuery's time travel window (7 days), a snapshot that was taken 30 days ago and preserved is the standard mechanism for sharing historical, point-in-time data without the overhead of data exports.
    • C. Time Travel (using the FOR SYSTEM_TIME AS OF clause) allows you to query historical data, but it is limited to a maximum retention window of 7 days. It does not create a persistent, shareable object, and it cannot access data from 30 days ago unless a snapshot was already taken.
    • D. Materialized Views are precomputed results used to improve query performance and are automatically updated as the base table changes. They do not represent static historical snapshots and are not used for point-in-time data sharing.

    Subdomain 4.2: Preparing data for AI and ML

    25.Your team needs to centralize feature management for several ML models. You require point-in-time correctness for creating training datasets (to avoid data leakage) and low-latency retrieval for online serving. You decide to use Vertex AI Feature Store. Which actions are required to set this up?(Select 2)

    1. A.Define a schema for your Entity Types and Features.
    2. B.Write a Dataflow job to ingest historical data into the Offline Store.
    3. C.Use Cloud Bigtable as the backend for the Offline Store manually.
    4. D.Configure Memcached to cache features for the Online Store.
    5. E.Create a BigQuery view that joins all source tables and exposes it as an API.
    Show answer & explanation

    Correct answers: A, BDefine a schema for your Entity Types and Features.; Write a Dataflow job to ingest historical data into the Offline Store.

    • A. Establishing the hierarchy of Entity Types (e.g., 'user', 'product') and Features (e.g., 'average_spend') is a fundamental step in setting up Vertex AI Feature Store. This schema ensures features are properly registered, typed, and associated with the correct entities for both online serving and offline training.
    • B. To populate the Offline Store with historical data for point-in-time joins (crucial for avoiding data leakage), you must ingest historical feature values. A Dataflow job is a common and recommended method to transform source data and write timestamped feature records into the Feature Store's managed offline storage.
    • C. Vertex AI Feature Store manages the backend storage internally. While the Online Store might use Bigtable under the hood for low-latency serving, the Offline Store uses BigQuery. Users do not manually configure Bigtable as an offline backend.
    • D. Vertex AI Feature Store provides its own managed low-latency online serving layer. Manually configuring an external cache like Memcached is unnecessary and is not part of the standard Feature Store architecture.
    • E. A BigQuery view exposed as an API does not provide the specialized metadata management, automated point-in-time correctness for training, or the low-latency serving infrastructure provided by Vertex AI Feature Store.

    Domain 5: Maintaining and automating data workloads

    Subdomain 5.5: Maintaining awareness of failures and mitigating impact

    26.A data analyst accidentally deleted a production dataset in BigQuery containing 50TB of historical data. This happened 2 days ago. You need to recover this table immediately to minimize business impact. What is the most cost-effective and fastest way to recover the data?

    1. A.Restore the data from the exported Avro files in Cloud Storage.
    2. B.Use BigQuery Time Travel to copy the table from a snapshot 2 days ago.
    3. C.Contact Google Cloud Support to restore the data from physical backups.
    4. D.Re-run the ETL pipelines from the source systems to repopulate the table.
    Show answer & explanation

    Correct answer: BUse BigQuery Time Travel to copy the table from a snapshot 2 days ago.

    • A. Restoring from exported Avro files in Cloud Storage is only possible if a recent export actually exists. Even then, re-importing 50TB of data is time-consuming and may incur additional costs. It is far less efficient than using built-in BigQuery features for recent deletions.
    • B. BigQuery Time Travel allows you to access and restore data from any point within the last seven days. Since the deletion occurred 2 days ago, you can use the snapshot decorator or a 'CREATE TABLE ... AS SELECT ...' statement with a 'FOR SYSTEM_TIME AS OF' clause to recover the table immediately without reprocessing or moving data from external storage.
    • C. Contacting Google Cloud Support for physical backup restoration is a last-resort measure and is not a standard recovery path for user-deleted tables. It involves manual intervention and significant delays, making it neither fast nor the primary recommended method.
    • D. Re-running ETL pipelines to repopulate 50TB is extremely resource-intensive, expensive, and slow. Additionally, it may be impossible to perfectly replicate the historical state if the source systems have since changed or do not retain full historical logs.

    Subdomain 5.5: Maintaining awareness of failures and mitigating impact

    27.Your organization requires a Disaster Recovery (DR) plan for a critical Cloud SQL instance located in `us-central1`. The RTO (Recovery Time Objective) is 1 hour, and RPO (Recovery Point Objective) is 5 minutes. You need to protect against a total region failure of `us-central1`. Which two steps are part of the solution?(Select 2)

    1. A.Create a cross-region read replica in `us-east1`.
    2. B.Configure the instance for High Availability (HA) in `us-central1`.
    3. C.In the event of a failure, promote the `us-east1` replica to be the primary instance.
    4. D.Use Cloud Storage Transfer Service to copy backups to `us-east1`.
    5. E.Configure synchronous replication to the read replica.
    Show answer & explanation

    Correct answers: A, CCreate a cross-region read replica in `us-east1`.; In the event of a failure, promote the `us-east1` replica to be the primary instance.

    • A. Creating a cross-region read replica in `us-east1` provides a redundant copy of the instance in a different region, which is necessary to survive a total region failure of `us-central1`. Cross-region replicas use asynchronous replication, which typically achieves minute-level RPOs suitable for a 5-minute RPO target.
    • B. High Availability (HA) in Cloud SQL provides redundancy across zones within a single region. While this protects against a zone outage, it does not provide protection against a total region failure.
    • C. In a disaster recovery scenario where the primary region is unavailable, promoting the cross-region replica converts it into a standalone, writable primary instance. This failover process is the standard way to meet aggressive RTO targets (like 1 hour) compared to restoring from backups.
    • D. While backups are important, restoring a database from Cloud Storage is generally too slow to reliably meet a 1-hour RTO for large instances. Additionally, standard backup schedules may not satisfy a strict 5-minute RPO.
    • E. Cloud SQL does not support synchronous replication for cross-region read replicas. Synchronous replication is used for regional High Availability (between zones), whereas cross-region replication is always asynchronous.

    Subdomain 5.2: Designing automation and repeatability

    28.Your team maintains a Cloud Composer environment. You have noticed that the Airflow scheduler is consuming excessive CPU and experiencing high latency when scheduling tasks. Upon investigation, you find that several DAG files contain top-level code that performs database queries and API calls to fetch configuration variables. You need to optimize the DAGs to reduce scheduler load. What should you do?

    1. A.Increase the machine type of the Cloud Composer nodes.
    2. B.Move the database queries and API calls inside the Python callables or operators.
    3. C.Convert the DAGs to use SubDags for the configuration logic.
    4. D.Use the Airflow Variable structure to store the query results and fetch them at the top level.
    Show answer & explanation

    Correct answer: BMove the database queries and API calls inside the Python callables or operators.

    • A. Increasing the machine type (vertical scaling) might provide temporary relief but fails to address the root cause: expensive operations executed during DAG parsing. The scheduler continuously parses DAG files, so inefficient top-level code will persist in consuming excessive resources regardless of the node size.
    • B. Moving database queries and API calls inside operators or Python callables ensures these operations only execute at task runtime on workers, rather than during every scheduler parsing cycle. This significantly reduces CPU load and latency for the Airflow scheduler by keeping DAG parsing lightweight and fast.
    • C. SubDags are generally discouraged due to performance issues and added complexity. They do not prevent top-level code execution during parsing and would not solve the problem of high scheduler CPU consumption; in fact, they often increase scheduling overhead.
    • D. Fetching Airflow Variables at the top level of a DAG file is an anti-pattern. Since the scheduler parses DAG files frequently (usually every few seconds), accessing variables at the top level results in constant database lookups to the Airflow metadata DB, which contributes to high scheduler latency rather than reducing it.

    Subdomain 5.2: Designing automation and repeatability

    29.You have two separate Cloud Composer environments: 'Ingest' and 'Process'. You need a DAG in the 'Process' environment to start only after a specific DAG in the 'Ingest' environment has successfully completed. How should you implement this dependency?

    1. A.Use the ExternalTaskSensor in the 'Process' DAG to poll the status of the 'Ingest' DAG.
    2. B.Use a Pub/Sub topic. The 'Ingest' DAG publishes a message upon completion, and the 'Process' DAG uses a PubSubPullSensor.
    3. C.Configure the 'Ingest' DAG to write a file to GCS, and use a GCSObjectExistenceSensor in the 'Process' DAG.
    4. D.Use the TriggerDagRunOperator in the 'Process' DAG to start the 'Ingest' DAG.
    Show answer & explanation

    Correct answer: BUse a Pub/Sub topic. The 'Ingest' DAG publishes a message upon completion, and the 'Process' DAG uses a PubSubPullSensor.

    • A. The ExternalTaskSensor monitors the status of a task or DAG within the same Airflow instance because it queries the local Airflow metadata database. Since these are two separate Cloud Composer environments, they have isolated metadata databases, making the ExternalTaskSensor unable to see the status of the other environment.
    • B. This is the most robust and decoupled approach for cross-environment communication. Using Google Cloud Pub/Sub allows the 'Ingest' environment to signal completion as an event. The 'Process' environment can then react to this event using a PubSubPullSensor, effectively bridging the two isolated environments.
    • C. While using a GCS file as a signal (the 'landing file' pattern) is technically possible across environments, it relies on polling and is generally considered less elegant and more prone to maintenance overhead than event-driven messaging like Pub/Sub.
    • D. The TriggerDagRunOperator is designed to initiate a DAG run, not to act as a sensor for completion. Additionally, it is primarily intended for use within a single Airflow instance and is proposed here in the incorrect logical order (Process triggering Ingest instead of waiting for it).

    Subdomain 5.4: Monitoring and troubleshooting processes

    30.Your team runs a streaming Dataflow pipeline that reads from Pub/Sub, window's data, and writes to BigQuery. You receive an alert from Cloud Monitoring that the 'System Lag' has increased significantly over the last hour. You check the Dataflow monitoring interface and see that one specific worker is utilizing 100% CPU while others are idle. What is the most likely cause and the appropriate troubleshooting step?

    1. A.The pipeline is under-provisioned; enable Vertical Autoscaling.
    2. B.A hot key issue is occurring; check the log files for distribution of keys and consider using Dataflow Shuffle or adding a fan-out step.
    3. C.BigQuery quota is exceeded; check the BigQuery quota page for streaming insert errors.
    4. D.The worker has a memory leak; force a restart of the job to provision new workers.
    Show answer & explanation

    Correct answer: BA hot key issue is occurring; check the log files for distribution of keys and consider using Dataflow Shuffle or adding a fan-out step.

    • A. Incorrect. If the pipeline were under-provisioned, you would expect many workers to be busy or the autoscaler to add more workers. While Dataflow supports Vertical Autoscaling, it cannot resolve a data skew/hot-key issue that concentrates work on a single worker.
    • B. Correct. A hot key (skewed key distribution) will concentrate processing for a specific key/window on a single worker, causing that worker's CPU to spike while others remain idle. This creates a bottleneck that increases system lag. Troubleshooting involves identifying the skewed key and mitigating it with Dataflow Shuffle, re-keying, or implementing a fan-out/reshard step.
    • C. Incorrect. BigQuery quota issues manifest as streaming insert errors or retries visible in logs and metrics. A quota issue would affect the sink stage generally and is unlikely to produce a specific CPU skew where only one worker is pegged at 100%.
    • D. Incorrect. A memory leak typically results in Out-of-Memory (OOM) errors or garbage collection thrashing, not sustained 100% CPU on a single worker while others are idle. Restarting the job is a temporary workaround and does not address the root cause of the processing hotspot.

    Subdomain 5.4: Monitoring and troubleshooting processes

    31.You are monitoring a Pub/Sub subscription using Cloud Monitoring. You notice that the 'Oldest Unacked Message Age' metric is steadily increasing, but the 'Pull Request Count' is non-zero and consistent. The subscriber application logs show no errors. What is the most likely cause?

    1. A.The subscriber application is processing messages slower than the rate of publication, causing a backlog.
    2. B.The Pub/Sub topic quota has been exceeded.
    3. C.The subscriber is crashing and restarting before acknowledging messages.
    4. D.The messages are larger than the 10 MB limit.
    Show answer & explanation

    Correct answer: AThe subscriber application is processing messages slower than the rate of publication, causing a backlog.

    • A. Correct. A steady, non-zero Pull Request Count combined with an increasing Oldest Unacked Message Age indicates that the subscriber is successfully pulling messages but cannot process and acknowledge them as fast as they are being published. This lead to a growing backlog. Since the logs show no errors, it confirms the application is functional but likely under-provisioned or experiencing processing latency.
    • B. Incorrect. If a Pub/Sub topic quota were exceeded, publish operations would be throttled or rejected, typically resulting in 429 Resource Exhausted errors for publishers. It would not explain an increasing backlog age on the subscription side if pull requests are still successfully occurring at a consistent rate.
    • C. Incorrect. If the subscriber were crashing and restarting, application logs would show termination signals or stack traces. Additionally, crashes would usually lead to inconsistent Pull Request counts and higher message redelivery rates, which is not what is observed here.
    • D. Incorrect. Pub/Sub enforces the 10 MB message size limit during publication. Any message exceeding this limit is rejected immediately with an error to the publisher and never enters the subscription. Therefore, it cannot contribute to the unacked message age metric.

    Subdomain 5.3: Organizing workloads based on business requirements

    32.You are managing a data warehouse where multiple departments run queries. You want to implement a 'chargeback' model where each department pays for its own compute usage. However, you want to manage the total capacity centrally to leverage volume discounts and idle slot sharing. How should you organize the workloads?

    1. A.Create a separate Billing Account for each department and link their projects to their respective billing accounts.
    2. B.Create a central Administration Project that holds the Capacity Commitment. Create Reservations for each department and assign their respective projects to these Reservations.
    3. C.Create a single project for all departments and use Labels to distinguish costs in the billing export.
    4. D.Use the BigQuery On-Demand model and set a custom quota limit for daily costs per user.
    Show answer & explanation

    Correct answer: BCreate a central Administration Project that holds the Capacity Commitment. Create Reservations for each department and assign their respective projects to these Reservations.

    • A. Incorrect. Creating separate Billing Accounts for each department fragments billing and prevents the centralized purchase and management of Capacity Commitments. This setup makes it impossible to leverage organization-wide volume discounts or share idle slots between departments.
    • B. Correct. The recommended approach for centralized capacity management in BigQuery is to create a central Administration Project to hold the Capacity Commitment (slots). You then create Reservations for each department and assign their specific projects to those Reservations. This allows for centralized billing and volume discounts while supporting idle slot sharing across the organization.
    • C. Incorrect. Using a single project with Labels can assist with cost attribution in billing exports, but it does not provide the compute isolation or capacity management required for a robust chargeback model. It lacks the ability to formally manage slots or enforce departmental compute quotas through Reservations.
    • D. Incorrect. The BigQuery On-Demand model charges based on the amount of data processed per query and does not support Capacity Commitments. Because it lacks the reservation mechanism, you cannot centrally manage slot capacity, leverage volume discounts for compute, or enable idle slot sharing.

    Subdomain 5.3: Organizing workloads based on business requirements

    33.A global marketing team requires a data environment where analysts in Europe and Asia can run ad-hoc queries. The Finance team in the US requires guaranteed capacity for end-of-quarter reporting. You want to ensure the Finance team is never blocked by the marketing analysts' heavy queries. Which two actions should you take?(Select 2)

    1. A.Create a specific Reservation for the Finance team with a fixed baseline capacity.
    2. B.Assign the Marketing projects to a separate Reservation with no baseline (0 slots) but access to idle slots, or a lower baseline.
    3. C.Instruct Finance team members to use the `BATCH` priority for their queries.
    4. D.Put all projects in the `default` reservation and trust the fair scheduler.
    5. E.Grant the Finance team `roles/bigquery.admin`.
    Show answer & explanation

    Correct answers: A, BCreate a specific Reservation for the Finance team with a fixed baseline capacity.; Assign the Marketing projects to a separate Reservation with no baseline (0 slots) but access to idle slots, or a lower baseline.

    • A. Creating a specific Reservation for the Finance team with a fixed baseline capacity ensures that the Finance team always has the necessary slots available for their end-of-quarter reporting, regardless of the marketing team's activities. Reservations and assignments are the primary BigQuery mechanism for providing capacity guarantees.
    • B. Assigning Marketing projects to a separate Reservation isolates their workload from the Finance reservation. Setting a low or zero baseline while enabling access to idle slots allows marketing to burst into unused capacity when available without ever competing with or blocking the Finance team's guaranteed baseline capacity.
    • C. Instructing the Finance team to use BATCH priority would be counterproductive. BATCH priority queries are for non-time-sensitive workloads and are queued until idle resources are available; they do not provide guaranteed capacity and could lead to significant delays.
    • D. Putting all projects in the default reservation relies on the fair scheduler. While the fair scheduler prevents a single query from monopolizing all slots, it does not provide hard capacity guarantees or a baseline, meaning the Finance team could still face performance degradation during high contention.
    • E. Granting the roles/bigquery.admin role provides administrative permissions (like managing datasets and jobs) but has no impact on slot allocation, query performance, or capacity management.

    Subdomain 5.1: Optimizing resources

    34.You have a BigQuery dataset used by both the Data Science team for heavy ad-hoc experimentation and the Executive team for a critical real-time dashboard. The Executive dashboard is experiencing high latency because the Data Science queries are consuming all available slots. You need to guarantee capacity for the dashboard while optimizing resource usage. What should you do?

    1. A.Create a separate BigQuery project for the Executive team.
    2. B.Set up BigQuery Reservations. Assign a dedicated reservation to the Executive dashboard project and a separate reservation for the Data Science team.
    3. C.Instruct the Data Science team to run their queries only at night.
    4. D.Switch the Executive dashboard to use the BigQuery Storage Read API.
    Show answer & explanation

    Correct answer: BSet up BigQuery Reservations. Assign a dedicated reservation to the Executive dashboard project and a separate reservation for the Data Science team.

    • A. Creating a separate BigQuery project alone does not guarantee slot capacity. In the default on-demand billing model, projects still share a pool of slots, and moving workloads to different projects does not isolate them from slot contention caused by heavy queries elsewhere in the organization.
    • B. BigQuery Reservations allows you to purchase dedicated slot capacity (commitments) and allocate them to specific projects, folders, or organizations. By assigning a dedicated reservation to the Executive dashboard and a separate one to the Data Science team, you provide workload isolation and guaranteed capacity for the dashboard while optimizing overall resource usage through slot sharing between the reservations if configured.
    • C. Instructing teams to run queries at specific times is an operational workaround rather than a technical solution. It is not scalable, relies on human compliance, and does not provide an enforceable technical guarantee of performance for real-time requirements.
    • D. The BigQuery Storage Read API provides high-speed data access for reading records directly from storage (useful for tools like Spark), but it does not address SQL query engine slot contention. It does not provide the slot isolation or execution guarantees needed for low-latency SQL dashboards.

    Subdomain 5.1: Optimizing resources

    35.You have a streaming Dataflow pipeline that is consuming messages from Pub/Sub. The pipeline is falling behind, and the system lag is increasing. You observe high CPU usage on the worker nodes. You need to improve throughput and reduce lag. What is the most effective way to scale the resources?

    1. A.Enable Streaming Engine to offload state and shuffle operations to the backend service.
    2. B.Switch the job to Batch mode.
    3. C.Disable autoscaling and fix the worker count to the maximum allowed quota.
    4. D.Use a smaller machine type for the workers to increase parallelism.
    Show answer & explanation

    Correct answer: AEnable Streaming Engine to offload state and shuffle operations to the backend service.

    • A. Correct. Enabling the Streaming Engine offloads state storage, windowing, and shuffle operations from the worker VMs to a Google-managed backend service. This significantly reduces CPU and memory pressure on the worker nodes, typically leading to increased throughput and reduced system lag without requiring a massive increase in the number of worker VMs.
    • B. Incorrect. Switching to Batch mode is inappropriate for a continuous streaming source like Pub/Sub. Batch jobs are designed for bounded datasets and would break the real-time processing requirements of the pipeline.
    • C. Incorrect. Disabling autoscaling and fixing the worker count removes the pipeline's ability to adapt to varying data volumes. While it might temporarily provide more capacity if set to a high number, it is inefficient, costly, and does not address the underlying resource contention on the workers as effectively as offloading tasks.
    • D. Incorrect. For CPU-bound workloads, using a smaller machine type would reduce the available processing power per worker, likely exacerbating the high CPU usage and increasing the system lag further.

    Want the full experience?

    These are just samples. Practice the full Google Professional Data Engineer question bank in quiz mode — free, no signup, with domain practice and exam simulation.