











































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!












































































Question 1. Which GCP service is the most appropriate for building a globally consistent relational database with strong transactional guarantees? A) Cloud SQL B) Cloud Spanner C) Bigtable D) Firestore Answer: B Explanation: Cloud Spanner provides horizontal scalability, global consistency, and ACID transactions, making it ideal for globally consistent relational workloads. Question 2. When designing a data pipeline that must guarantee exactly-once processing of streaming events, which combination of services should you use? A) Pub/Sub → Dataflow (unbounded) → BigQuery B) Pub/Sub → Dataproc Spark Streaming → Cloud Storage C) Cloud Functions → Pub/Sub → Bigtable D) Pub/Sub → Dataflow (using Pub/Sub Lite) → BigQuery Answer: A Explanation: Pub/Sub provides at-least-once delivery, but Dataflow’s built-in deduplication and exactly-once semantics ensure exactly-once processing when writing to BigQuery. Question 3. Which Cloud Storage class offers the lowest storage cost for data that is accessed less than once a year? A) Standard B) Nearline C) Coldline D) Archive Answer: D Explanation: Archive is designed for data accessed less than once a year and has the cheapest per-GB storage cost, though retrieval latency is higher.
Question 4. To enforce data-level access controls based on user identity across multiple GCP projects, you should configure: A) IAM custom roles only B) VPC Service Controls only C) Cloud Identity-Aware Proxy D) IAM policies with organization-wide constraints and VPC Service Controls Answer: D Explanation: Combining organization-wide IAM policies with VPC Service Controls restricts data movement and enforces fine-grained access across projects. Question 5. Which feature of BigQuery enables you to reduce query costs by clustering data on frequently filtered columns? A) Partitioning B) Clustering C) Materialized Views D) Table decorators Answer: B Explanation: Clustering sorts data on specified columns, allowing BigQuery to prune blocks during query execution, thereby lowering scanned bytes and cost. Question 6. In a Dataflow pipeline, which transformation is used to group elements that arrive within a fixed time window? A) ParDo B) CombineGlobally C) Window.into(FixedWindows) D) GroupByKey Answer: C Explanation: Window.into(FixedWindows) assigns elements to fixed-size time windows, enabling time-based aggregation.
Question 10. When migrating an on-prem Hadoop cluster to GCP, which managed service provides the most similar ecosystem with minimal operational overhead? A) Cloud Dataproc B) Cloud Dataflow C) Cloud Composer D) Cloud Run Answer: A Explanation: Cloud Dataproc offers managed Spark and Hadoop clusters, supporting existing Hadoop ecosystem tools with reduced ops. Question 11. Which BigQuery feature allows you to query data stored in external cloud providers without moving the data? A) BigQuery ML B) BigQuery Omni C) BigQuery Data Transfer Service D) BigQuery External Tables Answer: B Explanation: BigQuery Omni enables federated queries across multiple clouds (AWS, Azure) without data replication. Question 12. To automatically delete objects older than 365 days from a Cloud Storage bucket, you should configure: A) Object versioning B) Lifecycle management rule with age condition C) IAM policy with expiration D) Customer-managed encryption keys rotation Answer: B Explanation: Lifecycle rules can delete or transition objects based on age, automating data retention policies.
Question 13. Which of the following is a primary benefit of using a serverless service like Dataflow over self-managed Spark on Dataproc for ETL workloads? A) Direct access to GPU instances B) Automatic scaling and managed resource provisioning C) Ability to run on-prem hardware D) Persistent local storage for caching Answer: B Explanation: Dataflow abstracts cluster management, automatically scaling workers based on workload, reducing operational burden. Question 14. In the context of GDPR compliance, which GCP service can be used to discover and redact sensitive personal data in Cloud Storage objects? A) Cloud DLP B) Cloud IAM C) Cloud KMS D) Cloud Armor Answer: A Explanation: Cloud Data Loss Prevention (DLP) can scan and mask or redact PII within files stored in Cloud Storage. Question 15. Which BigQuery SQL clause is used to limit the amount of data scanned by only reading rows from a specific date range in a partitioned table? A) WHERE _PARTITIONTIME = '2023-01-01' B) GROUP BY DATE(timestamp) C) PARTITION BY DATE(timestamp) D) SELECT * FROM table LIMIT 1000 Answer: A Explanation: Filtering on _PARTITIONTIME (or the partition column) allows BigQuery to prune partitions, reducing scanned data.
Question 19. To reduce the cost of frequent small reads from a large dataset in BigQuery, you should: A) Increase the number of slots allocated to the project. B) Use clustered tables on the columns used in filters. C) Store the data in Cloud SQL instead. D) Disable query caching. Answer: B Explanation: Clustering enables BigQuery to read only relevant data blocks, decreasing bytes scanned for selective queries. Question 20. Which GCP service is best suited for building a feature store that serves ML features in real time to online predictions? A) Vertex AI Feature Store B) Cloud Bigtable C) Cloud Dataproc D) Cloud Data Fusion Answer: A Explanation: Vertex AI Feature Store provides a managed solution for storing, serving, and monitoring ML features for both online and batch predictions. Question 21. When using BigQuery ML to train a logistic regression model, which parameter controls the maximum number of iterations during training? A) max_iterations B) learning_rate C) regularization_type D) early_stop Answer: A Explanation: max_iterations sets the cap on training iterations; other parameters control learning rate, regularization, etc.
Question 22. Which of the following is a recommended practice for securing service-to-service communication in GCP? A) Use default compute service accounts for all services. B) Grant Owner role to all service accounts. C) Create dedicated service accounts with least-privilege IAM roles. D) Disable VPC Service Controls. Answer: C Explanation: Dedicated service accounts with minimal required permissions follow the principle of least privilege, reducing attack surface. Question 23. In Dataplex, what is the purpose of a “Zone”? A) To define network security perimeters. B) To group related data assets with similar governance policies. C) To allocate compute resources for processing. D) To store encrypted secrets. Answer: B Explanation: Zones organize data assets (tables, files) that share similar access, quality, and lifecycle policies within a lake. Question 24. Which Cloud Monitoring feature allows you to automatically create alerts when a Dataflow job’s system lag exceeds a threshold? A) Log-based metrics B) Uptime checks C) Service level objectives (SLOs) D) Alerting policies on custom metrics Answer: D Explanation: You can define a custom metric for Dataflow system lag and set an alerting policy to trigger when it exceeds a defined threshold. Question 25. Which of the following is a primary advantage of using Cloud Run for serving a lightweight inference model compared to Vertex AI Predictions?
B) Enable allowed_lateness on the window. C) Set the pipeline’s max_workers to 1. D) Disable watermarking. Answer: B Explanation: allowed_lateness defines how long late data can be accepted and processed after the window closes. Question 29. Which of the following is a best practice for partitioning a large fact table in BigQuery that is frequently filtered by event date? A) Partition by ingestion time (_PARTITIONDATE). B) Partition by a string column containing user IDs. C) Partition by the event timestamp column. D) Do not partition; rely on clustering only. Answer: C Explanation: Partitioning by the event timestamp aligns with common query filters on dates, enabling partition pruning. Question 30. In Cloud Composer, which component is responsible for storing the state of DAG runs and task instances? A) Cloud Storage bucket B) Cloud SQL (Airflow metadata database) C) BigQuery dataset D) Pub/Sub topic Answer: B Explanation: Cloud Composer provisions a Cloud SQL instance that serves as the Airflow metadata database, persisting DAG run state. **Question 31. Which GCP service provides a managed, scalable, and serverless environment for executing Apache Beam pipelines without managing any clusters? ** A) Cloud Dataflow B) Cloud Dataproc
C) Cloud Run D) Cloud Functions Answer: A Explanation: Cloud Dataflow is the fully managed service for running Apache Beam pipelines in both batch and streaming modes. Question 32. When you need to enforce column-level masking for credit-card numbers in BigQuery, which feature should you use? A) Data Catalog tags B) Authorized views C) Column-level security policies (policy tags) with DLP inspection D) VPC Service Controls Answer: C Explanation: Policy tags combined with DLP can mask or restrict access to specific columns containing sensitive data. Question 33. Which of the following statements about Cloud Pub/Sub’s “Exactly-once delivery” is correct? A) It is available for both push and pull subscriptions by default. B) It requires the subscriber to be a Cloud Dataflow job with deduplication enabled. C) It is only supported for messages published to a topic with ordering keys. D) It is not yet generally available as of 2024. Answer: D Explanation: As of 2024, Pub/Sub provides at-least-once delivery; exactly-once semantics are still in preview and not generally available. Question 34. To store large binary objects (e.g., images, videos) that need to be accessed by a downstream ML model, which storage option is most cost-effective while still providing low latency? A) Cloud Storage Standard B) Cloud Storage Nearline
D) A network security perimeter. Answer: B Explanation: A Lake is a top-level logical container that groups zones and applies consistent governance policies. Question 38. When using Cloud Build to deploy a Dataflow template, which step is essential to ensure the pipeline runs with the correct service account? A) Add --service-account flag to the gcloud dataflow jobs run command. B) Set the BUILD_SERVICE_ACCOUNT environment variable. C) Grant the Cloud Build service account the Dataflow Admin role. D) Use a custom Docker image that includes the service account credentials. Answer: A Explanation: The --service-account flag explicitly tells Dataflow which service account to use for the job. Question 39. Which of the following is a key difference between Cloud SQL and Cloud Spanner regarding scalability? A) Cloud SQL can scale horizontally across regions automatically. B) Cloud Spanner provides automatic horizontal scaling, while Cloud SQL is limited to vertical scaling per instance. C) Both services use the same underlying architecture for scaling. D) Cloud SQL supports unlimited read replicas, while Spanner does not. Answer: B Explanation: Cloud Spanner automatically shards data across nodes for horizontal scaling; Cloud SQL relies on increasing instance size or adding read replicas. Question 40. To monitor the end-to-end latency of a streaming pipeline from Pub/Sub ingestion to BigQuery write, which metric should you track? A) Pub/Sub subscription backlog size B) Dataflow system lag C) BigQuery slot utilization
D) Cloud Storage object count Answer: B Explanation: Dataflow’s system lag metric measures the time difference between event timestamps and processing time, reflecting end-to-end latency. Question 41. Which of the following is an advantage of using nested and repeated fields in a BigQuery table schema? A) Guarantees ACID transactions across rows. B) Reduces the need for joins and can improve query performance. C) Enables row-level security without policy tags. D) Allows the table to be partitioned automatically. Answer: B Explanation: Nested/repeated fields store hierarchical data, often eliminating the need for costly joins and improving performance. Question 42. In Cloud IAM, which condition key can be used to restrict access based on the request’s source IP address? A) request.time B) request.auth.claims.sub C) request.ip D) request.resource.name Answer: C Explanation: request.ip evaluates the caller’s IP address, allowing IP-based access restrictions. Question 43. Which of the following statements about BigQuery’s “Streaming Inserts” is FALSE? A) Data becomes available for query within seconds. B) Streaming inserts bypass the need for load jobs. C) They provide exactly-once delivery guarantees. D) They can be used to append rows to a table without partitioning.
Answer: B Explanation: IAM Conditions can include request.auth.claims.email domain checks to restrict access to a particular Workspace domain. **Question 47. Which of the following is the most appropriate way to reduce the cost of a Dataflow job that processes a high-volume, low-complexity transformation? ** A) Increase the number of workers to reduce job duration. B) Use the “Streaming Engine” mode for batch workloads. C) Enable autoscaling with a lower maximum worker count. D) Switch to a single-zone worker pool. Answer: C Explanation: Autoscaling with a capped maximum worker count prevents over-provisioning while adapting to workload spikes, reducing cost. Question 48. Which BigQuery feature allows you to define a table that automatically updates its contents based on a query run on a schedule? A) Materialized View B) Scheduled Query with a destination table (WRITE_TRUNCATE) C) Dataflow streaming insert D) Cloud Function trigger Answer: B Explanation: Scheduled queries can write results to a destination table, effectively keeping it refreshed on a schedule. Question 49. In Vertex AI, what is the purpose of a “Model Registry”? A) To store raw training data. B) To manage versions of trained models and their metadata. C) To host feature transformations. D) To orchestrate data pipelines. Answer: B
Explanation: The Model Registry tracks model versions, metadata, and deployment status, enabling model lifecycle management. Question 50. Which of the following best describes the “Coldline” storage class in Cloud Storage? A) Optimized for data accessed multiple times per day. B) Designed for archival data accessed less than once a year with higher retrieval latency. C) Intended for data accessed less than once a month with lower cost than Nearline. D) Provides instant retrieval for any object size. Answer: C Explanation: Coldline is cheaper than Nearline and is suited for data accessed less than once a month. Question 51. When using Cloud Data Fusion, which component is responsible for executing the actual data transformations? A) Cloud Dataflow workers B) Dataproc clusters C) Cloud Composer DAGs D) Cloud Functions Answer: A Explanation: Data Fusion pipelines are compiled to Cloud Dataflow jobs that execute the transformations. Question 52. Which of the following is a key advantage of using Pub/Sub ordering keys? A) Guarantees exactly-once delivery. B) Ensures messages with the same key are delivered in publish order to a single subscriber. C) Enables message compression across keys. D) Provides built-in deduplication. Answer: B
Explanation: cloudbuild.yaml specifies the sequence of build and deployment steps for Cloud Build. Question 56. Which of the following is a recommended practice for reducing the size of a BigQuery table that stores event logs with a timestamp column? A) Store timestamps as STRING. B) Use TIMESTAMP type and partition by the timestamp column. C) Store timestamps as INTEGER epoch seconds without partitioning. D) Duplicate the timestamp column for redundancy. Answer: B Explanation: Using the native TIMESTAMP type and partitioning by it enables efficient pruning and reduces storage. Question 57. In Dataproc, what is the purpose of an “ephemeral” cluster? A) A cluster that persists for weeks to months. B) A cluster that automatically shuts down after jobs complete. C) A cluster with permanent HDFS storage. D) A cluster that runs only on preemptible VMs. Answer: B Explanation: Ephemeral clusters are provisioned for a specific job or workflow and terminated automatically afterward, saving cost. Question 58. Which of the following Google Cloud services can be used to automatically discover and classify sensitive data stored in BigQuery tables? A) Cloud DLP B) Cloud IAM C) Cloud Asset Inventory D) Cloud Logging Answer: A Explanation: Cloud DLP can scan BigQuery tables, detect PII, and generate findings for data governance. Question 59. To enforce that all data written to a Cloud Storage bucket is encrypted with a customer-managed key, you must: A) Enable bucket-level default encryption with a KMS key. B) Set IAM policy to deny all encryption actions.
C) Use Object Versioning. D) Apply a lifecycle rule to delete unencrypted objects. Answer: A Explanation: Configuring default encryption on the bucket with a CMEK ensures all new objects are encrypted using that key. Question 60. Which of the following is the most appropriate way to handle schema evolution (adding a new column) in a streaming pipeline that writes to a BigQuery table? A) Disable schema auto-detect and manually update the table schema before deployment. B) Use BigQuery’s “allow field addition” option in the load job configuration. C) Create a new table with the updated schema and switch the pipeline to write there. D) Add the column as a repeated field to avoid schema changes. Answer: B Explanation: BigQuery streaming inserts support schema auto-evolution if the allowFieldAddition option is enabled, allowing new columns to be added without downtime. Question 61. Which GCP service provides a managed, serverless environment for executing containerized workloads triggered by HTTP requests, suitable for lightweight model inference? A) Cloud Functions B) Cloud Run C) App Engine Standard D) Compute Engine Answer: B Explanation: Cloud Run runs containers in a fully managed, autoscaling environment that responds to HTTP requests. Question 62. In Cloud Monitoring, which type of metric is best suited for tracking the number of messages awaiting processing in a Pub/Sub subscription?