Courseiva

CCNA Pde Storing Data Questions

68 questions · Pde Storing Data topic · All types, answers revealed

1
MCQhard

A healthcare organization stores patient data in BigQuery. They need to encrypt a specific column (e.g., SSN) using a key they manage, and decrypt it only for authorized queries via a user-defined function. Which approach should they use?

A.Use BigQuery AEAD encryption functions with a Cloud KMS key
B.Use BigQuery column-level access controls
C.Use Cloud Key Management Service (Cloud KMS) with CMEK for the BigQuery dataset
D.Use Cloud Data Loss Prevention (DLP) to de-identify the column
AnswerA

AEAD functions allow encrypting specific columns and decrypting via a SQL function, using keys from Cloud KMS.

Why this answer

BigQuery AEAD encryption functions (e.g., `AEAD.ENCRYPT` and `AEAD.DECRYPT`) allow you to encrypt a specific column using a customer-managed key stored in Cloud KMS, and then decrypt it only within a user-defined function (UDF) that enforces access controls. This meets the requirement of per-column encryption with key management and authorized decryption via a UDF.

Exam trap

A common mistake is to choose dataset-level encryption (CMEK) because it involves Cloud KMS, but CMEK does not allow per-column encryption or UDF-controlled decryption. The correct approach uses BigQuery AEAD encryption functions with a Cloud KMS key for column-level encryption and authorized decryption via a UDF.

How to eliminate wrong answers

Option B is wrong because BigQuery column-level access controls only restrict who can see the column, but they do not encrypt the data at rest or in transit, so the data remains in plaintext and does not satisfy the encryption requirement. Option C is wrong because Cloud KMS with CMEK encrypts the entire BigQuery dataset at the storage level, not a specific column, and decryption is automatic for authorized users, not controlled via a UDF. Option D is wrong because Cloud DLP de-identifies data (e.g., masking or tokenization) but is not designed for reversible encryption with a customer-managed key and UDF-based decryption; it is typically used for static de-identification, not dynamic per-query decryption.

2
Multi-Selecthard

A data engineer needs to create a unified table that combines data from Cloud Storage (Parquet files) and BigQuery native tables, with fine-grained access control and governance. Which three Google Cloud features should they use together? (Choose THREE.)

Select 3 answers
A.BigQuery
B.Dataproc
C.BigLake
D.Cloud Storage
E.Cloud SQL
AnswersA, C, D

BigQuery is used for both native tables and the unified query engine.

Why this answer

BigQuery is correct because it serves as the unified query engine that can read data from both Cloud Storage (via external tables or BigLake) and native BigQuery tables, enabling a single SQL interface for analysis. It also integrates with fine-grained access control through row-level security and column-level access policies, and supports governance via Data Catalog and VPC Service Controls.

Exam trap

The trap here is that candidates may confuse Dataproc (a processing engine) with a storage or query service, or think Cloud SQL can handle Parquet files, when the correct combination requires BigQuery, BigLake, and Cloud Storage to achieve unified querying and governance.

3
Multi-Selectmedium

A company has a data lake on Cloud Storage with raw data in the 'raw' bucket, curated data in 'curated', and processed data in 'processed'. They want to implement lifecycle management to reduce costs. Which TWO actions should they take? (Choose 2)

Select 2 answers
A.Set a lifecycle rule to change storage class from Standard to Nearline after 30 days for the 'raw' bucket.
B.Enable object versioning on all buckets to automatically delete older versions.
C.Set a partition expiration on BigQuery tables that reference data in the 'processed' bucket.
D.Set a lifecycle rule to delete objects older than 365 days in the 'curated' and 'processed' buckets.
E.Set a lifecycle rule to change storage class from Standard to Archive after 30 days for the 'raw' bucket.
AnswersA, D

Nearline has a 30-day minimum storage duration, ideal for data accessed less than once a month.

Why this answer

Setting a lifecycle rule to change storage class from Standard to Nearline after 30 days for the 'raw' bucket reduces costs while maintaining quick access to frequently needed raw data. For 'curated' and 'processed' buckets, deleting objects older than 365 days is appropriate because these datasets are typically intermediate or final and can be removed after a retention period. Option B (object versioning) does not automatically delete older versions; it preserves them.

Option C (partition expiration on BigQuery) applies to BigQuery tables, not Cloud Storage objects. Option E (changing to Archive after 30 days) is less cost-effective than Nearline for raw data that may still be accessed occasionally.

Exam trap

Candidates may confuse BigQuery table expiration with Cloud Storage lifecycle rules, or assume that Archive storage is always cheaper than Nearline without considering access needs.

4
MCQmedium

A company uses Cloud Spanner and needs to store a parent-child relationship where the child table is frequently queried together with the parent. The parent has millions of rows and the child billions. Which Spanner feature optimizes performance for this pattern?

A.Partitioned tables
B.Interleaved tables
C.Secondary indexes
D.Change streams
AnswerB

Interleaved tables store child rows physically with the parent row, optimizing joins.

Why this answer

Interleaved tables in Cloud Spanner co-locate parent and child rows on the same split, reducing cross-node communication when joining. Secondary indexes are for lookups, not co-location. Partitioning is not a Spanner concept.

5
MCQmedium

A data engineer needs to enforce that all datasets in a project expire after 90 days to reduce storage costs. They want to automate this without manual intervention. Which approach should they use?

A.Use Cloud Storage lifecycle rules to delete tables after 90 days
B.Create an IAM policy that revokes access after 90 days
C.Use BigQuery scheduled queries to delete tables older than 90 days
D.Set a default table expiration on each BigQuery dataset to 90 days
AnswerD

BigQuery dataset properties allow setting a default table expiration, automatically deleting tables after the specified days.

Why this answer

BigQuery datasets support a default table expiration setting that automatically deletes tables after a specified number of days. This enforces a 90-day lifecycle for all tables in the dataset without requiring manual intervention or external automation, directly addressing the cost reduction goal.

Exam trap

A common mistake is applying Cloud Storage lifecycle rules to BigQuery tables. BigQuery has its own table expiration settings at the dataset level, which are distinct from Cloud Storage object lifecycle management.

How to eliminate wrong answers

Option A is wrong because Cloud Storage lifecycle rules apply to objects in Cloud Storage buckets, not to BigQuery tables; BigQuery tables are stored separately and cannot be managed by Cloud Storage lifecycle policies. Option B is wrong because IAM policies control access permissions, not data lifecycle; revoking access does not delete tables or reduce storage costs. Option C is wrong because BigQuery scheduled queries can delete tables but require writing and maintaining custom SQL scripts and scheduling logic, introducing complexity and potential failure points, whereas a default table expiration is a declarative, server-managed setting that requires no ongoing maintenance.

6
Multi-Selectmedium

A data engineer needs to restrict access to BigQuery datasets such that only data from approved VPC networks can query them. They also need to audit data access. Which two security controls should they implement? (Choose two.)

Select 2 answers
A.Cloud Audit Logs
B.Customer-managed encryption keys (CMEK)
C.Data Loss Prevention (DLP)
D.IAM roles
E.VPC Service Controls
AnswersA, E

Audit logs record data access for auditing and monitoring.

Why this answer

Cloud Audit Logs (option A) is correct because it provides a record of all administrative and data-access operations on BigQuery datasets, enabling the data engineer to audit who accessed what data and from which network. This satisfies the requirement to audit data access by capturing detailed logs of API calls, including the identity of the caller and the source IP address.

Exam trap

Google Cloud often tests the distinction between identity-based controls (IAM) and network-based controls (VPC Service Controls), leading candidates to mistakenly choose IAM roles when the requirement explicitly specifies restricting access by VPC network rather than by user identity.

7
MCQhard

A financial services company uses Cloud Bigtable to store trade data. They are experiencing hot-spotting on a single node, causing high latency. The row key format is [trade_id]#[timestamp]. Which row key design change would BEST distribute writes across tablets?

A.Use a hashed prefix of the trade_id, e.g., [hash(trade_id)]#[trade_id]#[timestamp]
B.Use a single row key of [timestamp]
C.Increase the number of Bigtable nodes to 20
D.Change row key to [timestamp]#[trade_id]
AnswerA

A hash prefix distributes writes across tablets by randomizing the start of the row key, reducing hot-spotting.

Why this answer

Adding a hashed prefix of the trade_id ensures that writes are evenly distributed across all Bigtable tablets. Bigtable partitions data by row key lexicographic order; without a hash, sequential trade IDs or timestamps cause all recent writes to land on a single tablet, creating a hotspot. The hash spreads the write load uniformly, regardless of the underlying key pattern.

Exam trap

A common trap in the Google Professional Data Engineer exam is confusing the order of key components. Simply reversing the order (e.g., putting the timestamp first) is often incorrectly thought to solve hot-spotting, but any monotonically increasing value at the start of the key will still cause a hotspot because Bigtable stores rows in lexicographic order.

How to eliminate wrong answers

Option B is wrong because using a single row key of [timestamp] would cause all writes with the same timestamp to collide on one row, creating an extreme hotspot and violating Bigtable's requirement for unique, distributed row keys. Option C is wrong because increasing the number of nodes does not fix a row key design flaw; Bigtable cannot rebalance writes if the row key pattern forces all traffic to a single tablet, and adding nodes only helps if the load is already distributed. Option D is wrong because reversing the order to [timestamp]#[trade_id] still places all writes with the same timestamp adjacent in lexicographic order, so recent timestamps will still hotspot on a single tablet; it does not introduce the randomness needed for distribution.

8
MCQmedium

An application requires a globally distributed, strongly consistent database with 99.999% availability SLA. The workload is OLTP with high throughput across continents. Which service fits best?

A.Cloud SQL with cross-region replicas
B.Firestore
C.Cloud Bigtable
D.Cloud Spanner
AnswerD

Correct: global distribution, strong consistency, 99.999% SLA.

Why this answer

Cloud Spanner is the only service that provides globally distributed, strongly consistent (external consistency via TrueTime) OLTP with 99.999% availability SLA. It supports high-throughput ACID transactions across continents using synchronous replication and atomic clocks, meeting all stated requirements.

Exam trap

Candidates often confuse Cloud SQL cross-region replicas as providing strong consistency, but those replicas are eventually consistent due to asynchronous replication, and they do not meet the 99.999% SLA.

How to eliminate wrong answers

Option A is wrong because Cloud SQL with cross-region replicas uses asynchronous replication, which cannot guarantee strong consistency across regions and offers only a 99.95% SLA for regional instances, not 99.999%. Option B is wrong because Firestore is a NoSQL document database that provides strong consistency only within a single region; its multi-region mode uses eventual consistency for global reads, and it lacks the ACID transaction support needed for high-throughput OLTP across continents. Option C is wrong because Cloud Bigtable is a wide-column NoSQL database designed for analytical workloads with high throughput, but it does not support SQL queries, ACID transactions, or strong consistency across regions; it offers only single-row transactions and eventual consistency for multi-cluster replication.

9
MCQmedium

A company wants to run hybrid transactional and analytical workloads on a PostgreSQL-compatible database with high performance. Which service should they choose?

A.Cloud Spanner
B.Cloud SQL for PostgreSQL
C.BigQuery
D.AlloyDB
AnswerD

Correct: AlloyDB has a columnar engine for analytics and is PostgreSQL-compatible.

Why this answer

AlloyDB is the correct choice because it is a fully managed PostgreSQL-compatible database service specifically designed for high-performance hybrid transactional and analytical workloads. It combines transactional processing with built-in columnar analytics, delivering up to 4x faster transactional performance and up to 100x faster analytical queries than standard PostgreSQL, without requiring any schema changes or ETL.

Exam trap

Google often tests the distinction between 'PostgreSQL-compatible' and 'PostgreSQL-based' — candidates mistakenly choose Cloud SQL for PostgreSQL because it is a managed PostgreSQL service, but they overlook the specific requirement for hybrid transactional and analytical workloads, which AlloyDB uniquely addresses with its integrated columnar engine.

How to eliminate wrong answers

Option A is wrong because Cloud Spanner is a globally distributed, strongly consistent relational database that is not PostgreSQL-compatible (it uses GoogleSQL or standard SQL with Spanner-specific extensions) and is optimized for horizontal scaling across regions, not for hybrid transactional/analytical workloads with PostgreSQL compatibility. Option B is wrong because Cloud SQL for PostgreSQL is a fully managed PostgreSQL service but is designed primarily for transactional (OLTP) workloads and lacks the built-in columnar engine and analytical acceleration needed for hybrid workloads, resulting in significantly slower analytical queries. Option C is wrong because BigQuery is a serverless, highly scalable data warehouse for analytical (OLAP) workloads, not a transactional database, and it is not PostgreSQL-compatible (it uses BigQuery SQL).

10
MCQmedium

A company needs to store petabytes of time-series IoT sensor data and query it with single-digit millisecond latency at millions of reads per second. The data has a simple key-value structure with timestamps. Which Google Cloud database is MOST appropriate?

A.BigQuery
B.Firestore
C.Cloud Bigtable
D.Cloud Spanner
AnswerC

Bigtable is the correct choice: wide-column NoSQL, designed for time-series and IoT workloads, single-digit ms latency, and scales to millions of QPS with additional nodes.

Why this answer

Cloud Bigtable is the correct choice because it is a fully managed, scalable NoSQL database designed for large analytical and operational workloads, offering consistent sub-10ms latency for high-throughput reads and writes. It natively supports time-series data with row key design optimized for timestamp-based queries, and can handle millions of reads per second across petabytes of data, making it ideal for IoT sensor data.

Exam trap

A common pitfall is assuming BigQuery is suitable for real-time, high-throughput key-value lookups because of its speed on analytical queries, but BigQuery is not designed for point reads at millions of operations per second with single-digit millisecond latency.

How to eliminate wrong answers

Option A is wrong because BigQuery is a serverless data warehouse optimized for complex analytical SQL queries on large datasets, not for single-digit millisecond point lookups at millions of reads per second; its latency is typically in the hundreds of milliseconds to seconds. Option B is wrong because Firestore is a mobile/document database designed for real-time sync and moderate throughput, not for petabyte-scale time-series data with millions of reads per second; it has throughput limits and higher latency for such workloads. Option D is wrong because Cloud Spanner is a globally distributed relational database with strong consistency and SQL support, but it is overkill for simple key-value time-series data and incurs higher latency and cost compared to Bigtable for this specific use case.

11
MCQeasy

A mobile app needs an offline-first NoSQL database that syncs data across devices when connectivity is available. Which Google Cloud database meets these requirements?

A.Memorystore
B.Cloud SQL
C.Bigtable
D.Firestore
AnswerD

Firestore provides offline data persistence and automatic sync, perfect for mobile apps.

Why this answer

Firestore is a NoSQL, serverless, offline-first database that automatically syncs data across devices when connectivity is restored. It provides built-in offline persistence and real-time synchronization, making it ideal for mobile apps that need to work offline and sync later.

Exam trap

The trap here is that candidates may confuse Google Bigtable's NoSQL label with a mobile-friendly NoSQL database, overlooking that Bigtable is designed for high-throughput analytical workloads, not for offline-first mobile sync with real-time listeners.

How to eliminate wrong answers

Option A is wrong because Memorystore is a fully managed in-memory cache (Redis/Memcached) designed for caching and session storage, not a persistent NoSQL database with offline sync capabilities. Option B is wrong because Cloud SQL is a relational (SQL) database, not a NoSQL database, and it does not offer offline-first or cross-device sync features. Option C is wrong because Bigtable is a wide-column NoSQL database optimized for large analytical workloads, not for mobile app offline sync with real-time updates.

12
Multi-Selectmedium

A company needs to store transactional data for a global customer base with strong consistency and 99.999% availability SLA. They anticipate millions of transactions per day across multiple regions. Which TWO storage options meet these requirements? (Choose 2)

Select 2 answers
A.Cloud Bigtable
B.AlloyDB
C.Firestore (in Datastore mode)
D.Cloud SQL (with HA)
E.Cloud Spanner
AnswersC, E

Firestore (in Datastore mode) offers a globally distributed, strongly consistent document database with a 99.999% SLA, meeting both requirements.

Why this answer

Cloud Spanner and Firestore (in Datastore mode) both provide globally distributed, strongly consistent transactions with a 99.999% SLA. Cloud Spanner offers a relational model with ACID across regions, while Firestore (Datastore mode) provides a schemaless document database with strong consistency and multi-region replication. Cloud Bigtable does not offer strong consistency across rows.

AlloyDB and Cloud SQL with HA are regional services, not global, and do not meet the 99.999% SLA across multiple regions.

Exam trap

Candidates may incorrectly assume that only Cloud Spanner meets the strict combination of strong consistency and 99.999% global SLA, but Firestore (Datastore mode) also meets both requirements. Regional services like AlloyDB or Cloud SQL with HA cannot provide global strong consistency across multiple regions.

13
MCQeasy

An organization needs to store transactional data for a global e-commerce platform with strong consistency across regions and an SLA of 99.999% availability. The application requires SQL semantics with horizontal scaling. Which Google Cloud database should they choose?

A.Firestore
B.Cloud SQL
C.Cloud Spanner
D.Cloud Bigtable
AnswerC

Spanner is globally distributed, provides strong consistency, and offers 99.999% availability SLA, matching the requirements.

Why this answer

Cloud Spanner is the correct choice because it provides globally distributed, strongly consistent SQL semantics with horizontal scaling and a 99.999% availability SLA. It uses synchronous replication and the TrueTime API to ensure external consistency across regions, meeting the strict consistency and uptime requirements of a global e-commerce platform.

Exam trap

The trap here is that candidates often confuse Cloud Spanner with Cloud SQL, assuming any SQL database can scale horizontally, but Cloud SQL is a single-region, vertically scaled service, while Cloud Spanner is the only Google Cloud database that combines SQL, horizontal scaling, and global strong consistency with a 99.999% SLA.

How to eliminate wrong answers

Option A is wrong because Firestore is a NoSQL document database that does not support SQL semantics; it offers strong consistency only within a single region and lacks the global consistency and 99.999% SLA required. Option B is wrong because Cloud SQL is a traditional relational database that supports SQL but cannot horizontally scale across regions; it is limited to a single region and provides up to 99.95% availability, not 99.999%. Option D is wrong because Cloud Bigtable is a NoSQL wide-column database that does not support SQL semantics and provides only eventual consistency, not the strong consistency required for transactional data.

14
Multi-Selectmedium

A company is designing a data lake on Cloud Storage with different zones. They need to enforce data retention so that objects in the 'raw' zone are automatically deleted after 1 year. Which TWO actions should they take? (Choose 2 correct options)

Select 2 answers
A.Use a bucket retention policy with a retention period of 1 year
B.Configure a Cloud Storage object lifecycle rule with a Delete action
C.Set an IAM policy to prevent deletion of objects
D.Create a Cloud Function to check object age and delete them
E.Apply a lifecycle rule that deletes objects with the prefix 'raw/'
AnswersB, E

Lifecycle rules can delete objects automatically based on age.

Why this answer

Cloud Storage object lifecycle management allows you to set rules that automatically delete objects after a specified age. By configuring a lifecycle rule with a Delete action and setting the condition to 'Age: 365 days', objects in the 'raw' zone will be automatically removed after 1 year, meeting the retention requirement without manual intervention.

Exam trap

The trap here is confusing retention policies (which prevent deletion) with lifecycle rules (which trigger deletion), leading candidates to incorrectly select Option A thinking it enforces deletion rather than preventing it.

15
MCQeasy

A marketing team needs to run ad-hoc SQL queries on terabytes of clickstream data stored in Parquet files in Cloud Storage. They want a serverless solution with no cluster management and the ability to query external data without loading. Which service should they use?

A.Cloud SQL
B.AlloyDB
C.Dataproc with Spark SQL
D.BigQuery with external tables
AnswerD

BigQuery external tables let you query Parquet files in GCS without loading, serverless.

Why this answer

BigQuery with external tables allows querying data stored in Cloud Storage (including Parquet files) without loading it into BigQuery storage, providing a serverless, fully managed solution with no cluster management. This matches the requirement for ad-hoc SQL queries on terabytes of clickstream data in Parquet format, as BigQuery automatically scales compute and storage.

Exam trap

The trap here is that candidates may choose Dataproc with Spark SQL (Option C) because it can query Parquet files, but they overlook the 'serverless' and 'no cluster management' requirement, which BigQuery satisfies natively without any cluster provisioning.

How to eliminate wrong answers

Option A is wrong because Cloud SQL is a fully managed relational database for OLTP workloads, not designed for petabyte-scale analytical queries on external Parquet files, and requires data to be loaded into its storage. Option B is wrong because AlloyDB is a PostgreSQL-compatible database optimized for transactional and hybrid workloads, not a serverless query engine for external data in Cloud Storage, and it requires data to be imported. Option C is wrong because Dataproc with Spark SQL requires cluster management (even if ephemeral) and is not serverless; it also involves provisioning and scaling clusters, contradicting the 'no cluster management' requirement.

16
Multi-Selectmedium

A company needs a fully managed, PostgreSQL-compatible database that supports both transactional (OLTP) and analytical (OLAP) workloads with low latency. They want to minimize operational overhead. Which two Google Cloud services should they consider? (Choose two.)

Select 2 answers
A.Cloud SQL for PostgreSQL
B.Cloud Spanner
C.AlloyDB with BigQuery as a federated source
D.BigQuery
E.AlloyDB
AnswersC, E

AlloyDB handles OLTP, and BigQuery can query it via federated queries for analytics, but the question asks for services to consider; AlloyDB alone may suffice, but combining with BigQuery adds analytics power.

Why this answer

AlloyDB is a fully managed PostgreSQL-compatible database service designed for both transactional (OLTP) and analytical (OLAP) workloads with low latency. By using BigQuery as a federated source, you can run analytical queries directly against AlloyDB data without moving it, combining operational and analytical capabilities while minimizing operational overhead.

Exam trap

The misconception that a single database service must be either purely transactional or purely analytical is common; the correct answer leverages a combination of AlloyDB for OLTP and BigQuery federation for OLAP to meet both requirements with low operational overhead.

17
MCQhard

A company is using BigQuery for analytics and needs to ensure that certain columns containing PII are encrypted with a customer-managed key (CMEK). Which approach should they take?

A.Use Cloud Data Loss Prevention (DLP) to mask the columns during query.
B.Use BigQuery column-level encryption with AEAD functions and a Cloud KMS key.
C.Apply CMEK at the dataset level; all tables inherit the encryption.
D.Store the data encrypted in Cloud Storage and use external tables with a CMEK.
AnswerB

Correct: AEAD functions enable column-level encryption with CMEK.

Why this answer

BigQuery column-level encryption using AEAD (Authenticated Encryption with Associated Data) functions allows you to encrypt specific columns containing PII with a customer-managed key (CMEK) stored in Cloud KMS. This approach provides granular, field-level encryption that meets compliance requirements without affecting the rest of the table or dataset, and the encryption/decryption is performed transparently within BigQuery using the AEAD.DECRYPT_STRING function.

Exam trap

Google often tests the distinction between dataset-level encryption (CMEK at the dataset or table level) and column-level encryption; the trap here is that candidates assume CMEK applies only at the dataset level, missing that BigQuery supports field-level encryption via AEAD functions with Cloud KMS keys for granular control.

How to eliminate wrong answers

Option A is wrong because Cloud DLP masking is a data loss prevention technique that obscures data at query time but does not encrypt the underlying stored data with a CMEK; it is a transformation applied on the fly, not persistent encryption. Option C is wrong because CMEK at the dataset level encrypts the entire dataset's underlying storage (e.g., table files), but it does not provide column-level granularity; all columns are encrypted uniformly, and you cannot selectively encrypt only PII columns. Option D is wrong because storing data encrypted in Cloud Storage and using external tables with a CMEK would require managing encryption outside BigQuery and does not leverage BigQuery's native column-level encryption capabilities; external tables also have performance and feature limitations compared to native BigQuery tables.

18
Multi-Selectmedium

A company is building a data lake on Cloud Storage. They need to organise data into zones for raw, curated, and processed layers. Which TWO practices should they follow? (Choose 2.)

Select 2 answers
A.Use the same storage class for all zones to simplify management.
B.Use separate Cloud Storage buckets for each zone (raw, curated, processed).
C.Set retention policies on the raw zone to make data immutable.
D.Enable object versioning on all buckets to prevent data loss.
E.Use a single bucket with different prefixes (e.g., /raw, /curated, /processed).
AnswersB, E

Separate buckets provide logical isolation, enabling different permissions, lifecycle policies, and storage classes per zone, which is a recommended practice.

Why this answer

A data lake typically uses separate buckets or prefixes for raw (immutable), curated (cleaned/transformed), and processed (aggregated/reporting) data. Using prefixes within a single bucket is common, but separate buckets provide better isolation. Lifecycle rules can be applied per prefix or bucket.

19
MCQhard

An organization wants to enforce that data in a Cloud Storage bucket cannot be deleted or overwritten for 7 years due to regulatory compliance. Which Cloud Storage feature should they use?

A.Retention Policy with Bucket Lock
B.IAM conditions
C.Object Lifecycle Management
D.Object holds
AnswerA

Retention Policy prevents deletion/overwrites; Bucket Lock makes it immutable.

Why this answer

Retention Policy with a retention period ensures objects cannot be deleted or overwritten during that period. Bucket Lock makes the policy permanent. Object holds are per-object.

Lifecycle management automates transitions/deletions, opposite of retention.

20
MCQeasy

A data engineer needs to store transactional data for an e-commerce application that requires ACID compliance, automatic failover, and point-in-time recovery. The expected throughput is a few thousand transactions per second. Which Google Cloud storage option should they choose?

A.Firestore
B.Cloud Bigtable
C.Cloud SQL
D.Cloud Spanner
AnswerC

Cloud SQL provides ACID compliance, high availability, and PITR for moderate OLTP workloads.

Why this answer

Cloud SQL is the correct choice because it provides full ACID compliance, automated failover with high availability configurations, and point-in-time recovery via binary log replay. It supports up to several thousand transactions per second with appropriate machine sizing, making it suitable for this e-commerce workload.

Exam trap

The trap here is that candidates often choose Cloud Spanner for any ACID requirement, overlooking that Cloud SQL is the cost-effective and simpler choice for single-region transactional workloads with moderate throughput.

How to eliminate wrong answers

Option A is wrong because Firestore is a NoSQL document database that does not support ACID transactions across multiple documents in the same way as a relational database, and it lacks point-in-time recovery as a built-in feature. Option B is wrong because Cloud Bigtable is a wide-column NoSQL database optimized for high-throughput analytical workloads (millions of ops/sec), not for ACID-compliant transactional workloads with point-in-time recovery. Option D is wrong because Cloud Spanner is a globally distributed relational database that provides ACID compliance and strong consistency, but it is overkill for a few thousand transactions per second and introduces unnecessary complexity and cost compared to Cloud SQL for this scale.

21
MCQmedium

A data engineer wants to create a data lake on Google Cloud for storing raw streaming data, then transform it into curated and processed zones for analytics. The data is in Avro format and will be queried by BigQuery. Which two services are MOST suitable as the primary storage and query interface?

A.Cloud Storage and BigQuery
B.Cloud Storage and Dataproc
C.Cloud Storage and Cloud SQL
D.Cloud Storage and Firestore
AnswerA

Cloud Storage stores the Avro files in zones, and BigQuery queries them via external tables or loaded tables.

Why this answer

Cloud Storage is the most suitable primary storage for a data lake because it provides scalable, durable, and cost-effective object storage for raw Avro data. BigQuery is the ideal query interface because it can directly query Avro files stored in Cloud Storage using external tables, and it supports serverless analytics without needing to manage infrastructure.

Exam trap

Common misconception: candidates often think a processing engine like Dataproc is required to query Avro data in a data lake, but BigQuery can natively query Avro files stored in Cloud Storage without the need for intermediate processing.

How to eliminate wrong answers

Option B is wrong because Dataproc is a managed Spark/Hadoop service for batch processing, not a primary query interface for ad-hoc analytics; it would add unnecessary complexity and latency compared to BigQuery's direct Avro querying. Option C is wrong because Cloud SQL is a relational database for transactional workloads, not designed for large-scale analytics on Avro data in a data lake, and it cannot directly query Avro files. Option D is wrong because Firestore is a NoSQL document database for real-time applications, not suitable for analytical queries on large volumes of streaming data in Avro format.

22
MCQeasy

A team needs to store transactional data for an e-commerce application that requires ACID transactions, automatic backups, and point-in-time recovery. The expected workload is under 10,000 QPS. Which database should they choose?

A.Cloud Bigtable
B.Cloud SQL
C.Firestore
D.Cloud Spanner
AnswerB

Correct choice: ACID, backups, PITR, fits OLTP under 10k QPS.

Why this answer

Cloud SQL is the correct choice because it provides fully managed relational databases (MySQL, PostgreSQL, SQL Server) with built-in ACID transaction support, automated backups, and point-in-time recovery (PITR) via binary logs or write-ahead logs. The workload of under 10,000 QPS is well within Cloud SQL's performance envelope, making it a cost-effective and operationally simple solution for transactional e-commerce data.

Exam trap

The trap here is that candidates often choose Cloud Spanner for any workload requiring ACID transactions and high availability, overlooking that Cloud SQL is sufficient and more cost-effective for sub-10,000 QPS workloads, and that Cloud Spanner's global distribution and strong consistency come with a significant price premium.

How to eliminate wrong answers

Option A is wrong because Cloud Bigtable is a NoSQL, wide-column database designed for high-throughput analytical workloads (millions of QPS) and does not support ACID transactions or SQL queries, making it unsuitable for transactional e-commerce data. Option C is wrong because Firestore is a NoSQL document database that, while supporting transactions, does not offer the full ACID guarantees across multiple documents in the same way as a relational database, and its automatic backup and PITR capabilities are limited compared to Cloud SQL. Option D is wrong because Cloud Spanner is a globally distributed, horizontally scalable relational database that supports ACID transactions and PITR, but it is overkill and significantly more expensive for a workload under 10,000 QPS, which can be handled more cost-effectively by Cloud SQL.

23
MCQeasy

Which Google Cloud service is a fully managed relational database for MySQL, PostgreSQL, and SQL Server, offering automatic replication and backups?

A.Cloud Spanner
B.AlloyDB
C.Bigtable
D.Cloud SQL
AnswerD

Correct: Cloud SQL supports MySQL, PostgreSQL, and SQL Server with automatic backups and replication.

Why this answer

Cloud SQL is the correct answer because it is Google Cloud's fully managed relational database service that supports MySQL, PostgreSQL, and SQL Server. It provides automatic replication across zones and automated backups, making it the ideal choice for traditional relational database workloads without the need for manual administration.

Exam trap

The trap here is that candidates often confuse Cloud SQL with Cloud Spanner because both are relational databases, but Cloud Spanner is designed for global scale and does not support MySQL, PostgreSQL, or SQL Server compatibility.

How to eliminate wrong answers

Option A is wrong because Cloud Spanner is a globally distributed, horizontally scalable relational database service that supports strong consistency and SQL, but it is not a fully managed service for MySQL, PostgreSQL, or SQL Server; it uses its own proprietary SQL dialect and is designed for sharded, multi-region deployments. Option B is wrong because AlloyDB is a fully managed PostgreSQL-compatible database service optimized for high performance and transactional workloads, but it does not support MySQL or SQL Server. Option C is wrong because Bigtable is a fully managed, scalable NoSQL wide-column database service, not a relational database, and it does not support MySQL, PostgreSQL, or SQL Server.

24
MCQmedium

A company wants to build a data lake on Cloud Storage for raw, curated, and processed data zones. They need to enforce data governance including column-level security and row-level filtering for BigQuery queries. Which solution should they use?

A.BigLake tables over Cloud Storage
B.BigQuery external tables reading from GCS
C.Dataproc with Spark SQL
D.Cloud Storage with IAM and VPC Service Controls
AnswerA

BigLake provides fine-grained access control (column-level and row-level security) via BigQuery, along with a unified lakehouse.

Why this answer

BigLake tables provide a unified governance layer over Cloud Storage data, enabling fine-grained access control such as column-level security and row-level filtering directly on BigQuery queries. This is achieved by integrating BigQuery's access control policies with the external data stored in GCS, without needing to move data into BigQuery native storage. The other options either lack these granular security features or require complex workarounds.

Exam trap

Google often tests the misconception that BigQuery external tables (Option B) can support the same fine-grained security as BigLake, but they cannot because external tables lack the integrated policy engine for column and row-level controls.

How to eliminate wrong answers

Option B is wrong because BigQuery external tables reading from GCS only support table-level IAM permissions and cannot enforce column-level security or row-level filtering; they treat the external data as a flat file without fine-grained access controls. Option C is wrong because Dataproc with Spark SQL does not natively provide column-level or row-level security on Cloud Storage data; it requires manual implementation via Spark's security APIs and does not integrate with BigQuery's governance model. Option D is wrong because Cloud Storage with IAM and VPC Service Controls only provides bucket- and object-level access control and network perimeter security, but cannot enforce column-level or row-level filtering on queries executed in BigQuery.

25
MCQeasy

A mobile app needs a NoSQL database that supports offline synchronization when the device goes offline and later reconnects. Which Google Cloud database should be used?

A.Firestore
B.Cloud Bigtable
C.Cloud Spanner
D.Cloud SQL
AnswerA

Document NoSQL with offline sync.

Why this answer

Firestore provides offline persistence for mobile and web apps. It caches data locally and syncs when online. Cloud SQL and Spanner are relational; Bigtable does not have offline sync.

26
MCQmedium

A company uses BigQuery for analytics and needs to ensure that certain columns containing PII are encrypted at query time so that only authorized users can decrypt. What should they use?

A.BigQuery AEAD encryption functions
B.VPC Service Controls
C.Customer-managed encryption keys (CMEK)
D.Fine-grained IAM roles
AnswerA

AEAD encrypts columns; access control via key access.

Why this answer

BigQuery AEAD encryption functions allow you to encrypt sensitive columns (e.g., PII) at query time using a user-managed key, so that only authorized users who possess the key can decrypt the data. This is the correct approach because it provides column-level, application-layer encryption that is transparent to the query engine and ensures that unauthorized users see only ciphertext.

Exam trap

In Google Cloud exams, a common trap is to assume that Customer-managed encryption keys (CMEK) provide column-level, application-layer encryption or query-time decryption control. CMEK only protects data at rest at the storage level, not at query time. The correct approach for column-level query-time encryption is to use BigQuery AEAD encryption functions.

How to eliminate wrong answers

Option B is wrong because VPC Service Controls provide network-level security boundaries to prevent data exfiltration, not column-level encryption at query time. Option C is wrong because Customer-managed encryption keys (CMEK) encrypt data at rest (storage layer), not at query time, and do not control per-user decryption access. Option D is wrong because Fine-grained IAM roles control access to tables or rows via row-level security, but they do not encrypt the data itself; authorized users still see plaintext PII.

27
MCQeasy

A startup is building a mobile app that needs to sync user data across devices in real time. They expect millions of concurrent users and need a NoSQL database with offline support and automatic multi-region replication. Which Google Cloud service meets these requirements?

A.Cloud Bigtable
B.Cloud Spanner
C.Firestore
D.Cloud SQL
AnswerC

Firestore offers real-time listeners, offline persistence, and automatic multi-region replication, ideal for mobile sync.

Why this answer

Firestore is a NoSQL, serverless document database that provides real-time synchronization, offline support via local persistence, and automatic multi-region replication. It is designed for mobile and web apps with millions of concurrent users, making it the ideal choice for this use case.

Exam trap

The trap here is that candidates often confuse Cloud Spanner's global SQL capabilities with NoSQL requirements, or assume Cloud Bigtable's NoSQL label fits all NoSQL workloads, ignoring the specific need for real-time sync and offline support.

How to eliminate wrong answers

Option A is wrong because Cloud Bigtable is a wide-column NoSQL database optimized for high-throughput analytical workloads (e.g., time-series, IoT), not for real-time sync or offline mobile app support, and it lacks built-in multi-region replication. Option B is wrong because Cloud Spanner is a globally distributed, strongly consistent relational SQL database, not a NoSQL database, and while it supports multi-region replication, it does not provide offline support for mobile clients. Option D is wrong because Cloud SQL is a managed relational SQL database (MySQL, PostgreSQL, SQL Server) that is not NoSQL, does not support offline mobile sync, and requires manual configuration for multi-region replication.

28
Multi-Selecthard

A company uses BigQuery for analytics on petabyte-scale data. They want to improve query performance by denormalizing schemas and reducing joins. Which TWO BigQuery features should they use? (Choose 2)

Select 2 answers
A.Clustering on frequently filtered columns
B.Using subqueries instead of JOINs
C.External tables reading from Cloud Storage
D.Table partitioning by date
E.Nested and repeated fields (ARRAY<STRUCT<...>>)
AnswersA, E

Clustering organizes data based on column values, improving filter performance and reducing scanned data. While it does not directly denormalize, it is essential for efficient queries on denormalized schemas.

Why this answer

For denormalizing schemas and reducing joins, BigQuery offers nested and repeated fields (ARRAY<STRUCT<...>>) to embed related data in a single row. Additionally, clustering on frequently filtered columns optimizes physical data layout, speeding up queries on denormalized tables. Together, these features improve query performance by minimizing data shuffling and enabling efficient filtering.

Exam trap

A common mistake is to think that only clustering or partitioning can replace denormalization, but nested/repeated fields are needed for schema denormalization. Clustering is a complementary physical optimization.

29
MCQhard

A company uses Cloud Spanner for a global e-commerce platform. They have a table of orders and a table of order items. To optimize performance for queries that join these tables on order_id, which Spanner schema design feature should they use?

A.Use Cloud Bigtable instead
B.Create a secondary index on order_id
C.Denormalize the order items into the orders table using repeated fields
D.Use interleaved tables with order_items as a child table of orders
AnswerD

Interleaving co-locates rows, improving join performance.

Why this answer

Interleaved tables store child rows physically with parent rows, reducing join latency. Secondary indexes are for filtering. Partitioned tables not in Spanner.

Denormalization could help but interleaved tables are the designed approach.

30
MCQmedium

A healthcare company must encrypt data in BigQuery with customer-managed keys (CMEK). They want to control the key lifecycle independently. Which approach should they take?

A.Use BigQuery column-level encryption (AEAD) with a key from Cloud KMS
B.Use Cloud KMS to create a key, then set it as the default encryption key for the BigQuery dataset
C.Enable default encryption on the Cloud Storage bucket used for staging data
D.Encrypt the data before loading using a custom application and store the key in Secret Manager
AnswerB

BigQuery CMEK is configured at the dataset level via Cloud KMS.

Why this answer

BigQuery supports CMEK through Cloud KMS. You can create a key ring and key in Cloud KMS, then specify it when creating datasets or tables. The key is used to encrypt data at rest.

Column-level encryption is separate and uses AEAD functions with customer-managed keys at the application level.

31
MCQmedium

A data engineer needs to design a schema in BigQuery for a dataset that contains customer orders. Each order has a header and multiple line items. Queries frequently need to retrieve the entire order including line items. Which schema design is MOST performant and cost-effective?

A.Store all data in a flat table with repeated order info per line item
B.Use nested and repeated fields (orders table with line items as REPEATED RECORD)
C.Normalize into separate orders and line_items tables, join on order_id
D.Use a partitioned table on order date
AnswerB

Nested/repeated fields allow storing order with line items in one row, eliminating joins.

Why this answer

BigQuery is optimized for denormalized schemas using nested and repeated fields (REPEATED RECORD). Storing line items as a repeated record within the orders table avoids expensive JOIN operations, reduces data shuffling, and allows BigQuery to scan only the necessary columns, making queries that retrieve entire orders with line items both faster and more cost-effective.

Exam trap

Google often tests the misconception that normalization (Option C) is always the best practice for relational databases, but in BigQuery's distributed, columnar architecture, denormalization with nested and repeated fields is the recommended pattern for performance and cost efficiency.

How to eliminate wrong answers

Option A is wrong because storing all data in a flat table with repeated order info per line item leads to massive data duplication (each line item repeats all order header fields), increasing storage costs and query scan size without leveraging BigQuery's native nested structure. Option C is wrong because normalizing into separate orders and line_items tables and joining on order_id introduces expensive JOIN operations that require shuffling and sorting large datasets, which is inefficient in BigQuery's distributed architecture and incurs higher slot usage and cost. Option D is wrong because partitioning on order date alone does not address the structural inefficiency of storing line items separately; while partitioning can improve query performance for date-range filters, it does not eliminate the need for JOINs or duplication, and the question specifically asks about retrieving entire orders with line items.

32
MCQmedium

A data engineer is designing a BigQuery table for a clickstream dataset with frequent queries aggregating over user sessions. Each user session has multiple events, and the engineer wants to avoid joins for performance. Which schema design pattern should they use?

A.Use a normalized schema with separate tables for sessions and events, then join on session ID
B.Store each event as a separate row with session key and use clustering on session ID
C.Use partitioning on event timestamp and clustering on user ID
D.Use nested and repeated fields to store events within each session row
AnswerD

Nested repeated fields allow storing events inside the session row, avoiding joins.

Why this answer

BigQuery supports nested and repeated fields (e.g., STRUCT and REPEATED), allowing denormalization. This reduces the need for joins and improves query performance. Partitioning and clustering are for physical data organization, not schema design.

33
Multi-Selectmedium

A company uses BigQuery partitioned tables with daily partitions for log data. They want to automatically delete partitions older than 90 days and ensure that current month data is in a specific dataset with a set expiration. Which TWO actions should they take? (Choose 2)

Select 2 answers
A.Set partition expiration to 90 days on the table
B.Cluster the table on a timestamp column
C.Create the table as a partitioned table by ingestion time
D.Set the table's default partition expiration to 90 days
E.Set a lifecycle management rule on Cloud Storage to delete objects older than 90 days
AnswersA, C

Correct. Setting partition expiration to 90 days on the table will automatically delete partitions older than that.

Why this answer

To automatically delete partitions older than 90 days, the table must be partitioned (option C creates a partitioned table by ingestion time) and have partition expiration set to 90 days (option A). Option D also sets partition expiration, but it's functionally identical to A. Since the question asks for two distinct actions, the correct choices are A and C, which together achieve the goal.

34
MCQeasy

An application needs to store user profile data in a document database with flexible schema. The data is accessed frequently from a mobile app. Which Google Cloud database is BEST suited?

A.Cloud Bigtable
B.BigQuery
C.Cloud Spanner
D.Cloud Firestore
AnswerD

Firestore stores JSON documents, ideal for flexible schema mobile apps.

Why this answer

Cloud Firestore is a NoSQL document database designed for mobile and web app development, offering flexible schema, real-time data synchronization, and automatic scaling. It directly supports frequent reads from mobile apps through its client SDKs and offline persistence, making it the best fit for storing user profile data with varying attributes.

Exam trap

The trap here is that candidates often confuse Cloud Firestore with Cloud Bigtable because both are NoSQL, but Bigtable lacks document flexibility, real-time sync, and mobile SDK support, which are essential for the described use case.

How to eliminate wrong answers

Option A is wrong because Cloud Bigtable is a wide-column NoSQL database optimized for high-throughput analytical and operational workloads (e.g., time-series, IoT), not for flexible document storage or mobile app real-time access. Option B is wrong because BigQuery is a serverless data warehouse for running SQL-based analytics on large datasets, not a transactional database for user profile reads/writes. Option C is wrong because Cloud Spanner is a globally distributed relational database with strong consistency and SQL support, but its rigid schema and higher latency for simple document operations make it overkill and less suitable for flexible schema mobile app data.

35
MCQmedium

A mobile app uses Firestore to store user profiles. The app allows offline data creation and syncing when connectivity resumes. Which Firestore feature should the developer enable?

A.Set up a Firestore trigger to cache data in Cloud Memorystore
B.Enable offline persistence in the Firestore client SDK
C.Use Cloud Storage signed URLs for offline access
D.Enable Firestore multi-region replication
AnswerB

Offline persistence allows local reads/writes and later syncs.

Why this answer

Firestore's offline persistence feature allows the client SDK to automatically cache data locally on the device. When the app creates or modifies data while offline, the SDK stores the changes in a local queue and syncs them with the Firestore backend once connectivity is restored. This is the correct and built-in mechanism for offline data creation and syncing.

Exam trap

Candidates often confuse Firestore's client-side offline persistence with server-side replication or caching features like multi-region replication or Cloud Memorystore, which are not designed for client-side offline data creation and syncing.

How to eliminate wrong answers

Option A is wrong because Cloud Memorystore is a managed Redis or Memcached service for caching in server-side applications, not a client-side offline cache; Firestore triggers are server-side functions that cannot cache data in Memorystore for offline client access. Option C is wrong because Cloud Storage signed URLs provide temporary, authenticated access to objects in Cloud Storage, not to Firestore documents, and they are used for online access, not offline data creation and syncing. Option D is wrong because multi-region replication improves availability and durability for Firestore databases but does not enable client-side offline caching or queuing of writes.

36
Multi-Selecthard

A multinational corporation needs a globally distributed database that supports strong consistency, SQL queries, and automatic failover across regions. They also want to optimize join performance for parent-child relationships. Which TWO features of Cloud Spanner should they use?

Select 2 answers
A.Strong consistency and automatic failover across regions
B.Secondary indexes
C.Bigtable as a caching layer
D.Read replicas for global distribution
E.Interleaved tables
AnswersA, E

Spanner's core features: globally consistent and automatic failover.

Why this answer

Cloud Spanner provides strong consistency and automatic failover across regions as core features. Strong consistency ensures that all reads return the most recent write, which is critical for globally distributed databases that require ACID transactions. Automatic failover across regions is built into Spanner's architecture using synchronous replication and Paxos-based consensus, enabling high availability without manual intervention.

Exam trap

Google often tests the distinction between secondary indexes and interleaved tables, where candidates mistakenly believe secondary indexes optimize parent-child joins, but interleaved tables are the correct feature for physical co-location and join performance.

37
Multi-Selecthard

A global fintech company needs a database that can serve transactional (OLTP) and analytical (OLAP) workloads with strong consistency. They require high availability and PostgreSQL compatibility. Which TWO Google Cloud databases meet these requirements? (Choose 2 correct options)

Select 2 answers
A.Cloud SQL
B.Cloud Bigtable
C.Cloud Spanner
D.BigQuery
E.AlloyDB
AnswersC, E

Strong consistency, globally distributed, OLTP+analytics via SQL, PostgreSQL interface available.

Why this answer

Cloud Spanner is correct because it provides a globally distributed, strongly consistent relational database service that supports both OLTP and OLAP workloads via PostgreSQL-compatible interfaces (including the PostgreSQL dialect). It offers high availability through synchronous replication across zones and regions, and its TrueTime-based atomic clocks ensure external consistency for transactions. AlloyDB is also correct because it is a fully PostgreSQL-compatible database service that delivers high availability and strong consistency.

It is designed to handle both transactional and analytical workloads using a combined row-store and columnar engine, enabling high-performance OLTP and real-time analytics within a single database. Both services meet the fintech company's requirements for PostgreSQL compatibility, strong consistency, and high availability.

Exam trap

A common mistake is to think that Cloud SQL or BigQuery can serve both OLTP and OLAP workloads with strong consistency, but Cloud SQL lacks global scaling and OLAP performance, and BigQuery is purely analytical without transactional support.

38
MCQeasy

A data engineer wants to store archived log files in Cloud Storage with a retention policy that prevents deletion for 5 years. Which feature should they use?

A.Object Lifecycle rule with Delete action after 5 years
B.Retention Policy on the bucket set to 5 years
C.Object Hold (temporal)
D.Versioning enabled
AnswerB

Retention policies ensure objects cannot be deleted or replaced until the retention period expires.

Why this answer

A retention policy on a Cloud Storage bucket enforces a minimum retention period for all objects in the bucket, preventing deletion or overwrite until the policy duration has elapsed. Setting it to 5 years ensures that archived log files cannot be deleted before that time, meeting the data engineer's requirement exactly. This is a bucket-level, immutable setting that applies to all objects, unlike object-level holds or lifecycle rules.

Exam trap

Google often tests the distinction between lifecycle rules that delete objects and retention policies that prevent deletion, so the trap here is assuming that a lifecycle rule with a Delete action can enforce a retention period, when in fact it does the opposite.

How to eliminate wrong answers

Option A is wrong because an Object Lifecycle rule with a Delete action after 5 years would automatically delete objects after 5 years, which is the opposite of preventing deletion; it does not enforce a retention period. Option C is wrong because an Object Hold (temporal) is a temporary hold placed on individual objects for a specific duration (e.g., days), not a bucket-wide policy for 5 years, and it is typically used for legal or compliance holds, not long-term retention. Option D is wrong because Versioning enabled preserves previous versions of objects but does not prevent deletion of the current version; it allows recovery after deletion but does not block deletion itself, so it does not enforce a retention policy.

39
MCQmedium

A data engineer needs to store raw sensor data in Cloud Storage and automatically transition it to a lower-cost storage class after 30 days, then delete it after 365 days. What should they configure?

A.Use Cloud Pub/Sub notifications to trigger a Cloud Function that moves objects.
B.Use gsutil rewrite command in a cron job.
C.Configure a lifecycle rule with SetStorageClass to Nearline after 30 days and Delete after 365 days.
D.Set a bucket retention policy with a retention period of 365 days.
AnswerC

Lifecycle rules can automatically transition objects to a different storage class and then delete them based on age.

Why this answer

Cloud Storage lifecycle management rules allow you to automatically transition objects to a lower-cost storage class (such as Nearline) after a specified number of days and then delete them after another period. This is the native, serverless way to manage object lifecycle without external scripts or compute resources.

Exam trap

Google Cloud often tests the distinction between lifecycle management (which automates transitions and deletions) and retention policies (which only prevent deletion/overwrites), leading candidates to confuse the two.

How to eliminate wrong answers

Option A is wrong because Cloud Pub/Sub notifications and Cloud Functions introduce unnecessary complexity and cost; lifecycle rules handle this natively without custom code. Option B is wrong because using gsutil rewrite in a cron job is a manual, error-prone approach that does not scale and incurs additional egress/operation costs; lifecycle rules are the intended automated solution. Option D is wrong because a bucket retention policy prevents deletion before the retention period ends, but it does not automatically transition objects to a lower-cost storage class; it only enforces immutability.

40
MCQmedium

A company needs to store petabytes of time-series IoT sensor data and query it with single-digit millisecond latency at millions of reads per second. The data has a simple key-value structure with timestamps. Which Google Cloud database is MOST appropriate?

A.Cloud Bigtable
B.BigQuery
C.Cloud Spanner
D.Firestore
AnswerA

Bigtable is the correct choice: wide-column NoSQL, designed for time-series and IoT workloads, single-digit ms latency, and scales to millions of QPS with additional nodes.

Why this answer

Cloud Bigtable is a fully managed, scalable NoSQL database designed for large analytical and operational workloads, handling petabytes of data with consistent sub-10ms latency at millions of reads per second. Its key-value storage model and automatic sharding make it ideal for time-series IoT sensor data with simple timestamp-based keys, supporting high-throughput, low-latency access without the overhead of relational features.

Exam trap

The trap here is assuming that 'petabytes of data' automatically means BigQuery, ignoring the critical requirement for single-digit millisecond latency at millions of reads per second. BigQuery is an analytical warehouse optimized for large-scale analytics, not for sub-10ms point lookups.

How to eliminate wrong answers

Option B (BigQuery) is wrong because it is a serverless data warehouse optimized for analytical SQL queries on large datasets, not for single-digit millisecond point reads at millions of operations per second; its latency is typically in the seconds range for interactive queries. Option C (Cloud Spanner) is wrong because it is a globally distributed relational database with strong consistency and ACID transactions, which introduces overhead unsuitable for the simple key-value time-series pattern and cannot match Bigtable's throughput for millions of reads per second. Option D (Firestore) is wrong because it is a mobile and web document database with limited throughput (up to 10,000 writes/second per database) and is not designed for petabyte-scale time-series data or sub-millisecond latency at millions of reads per second.

41
MCQeasy

Which Google Cloud service is a serverless, highly scalable data warehouse for analytical queries, supporting SQL and integration with BI tools?

A.Firestore
B.Cloud SQL
C.Cloud Spanner
D.BigQuery
AnswerD

Correct: BigQuery is the serverless analytics warehouse.

Why this answer

BigQuery is a serverless, highly scalable data warehouse designed for analytical queries over large datasets. It supports standard SQL and integrates seamlessly with BI tools like Looker and Tableau, making it the correct choice for this use case.

Exam trap

The trap here is that candidates may confuse Google Cloud Spanner's global scale and SQL support with data warehousing capabilities, but Spanner is optimized for transactional consistency, not analytical query performance or BI tool integration.

How to eliminate wrong answers

Option A is wrong because Firestore is a NoSQL document database for mobile and web app development, not a data warehouse for analytical SQL queries. Option B is wrong because Cloud SQL is a fully managed relational database for OLTP workloads, not a serverless data warehouse optimized for large-scale analytics. Option C is wrong because Cloud Spanner is a globally distributed, strongly consistent relational database service for transactional workloads, not a data warehouse designed for analytical queries and BI integration.

42
Multi-Selecteasy

A company needs to store and analyze large amounts of unstructured data (images, videos) and structured data (CSV logs) in a cost-effective manner. The data should be accessible for analytics with BigQuery. Which two services should they use? (Choose TWO.)

Select 2 answers
A.Cloud SQL
B.Cloud Spanner
C.BigQuery
D.Cloud Storage
E.Firestore
AnswersC, D

BigQuery can query data stored in Cloud Storage via external tables, enabling analytics.

Why this answer

Cloud Storage is the best option for storing unstructured and structured files cost-effectively. BigQuery can analyze this data directly via external tables or after loading, making it a powerful analytics platform.

43
MCQhard

An IoT application writes sensor readings to Cloud Bigtable with a row key of 'deviceID#timestamp'. The team notices high write latency and hotspots on a few nodes. Which row key design change would most likely improve performance?

A.Add a random prefix to the row key (e.g., hash of deviceID modulo 1000)
B.Reverse the key to 'timestamp#deviceID'
C.Use a single column family with many columns
D.Store all data in one row per device
AnswerA

Hashing the device ID distributes writes across tablet servers, reducing hotspots.

Why this answer

Prefixing timestamps can cause hotspots because writes go to the same tablet server for the same time range. Hashing the device ID or using a field-leveled design (e.g., deviceID inverted) distributes writes across nodes. Adding a random prefix helps but salting with a hash is more systematic.

44
MCQeasy

A data engineer wants to automatically move objects from Standard storage class to Nearline after 30 days, and then to Archive after 365 days. Which Cloud Storage feature should they configure?

A.Object Versioning
B.Retention Policy
C.Bucket Lock
D.Object Lifecycle rule with SetStorageClass actions
AnswerD

Lifecycle rules can change storage class based on object age.

Why this answer

Object Lifecycle rules in Google Cloud Storage allow you to automatically transition objects between storage classes (e.g., from Standard to Nearline after 30 days, then to Archive after 365 days) using the SetStorageClass action. This feature is specifically designed for automated lifecycle management, including deletion and class transitions, based on object age or other conditions.

Exam trap

Google often tests the distinction between lifecycle management (which changes storage classes) and retention/versioning features (which protect data but do not automate class transitions), leading candidates to confuse Object Versioning or Retention Policy with lifecycle rules.

How to eliminate wrong answers

Option A is wrong because Object Versioning is a feature that preserves non-current object versions to protect against accidental deletion or overwriting; it does not automate storage class transitions. Option B is wrong because Retention Policy is used to enforce a minimum retention period on objects, preventing deletion or modification, but it cannot change storage classes over time. Option C is wrong because Bucket Lock is a mechanism to permanently lock a retention policy, making it immutable; it does not provide any lifecycle-based storage class transitions.

45
MCQmedium

A company uses Cloud Storage as a data lake with raw, curated, and processed zones. Data in the raw zone should be automatically moved to a cheaper storage class after 30 days, and deleted after 1 year. What is the most efficient way to implement this?

A.Use Object Lifecycle Management with rules to transition to Coldline after 30 days and delete after 365 days.
B.Write a Cloud Function that runs daily, checks object ages, and moves/deletes them.
C.Use Cloud Scheduler to run a script that changes storage class and deletes objects.
D.Set a retention policy on the raw zone to prevent deletion and manually clean up.
AnswerA

Correct: Lifecycle rules automate this efficiently.

Why this answer

Object Lifecycle Management in Cloud Storage allows you to set rules based on object age. You can transition objects to a lower-cost storage class (e.g., Nearline or Coldline) after 30 days and delete after 365 days.

46
MCQmedium

A data engineer is building a data lake on Google Cloud and needs to separate raw ingested data, curated/cleaned data, and processed/aggregated data. Which Cloud Storage bucket structure is recommended?

A.Create three separate folders in a single bucket: raw, curated, processed.
B.Store all data in one bucket and use object labels to distinguish raw, curated, and processed.
C.Store raw data in a different project for security isolation.
D.Use different storage classes for raw, curated, and processed data within the same bucket.
AnswerA

Using prefixes (folders) within a bucket is a standard pattern for organizing data lake zones, allowing different lifecycle rules per prefix.

Why this answer

A common best practice for data lakes on GCS is to use separate buckets or folders within a bucket (e.g., raw, curated, processed) to manage different stages of data refinement and apply appropriate lifecycle policies.

47
MCQeasy

A company wants to use BigQuery to query data stored in Cloud Storage as Parquet files without loading the data into BigQuery storage. Which feature should they use?

A.BigQuery ingestion from Cloud Storage using load jobs
B.Cloud Storage FUSE to mount bucket and query
C.BigQuery federated queries with Cloud Storage
D.BigQuery external tables
AnswerD

External tables enable querying data directly in Cloud Storage without loading.

Why this answer

BigQuery external tables allow querying data stored in Cloud Storage (including Parquet files) directly without loading it into BigQuery storage. This is achieved by defining a table schema that references the external data source, enabling BigQuery to read the Parquet files on-the-fly using its federated query engine.

Exam trap

The trap here is that candidates confuse 'federated queries' (which typically query external databases like Cloud SQL or Bigtable via BigQuery Omni) with the ability to query Cloud Storage files, which is specifically implemented through external tables.

How to eliminate wrong answers

Option A is wrong because BigQuery ingestion using load jobs imports data into BigQuery's internal storage, which contradicts the requirement to query data without loading it. Option B is wrong because Cloud Storage FUSE mounts a bucket as a filesystem, but BigQuery cannot directly query files via FUSE; it requires a different integration mechanism. Option C is wrong because BigQuery federated queries with Cloud Storage is not a distinct feature; the correct term is 'external tables' or 'federated data sources', and 'federated queries' typically refers to querying external databases like Cloud SQL, not Cloud Storage files.

48
MCQmedium

An organization needs to prevent data exfiltration from BigQuery by ensuring all traffic to BigQuery APIs goes through VPC boundaries and is restricted to a specific service perimeter. Which Google Cloud security control should they use?

A.Access Transparency
B.IAM conditions on BigQuery roles
C.Cloud Armor
D.VPC Service Controls
AnswerD

VPC Service Controls define a perimeter that restricts data movement to authorized networks and prevents exfiltration.

Why this answer

VPC Service Controls (D) is the correct answer because it allows you to define a service perimeter around BigQuery APIs, ensuring that all traffic to BigQuery must originate from within the defined VPC boundaries. This prevents data exfiltration by blocking unauthorized access from outside the perimeter, even if valid credentials are used. It works by enforcing context-aware access policies at the Google Cloud network edge, not at the application layer.

Exam trap

The trap here is that candidates confuse IAM conditions (which control who can access data) with VPC Service Controls (which control where data can be accessed from), leading them to pick Option B instead of D.

How to eliminate wrong answers

Option A is wrong because Access Transparency provides logs of Google personnel access to your data, not network-level controls for data exfiltration. Option B is wrong because IAM conditions on BigQuery roles control authorization based on attributes like IP address or time, but they do not restrict traffic to VPC boundaries or create a service perimeter; they are identity-based, not network-based. Option C is wrong because Cloud Armor is a web application firewall (WAF) for HTTP(S) traffic to load balancers, not for BigQuery API traffic, and it cannot enforce VPC boundaries or service perimeters.

49
MCQmedium

A data team needs to run complex analytical queries on a dataset that is frequently updated with new rows. They want to minimize query costs and avoid scanning old data that is rarely queried. Which BigQuery feature should they use?

A.Partitioned tables with partition expiration
B.BigQuery materialized views
C.Clustered tables
D.BigQuery BI Engine
AnswerA

Partitioning allows querying only relevant partitions, and partition expiration can automatically delete old partitions.

Why this answer

Partitioned tables with partition expiration allow you to divide a table into segments based on a date/timestamp column, and automatically delete partitions that are older than a specified duration. This minimizes query costs by only scanning relevant partitions and eliminates storage costs for old, rarely queried data without manual intervention.

Exam trap

A common mistake is to choose a performance optimization feature (clustering, materialized views, BI Engine) when the question explicitly asks about minimizing costs and avoiding scanning old data. The correct focus is on data lifecycle management with partition expiration.

How to eliminate wrong answers

Option B is wrong because BigQuery materialized views precompute and cache query results for faster reads, but they do not automatically expire old data or reduce storage costs for rarely queried rows. Option C is wrong because clustered tables sort data within partitions to improve query performance and reduce bytes scanned, but they do not provide automatic deletion of old data or partition expiration. Option D is wrong because BigQuery BI Engine is an in-memory analysis service that accelerates interactive queries but does not manage data lifecycle or expiration of old rows.

50
MCQmedium

A data engineer needs to store quarterly financial data that must remain immutable for 7 years to meet regulatory compliance. The data is accessed infrequently after the first year. Which Cloud Storage feature should be used to enforce immutability?

A.Object Lifecycle Rules
B.Object Lock with Retention Policy
C.Object Versioning
D.IAM Conditions
AnswerB

Object Lock sets a retention policy on the bucket, preventing objects from being deleted or overwritten for a specified duration (WORM).

Why this answer

Object Lock with a Retention Policy enforces immutability by preventing object deletion or modification for a specified duration. For regulatory compliance requiring 7-year immutable storage, a retention policy configured with a retention period of 7 years ensures that objects cannot be overwritten or deleted, even by the root account. This directly meets the requirement for data that must remain unchanged for the full 7-year period.

Exam trap

Candidates often confuse Object Versioning with immutability, but versioning only protects against accidental deletion by preserving old versions—it does not prevent intentional deletion or overwriting of the current version, which is required for true immutability.

How to eliminate wrong answers

Option A is wrong because Object Lifecycle Rules manage transitions and deletions based on age or other criteria, but they do not enforce immutability—objects can still be modified or deleted by users with appropriate permissions. Option C is wrong because Object Versioning preserves previous versions of objects but does not prevent deletion or overwriting of the current version; it allows recovery but does not enforce a write-once, read-many (WORM) model. Option D is wrong because IAM Conditions control access based on attributes like IP address or time, but they do not prevent deletion or modification of objects; they only restrict who can perform actions, not enforce data immutability.

51
MCQmedium

An e-commerce application uses Cloud SQL (MySQL) for transaction processing. To improve read performance for reporting queries, the team wants to offload read traffic to a separate database instance that stays in sync with the primary. Which Cloud SQL feature should they use?

A.Configure a high availability (HA) replica
B.Use Cloud SQL's failover replica
C.Create a cross-region read replica
D.Enable automatic backups and point-in-time recovery
AnswerC

Read replicas can be in the same or different region and serve read-only traffic.

Why this answer

Cloud SQL read replicas are designed to offload read traffic from the primary instance while staying in sync using asynchronous replication. Cross-region read replicas specifically allow you to place a replica in a different region, improving read performance for geographically distributed reporting queries without affecting the primary's transaction processing.

Exam trap

The pitfall is that candidates often assume a high availability (HA) failover replica can also serve read traffic, but in Cloud SQL, the HA standby is not directly accessible for reads; it is only used for automatic failover. Read replicas (option C) are the correct choice for offloading read queries.

How to eliminate wrong answers

Option A is wrong because a high availability (HA) replica is a synchronous standby that provides automatic failover for high availability, not a separate instance for offloading read traffic; it does not serve read queries independently. Option B is wrong because Cloud SQL does not have a separate 'failover replica' feature; failover is handled by the HA configuration, and the term is often confused with a read replica, but failover replicas are not used for read offloading. Option D is wrong because automatic backups and point-in-time recovery are disaster recovery features that protect data, not mechanisms to offload read traffic or improve query performance.

52
MCQeasy

A company needs a fully managed, globally distributed relational database with strong consistency, external consistency, and 99.999% SLA for a financial transaction processing system. Which Google Cloud service should they use?

A.Firestore
B.Cloud Spanner
C.Bigtable
D.Cloud SQL
AnswerB

Cloud Spanner is globally distributed, strongly consistent, and offers 99.999% SLA.

Why this answer

Cloud Spanner is the correct choice because it is a fully managed, globally distributed relational database service that provides strong consistency, external consistency (true serializable transactions across regions), and a 99.999% SLA. These features are essential for a financial transaction processing system that requires ACID compliance and global scalability without sacrificing consistency.

Exam trap

The trap here is that candidates often confuse Cloud Spanner with Bigtable or Firestore because all three are globally distributed, but only Spanner offers the relational model, strong consistency, and the 99.999% SLA required for financial transactions.

How to eliminate wrong answers

Option A (Firestore) is wrong because it is a NoSQL document database that does not support relational queries or strong consistency across global distributions (it offers eventual consistency by default). Option C (Bigtable) is wrong because it is a wide-column NoSQL database designed for high-throughput analytical workloads, not relational transactions, and it does not provide SQL support or ACID transactions. Option D (Cloud SQL) is wrong because it is a regional relational database service that cannot provide global distribution or a 99.999% SLA; it supports only single-region deployments with limited failover.

53
MCQmedium

A team wants to use Cloud Storage to build a data lake with separate zones for raw, curated, and processed data. They need to automatically move objects older than 30 days from the raw zone to a cheaper storage class. How can they achieve this?

A.Set a bucket retention policy that forces deletion after 30 days
B.Write a Cloud Function to delete objects older than 30 days
C.Use gsutil rsync to move objects between buckets
D.Configure a Cloud Storage object lifecycle rule with SetStorageClass action
AnswerD

Lifecycle rules automate class transitions based on age.

Why this answer

Cloud Storage object lifecycle management rules can automatically transition objects from one storage class to a cheaper one (e.g., from Standard to Nearline or Coldline) based on age. By configuring a rule with the `SetStorageClass` action and a `Condition` of `age: 30`, objects in the raw zone bucket older than 30 days are moved to a lower-cost class without manual intervention or additional compute services.

Exam trap

Google often tests the distinction between lifecycle rules that change storage class versus retention policies that enforce immutability, and candidates may confuse 'move to cheaper storage' with 'delete' or 'retain'.

How to eliminate wrong answers

Option A is wrong because a retention policy prevents deletion or modification of objects until the retention period expires; it does not move objects to a cheaper storage class and would lock the data, not transition it. Option B is wrong because while a Cloud Function could delete objects, the requirement is to move them to a cheaper storage class, not delete them; using a function for this is also less efficient and more complex than a native lifecycle rule. Option C is wrong because `gsutil rsync` synchronizes content between buckets but does not automatically trigger based on age; it requires manual or scheduled execution and does not natively support storage class transitions based on object age.

54
MCQmedium

An organization needs to restrict access to BigQuery and Cloud Storage so that data can only be accessed from within a specific VPC network and cannot be exfiltrated. Which Google Cloud feature should they use?

A.Private Service Access
B.VPC Service Controls
C.VPC firewall rules
D.IAM conditions
AnswerB

Creates a security perimeter to prevent data exfiltration.

Why this answer

VPC Service Controls (option B) is the correct choice because it creates a security perimeter around Google Cloud services like BigQuery and Cloud Storage, preventing data exfiltration even from within a VPC. It enforces context-aware access based on the VPC network, ensuring data can only be accessed from authorized VPC sources and blocking unauthorized transfers outside the perimeter.

Exam trap

The trap here is that candidates confuse VPC firewall rules (which control network traffic) with VPC Service Controls (which control data access at the API layer), leading them to choose firewall rules because they think 'restricting access to a VPC' is purely a network-level concern.

How to eliminate wrong answers

Option A is wrong because Private Service Access is used to enable private connectivity from a VPC to Google-managed services (e.g., Cloud SQL, Memorystore) via internal IPs, but it does not provide exfiltration prevention or restrict data movement across services. Option C is wrong because VPC firewall rules control network traffic at the packet level (IP addresses, ports, protocols) but cannot prevent data exfiltration via API calls or service-to-service transfers, as they operate at layers 3/4, not at the application layer. Option D is wrong because IAM conditions allow fine-grained access control based on attributes like IP address or time, but they do not create a perimeter around services; they can restrict who can call an API but cannot block data movement between services or prevent exfiltration via authorized credentials.

55
Multi-Selecthard

You are designing a Cloud Spanner schema for a global e-commerce application. The database will include a Customers table and an Orders table. To optimise performance for queries that join Customers with their Orders, which THREE design choices are recommended? (Choose 3.)

Select 3 answers
A.Use a single table for both Customers and Orders and filter by CustomerId.
B.Use interleaved tables: make Orders an interleaved table under Customers.
C.Denormalise the schema by embedding order details into the Customers table as repeated fields.
D.Include CustomerId as the first part of the Orders primary key.
E.Create a secondary index on OrderDate in the Orders table.
AnswersB, D, E

Interleaved tables store Orders rows near their parent Customer, improving join performance.

Why this answer

Spanner interleaved tables store child rows physically close to parent rows, improving join performance. Including the parent's primary key as the first part of the child's primary key is required for interleaving. Secondary indexes on non-key columns are also needed for efficient lookups.

56
MCQmedium

A Cloud SQL instance for PostgreSQL is experiencing heavy read traffic. The team wants to offload read queries while maintaining data consistency. Which solution meets their needs?

A.Create read replicas and direct read queries to them.
B.Increase the tier of the Cloud SQL instance.
C.Create a Cloud SQL failover replica.
D.Use Cloud Memorystore as a cache in front of Cloud SQL.
AnswerA

Read replicas handle read traffic, reducing load on the primary instance.

Why this answer

Read replicas in Cloud SQL for PostgreSQL allow you to offload read traffic from the primary instance by creating one or more asynchronous replicas that serve read queries. This maintains data consistency because replicas use PostgreSQL's native streaming replication, ensuring that all committed transactions on the primary are eventually reflected on the replica, providing a consistent snapshot for read operations.

Exam trap

The Google Professional Data Engineer exam often tests the distinction between read replicas (for offloading reads) and failover replicas (for high availability), so candidates may confuse the two and incorrectly select the failover replica option.

How to eliminate wrong answers

Option B is wrong because increasing the tier of the Cloud SQL instance only scales the primary instance vertically, which does not offload read traffic — it simply gives the same instance more resources, which may not be sufficient under heavy read loads and does not separate read and write workloads. Option C is wrong because a Cloud SQL failover replica is designed for high availability and automatic failover in case of primary instance failure, not for offloading read queries; it is a synchronous standby that does not serve read traffic. Option D is wrong because Cloud Memorystore as a cache can reduce read load but does not maintain strong data consistency with Cloud SQL; cached data may become stale, and the cache is not a direct offload of read queries from the database — it introduces eventual consistency and requires application-level cache invalidation logic.

57
MCQhard

A company is migrating an on-premises PostgreSQL database to Google Cloud. The database runs complex analytical queries mixed with OLTP workloads. They need PostgreSQL compatibility and want to improve analytical query performance without changing the application. Which database should they choose?

A.BigQuery
B.Cloud Spanner
C.Cloud SQL for PostgreSQL
D.AlloyDB
AnswerD

AlloyDB is PostgreSQL-compatible and uses a columnar engine to accelerate analytical queries while supporting OLTP.

Why this answer

AlloyDB is the correct choice because it is a fully managed PostgreSQL-compatible database service specifically designed for demanding transactional and analytical workloads. It combines the PostgreSQL ecosystem with a columnar engine and adaptive caching to accelerate analytical queries by up to 100x over standard PostgreSQL, all without requiring application changes. This makes it ideal for mixed OLTP and complex analytical queries while maintaining PostgreSQL compatibility.

Exam trap

The trap here is that candidates often choose Cloud SQL for PostgreSQL because it is the most familiar PostgreSQL option within Google Cloud, overlooking that AlloyDB is Google's specialized service for mixed OLTP and analytical workloads, providing PostgreSQL compatibility with built-in analytical acceleration. Cloud SQL lacks these advanced analytical features.

How to eliminate wrong answers

Option A is wrong because BigQuery is a serverless data warehouse that is not PostgreSQL-compatible and requires application changes to use its SQL dialect; it is designed for large-scale analytics, not OLTP workloads. Option B is wrong because Cloud Spanner is a globally distributed, strongly consistent relational database that uses a proprietary SQL dialect, not PostgreSQL, and is optimized for horizontal scalability and high availability, not for improving analytical query performance on mixed workloads. Option C is wrong because Cloud SQL for PostgreSQL is a fully managed PostgreSQL service but lacks the built-in columnar engine and adaptive caching needed to significantly accelerate complex analytical queries; it is best suited for standard OLTP workloads, not mixed analytical and transactional demands.

58
MCQhard

A data engineer is designing a Bigtable row key for a time-series application that records temperature sensor readings every second. To avoid hotspotting, they want to distribute writes across all nodes. Which row key design is best?

A.[timestamp reversed]#[sensor_id]
B.[sensor_id]#[timestamp]
C.[hash of sensor_id]#[timestamp]
D.[timestamp]#[sensor_id]
AnswerC

Hashing distributes writes across tablets, avoiding hotspotting.

Why this answer

Hotspotting occurs when sequential keys hit a single tablet server. A reversed timestamp or hashed prefix distributes writes. Pre-pending a hash ensures even distribution.

Timestamp alone causes hotspotting. Sensor ID + timestamp can still be sequential if sensor ID is low cardinality.

59
MCQhard

You are designing a row key for Cloud Bigtable to store user activity logs. Each log entry has a timestamp (millisecond precision) and a user ID. There will be millions of writes per second from many users. To avoid hotspotting, which row key design is BEST?

A.timestamp_millis#hash(userID)
B.timestamp_millis#userID
C.userID#timestamp_millis
D.hash(userID)#userID#timestamp_millis
AnswerD

Hashing the userID distributes writes evenly. Including userID and timestamp enables efficient queries per user over time.

Why this answer

Best because it uses a hash of the user ID as the row key prefix, which distributes writes across all Bigtable nodes and avoids hotspotting. Appending the user ID and timestamp ensures uniqueness and supports efficient queries for a specific user's logs. This design prevents the sequential timestamp from creating a single hot node, which is critical for handling millions of writes per second.

Exam trap

Google PDE often tests the misconception that placing the most selective or unique field first (like timestamp) is best for queries, but in Bigtable the row key design must prioritize write distribution over read optimization to avoid hotspotting.

How to eliminate wrong answers

Option A is wrong because placing the timestamp first causes all writes for the same millisecond to hit a single tablet server, creating a hotspot. Option B is wrong because using the raw timestamp as the prefix leads to sequential writes that overload one node, negating Bigtable's horizontal scaling. Option C is wrong because while userID as prefix distributes writes, it does not guarantee uniqueness for multiple log entries from the same user at the same millisecond, and it lacks the hash to prevent skewed access patterns if user IDs are sequential or predictable.

60
Multi-Selectmedium

A data engineer is designing a Cloud Bigtable schema for high-volume time-series data. Which TWO practices should they follow to avoid performance issues?

Select 2 answers
A.Place the timestamp as the first component of the row key
B.Create as many column families as possible
C.Use a hashed prefix in the row key to distribute writes
D.Group related columns into column families
E.Store all columns in a single column family
AnswersC, D

Hashing avoids sequential hot-spotting.

Why this answer

Using a hashed prefix to avoid hot-spotting and grouping related columns into column families are recommended. Timestamp-first keys cause hot-spotting. Single column family for all data is inefficient.

Large number of column families also adds overhead.

61
Multi-Selecteasy

A company wants to use BigQuery for analytics. They need to meet compliance requirements by encrypting data at rest with a key they control. Which TWO actions should they take? (Choose 2.)

Select 2 answers
A.Set the Cloud KMS key as the default encryption key for the BigQuery dataset.
B.Create a Cloud Storage bucket and load data there.
C.Use VPC Service Controls to restrict access to the dataset.
D.Create a key ring and cryptographic key in Cloud KMS.
E.Enable BigQuery column-level encryption using AEAD functions.
AnswersA, D

Setting the dataset default encryption key encrypts all tables in the dataset with the CMEK.

Why this answer

BigQuery supports Customer-Managed Encryption Keys (CMEK) for encrypting data at rest. You need to create a Cloud KMS key and then set it as the default encryption key for a BigQuery dataset. All tables in that dataset will be encrypted with that key.

62
MCQeasy

Which BigQuery feature allows you to read data directly from Cloud Storage without loading it into BigQuery storage?

A.External tables
B.BI Engine
C.Federated queries
D.Authorized views
AnswerA

External tables reference data in Cloud Storage and can be queried directly.

Why this answer

External tables in BigQuery allow querying data stored in Cloud Storage (e.g., CSV, Parquet, ORC) without loading. Authorized views restrict access, federated queries allow querying other databases, and BI Engine is for acceleration.

63
MCQmedium

An organization uses Cloud Storage to store backup files. They want to automatically delete files older than 90 days, and after deletion, move remaining files to Nearline storage if not accessed for 30 days. Which Cloud Storage feature should they configure?

A.Object Versioning
B.Retention Policies
C.Bucket Lock
D.Object Lifecycle Management
AnswerD

Lifecycle rules can delete objects after a specified age and change storage class based on last access time (using Condition with LastAccessTime).

Why this answer

Object Lifecycle Management (D) is the correct feature because it allows you to define rules to automatically transition objects to colder storage classes (such as Nearline) after a specified period of inactivity and to delete objects after a set age. In this scenario, a lifecycle rule can be configured to delete objects older than 90 days and, for the remaining objects, move them to Nearline storage if they have not been accessed for 30 days. This fully automates the required data management without manual intervention.

Exam trap

Google often tests the distinction between lifecycle management (which automates transitions and deletions) and retention-related features (like Bucket Lock or Retention Policies), so the trap here is that candidates confuse 'automatically deleting old files' with 'preventing deletion,' leading them to incorrectly choose a retention-focused option.

How to eliminate wrong answers

Option A is wrong because Object Versioning is used to preserve, retrieve, and restore every version of an object in a bucket, not to automate deletion or storage class transitions based on age or access patterns. Option B is wrong because Retention Policies are used to enforce a minimum retention period for objects, preventing their deletion or overwrite, which is the opposite of automatically deleting old files. Option C is wrong because Bucket Lock is a feature that locks a bucket's retention policy, making it immutable and preventing any changes to the retention settings; it does not provide automated lifecycle actions like deletion or storage class transitions.

64
Multi-Selecthard

A company stores data in a Cloud Storage bucket with versioning enabled. They want to automatically delete objects that are noncurrent (i.e., previous versions) after 30 days, and also delete the current version if it is older than 365 days. Which three Object Lifecycle Management conditions can be used together? (Choose three.)

Select 3 answers
A.lastAccessTime: 30
B.age: 365
C.numNewerVersions: 1
D.daysSinceCustomTime: 30
E.noncurrentTimeBefore: 30
AnswersB, C, E

Deletes current version when older than 365 days.

Why this answer

The `age` condition in Object Lifecycle Management specifies the number of days since object creation, and setting it to 365 will delete the current version when it is older than 365 days. This directly meets the requirement to delete current versions older than a year.

Exam trap

Google Cloud Storage lifecycle conditions are distinct from AWS S3 lifecycle conditions. Candidates mistakenly select `lastAccessTime` (an S3-only feature) or confuse `daysSinceCustomTime` with `noncurrentTimeBefore`.

65
MCQmedium

You need to create a Cloud Storage bucket for a data lake that will store raw ingested data. The data must be immutable and cannot be deleted or overwritten for a compliance period of 5 years. Which feature should you enable?

A.Object Versioning
B.Lifecycle rules to delete objects after 5 years
C.Object Lock with governance mode
D.Bucket Lock with a retention policy of 5 years
AnswerD

Correct: Bucket Lock enforces immutability for the specified period.

Why this answer

Bucket Lock with a retention policy enforces a minimum retention period on all objects in the bucket. During the retention period, objects cannot be deleted or overwritten. This is exactly for compliance needs.

66
MCQeasy

A company wants to use BigQuery to query data stored in Parquet files in Cloud Storage without loading the data into BigQuery. Which BigQuery feature should they use?

A.BigQuery Omni
B.BigQuery ML
C.BigQuery external tables
D.BigQuery BI Engine
AnswerC

External tables allow querying data directly from GCS without loading into BigQuery storage.

Why this answer

BigQuery external tables allow querying data stored in Cloud Storage (including Parquet files) directly without loading it into BigQuery storage. This feature uses a federated query engine that reads the data on the fly, supporting formats like Parquet, Avro, ORC, CSV, and JSON. Option C is correct because it directly addresses the requirement to query Parquet files in Cloud Storage without ingestion.

Exam trap

Google often tests the distinction between features that query external data (external tables) versus features that process data within BigQuery (like BI Engine) or across clouds (Omni), leading candidates to confuse Omni's multi-cloud capability with external data access in the same cloud.

How to eliminate wrong answers

Option A is wrong because BigQuery Omni is designed to query data across multi-cloud environments (AWS, Azure) using BigQuery's interface, not for querying Parquet files in Cloud Storage without loading. Option B is wrong because BigQuery ML is a machine learning feature that enables creating and executing models using SQL, not for querying external data files. Option D is wrong because BigQuery BI Engine is an in-memory analysis service that accelerates dashboard queries on data already stored in BigQuery, not for querying external Parquet files in Cloud Storage.

67
MCQhard

A data engineer needs to design a Bigtable row key for a time-series IoT application where each device sends data every second. The query pattern is to retrieve all data for a specific device over a time range. Which row key design minimizes hotspots?

A.device_id#timestamp (e.g., device123#2024-03-15-10:30:00)
B.hash(device_id)#timestamp (e.g., a3f2#2024-03-15-10:30:00)
C.timestamp#device_id (e.g., 2024-03-15-10:30:00#device123)
D.device_type#device_id#timestamp
AnswerB

Hashing the device ID distributes writes across tablets, and appending timestamp allows efficient time-range scans.

Why this answer

To avoid hotspots (where all writes hit a single tablet server), the row key should start with a hash of the device ID to distribute writes across the cluster, then append the timestamp for range scans.

68
MCQhard

A company stores sensitive customer data in BigQuery and Cloud Storage. They want to encrypt the data with customer-managed encryption keys (CMEK) and ensure that access to the key material is restricted to only approved networks. Which additional Google Cloud control should they implement to enforce network-based access to the encryption keys?

A.Identity-Aware Proxy (IAP)
B.Private Google Access
C.VPC Service Controls
D.Cloud Armor
AnswerC

VPC Service Controls allow you to define a security perimeter around Google Cloud services, including Cloud KMS, to restrict access based on network origin.

Why this answer

VPC Service Controls (VPC-SC) can create a security perimeter around Cloud KMS and BigQuery/Cloud Storage resources, preventing data exfiltration and restricting access to approved networks. VPC-SC works with CMEK to add an extra layer of network-based access control. Cloud Armor is for HTTP(S) load balancing, IAP is for user identity, and Private Google Access is for on-premises access to public IPs.

Ready to test yourself?

Try a timed practice session using only Pde Storing Data questions.