professional-cloud-data-engineer
Prepare and test your skills
Prepare and test your skills
Selecting the right Google Cloud storage system begins by categorizing the workload as either operational or analytical, each with distinct performance needs. Key metrics include the read/write ratio, acceptable query latency, and query complexity.
Operational workloads power user-facing applications like e-commerce, requiring low-latency, high-throughput transaction processing with strong consistency. For these needs, Cloud Spanner and Cloud SQL provide ACID compliance. For workloads needing massive-scale, high-speed row-based access, Bigtable delivers high write throughput with replication across zones.
Analytical workloads focus on complex queries over massive datasets, such as business intelligence. These are typically read-heavy and prioritize column-based operations. BigQuery is a serverless data warehouse that decouples compute and storage for maximum scalability. It uses a columnar storage format called Capacitor and dynamically allocates compute resources in units called slots based on query complexity.
For unstructured and block storage, options include Cloud Storage for scalable object storage with different classes, Filestore for highly available NFS file systems, and Persistent Disk for durable network block storage attached to virtual machines.
Monitoring data access is essential for maintaining performance, scalability, and cost-efficiency. It helps identify bottlenecks and optimize resource allocation.
BigQuery performance diagnostics use the query execution graph to visualize processing stages and identify slow operations. Resource consumption is measured in slots. Using clustered tables, which sort data into optimal blocks based on specified columns, can eliminate unnecessary data scans and improve speed.
Cloud Spanner performance diagnostics are available through Cloud Monitoring and audit logs, tracking Service Level Indicators for availability and latency. The spanner_instance monitored-resource type is used. Storage utilization metrics help monitor database size. For analytical queries, Spanner Data Boost provides separate processing capacity to minimize impact on transactional workloads.
Storage system availability and latency monitoring varies by service. Cloud Storage tracks availability via the api/request_count metric. Bigtable writes metrics like server/request_count and server/latencies to Cloud Monitoring, filtered by operation type, as it is optimized for high throughput at low latency.
Exam tip: Establishing baseline metrics for normal operation makes it easier to identify anomalies. BigQuery caches query results for approximately 24 hours when the underlying data is unchanged, reducing costs and improving response times.
Schema and key design directly impact performance and cost by aligning data's physical organization with query patterns. Poor design can cause hotspotting or inefficient full table scans.
BigQuery schema design relies on partitioning and clustering instead of traditional indexes. Partitioning divides a large table into smaller segments (e.g., by a DATE column), so queries scan only relevant partitions. Clustering sorts data within each partition based on column values, making range or filter queries on those columns extremely efficient.
Bigtable key design centers on the row key, which determines how data is physically distributed across servers. A good key sequences related data together while distributing load evenly. For time-series data, a key like SensorID#Timestamp groups all readings for a sensor sequentially. However, using just a timestamp prefix could cause all new writes to target the same server, creating a hotspot. Strategies like key salting (adding a hash prefix) or reversing domain names can distribute load more evenly.
The core principle is to design for the most frequent and critical access paths so common operations access the minimum necessary data sequentially. In BigQuery, over-partitioning can lead to small file fragmentation, hurting performance.
A cost-effective data lakehouse in Google Cloud separates storage from computation, allowing each to scale independently. The core services are BigQuery for analytics, Cloud Storage for raw data, and BigLake for secure, unified access.
BigQuery is a serverless data warehouse using columnar Capacitor storage. Cloud Storage is a durable object store. Storing data in the same region as processing minimizes network latency and egress costs.
BigLake enables secure data virtualization across formats like Parquet and JSON without moving data. While BigQuery can query files directly in Cloud Storage using external tables, this traditionally requires users to have permissions on both the table and the underlying files. BigLake tables support fine-grained access control through access delegation, so data consumers only need access to the table itself.
Key BigQuery optimizations include table partitioning, materialized views for precomputing results, and clustering. BigQuery automatically replicates data across availability zones within a region. For broader disaster recovery, Cloud Storage provides dual-region or multi-region options with asynchronous replication.
For high-velocity streaming, time-series, and real-time analytics, Google Cloud offers Bigtable for NoSQL storage and Memorystore for in-memory caching.
Bigtable is a fully managed NoSQL wide-column database designed to handle petabytes with sub-millisecond latency. It automatically scales by adding or removing nodes and separates storage from compute. Bigtable supports both HDD and SSD storage, with SSD providing the lowest latency.
Row-key design is critical for data distribution and efficiency. A well-designed key should enable range scans and avoid hotspotting. For time-series data, patterns include reversing timestamp components or combining device IDs with timestamps.
Memorystore provides fully managed Redis and Memcached services, delivering microsecond-level latencies. It supports high availability through automatic failover. Effective caching strategies include cache-aside (check cache before database), write-through (write to cache and database simultaneously), and time-based expiration.
Selecting a managed transactional database involves analyzing data structure, access patterns, and operational needs, with trade-offs in schema flexibility, consistency, and scaling.
Relational databases like Cloud SQL and AlloyDB are ideal for applications requiring strong consistency, complex queries, and a fixed schema. Cloud SQL is fully managed for MySQL, PostgreSQL, and SQL Server. AlloyDB for PostgreSQL provides superior performance and analytics capabilities. These are best for traditional OLTP applications.
Cloud Spanner is a horizontally scalable relational database that combines a relational schema with non-relational scalability. It offers external consistency across regions, suitable for mission-critical, globally distributed applications.
Non-relational databases offer schema flexibility. Firestore is a serverless document database for mobile/web apps with hierarchical data and real-time updates. Bigtable is for massive throughput and low latency. Memorystore is for ultra-low-latency caching.
The final selection requires analyzing the scaling model (vertical vs. horizontal), consistency model (strong vs. eventual), and operational overhead (fully managed vs. design-intensive).
Data access patterns describe how frequently applications read and write data over time. In Cloud Storage, matching these patterns to the correct storage class minimizes cost. Automated tools like Object Lifecycle Management and Autoclass transition data between classes based on age or observed access.
Network egress costs occur when data moves out of a Google Cloud region. Organizations lower these fees by placing storage buckets in the same region as the compute workloads and end users. Within a VPC network, enabling Private Google Access allows VMs with private IPs to reach Google APIs and storage without routing over the public internet.
Multi-regional distribution provides high availability by copying data across geographical locations. Teams configure cross-bucket replication using the Storage Transfer Service. This introduces replication latency—the delay for a write in the source bucket to become visible in the destination bucket.
Cross-region replication requires specific IAM permissions. The service account must have the Storage Object Viewer role on the source bucket and the Storage Legacy Bucket Writer role on the destination bucket.
Exam tip: Enabling Private Google Access allows private VPC resources to reach Google Cloud Storage APIs without traversing the public internet, avoiding external data egress pathways.
Object storage tiering optimizes cost by placing data into Cloud Storage classes based on retrieval frequency and minimum storage duration rules. The four primary classes trade lower monthly storage costs for higher retrieval fees and longer commitment windows.
A state lifecycle diagram showing a Cloud Storage object flowing from Standard through Nearline, Coldline, and Archive storage classes as it ages, listing each class's access frequency, minimum storage duration, and retrieval fees, with a delete-rule path and an early-deletion penalty note.
| Storage Class | Target Access Frequency | Minimum Duration | Primary Use Case |
|---|---|---|---|
| Standard | Multiple times per month or daily | None | Active data lakes, real-time analytics, web assets |
| Nearline | At most once per month | 30 days | Monthly backups, regular disaster recovery tests |
| Coldline | Less than once per quarter | 90 days | Quarterly archives, rarely modified backups |
| Archive | Less than once per year | 365 days | Long-term preservation, regulatory compliance data |
Lifecycle management policies automate transitions between classes when an object ages past a threshold. Early deletion penalties apply if an object is deleted, overwritten, or transitioned before completing the minimum storage duration of its current class.
Exam tip: Deleting, modifying, or rewriting an object before its class's minimum storage duration expires triggers an early deletion charge for the remaining duration.
Managing costs and performance requires aligning data storage models with compute capacity. Google Cloud databases decouple compute from storage or provide granular scaling controls.
BigQuery separates compute resources from underlying storage. Under on-demand pricing, query costs depend on bytes scanned. Organizations control scan volumes through partitioning, clustering, and capacity-based pricing (allocating dedicated slots for a flat rate).
Cloud Bigtable scales processing nodes independently of stored data, allowing linear performance scaling based on node count. Teams can scale down nodes during off-peak hours. Bigtable supports dynamic autoscaling based on CPU utilization and offers a choice between standard SSD for low latency or HDD for high-volume, infrequently accessed data.
Exam tip: BigQuery on-demand query costs depend on the number of bytes scanned, which can be minimized by combining table partitioning for query pruning with column clustering.
Object Lifecycle Management (OLM) in Cloud Storage is an automated rule engine that transitions objects between storage classes or deletes them based on age or prefix criteria. Bucket administrators configure these rules via the console, gcloud CLI, or client libraries.
Retention policies enforce data governance by guaranteeing objects remain protected from deletion or modification for a specified duration. Administrators use Bucket Lock to make the retention policy irreversible. Once locked, the retention duration can only be increased; it cannot be decreased or removed until the bucket is empty and deleted.
Individual objects can be protected using object holds, which block deletion regardless of retention timers. Temporary holds are applied manually. Event-based holds keep objects immutable until a specific business milestone occurs. Default event-based holds can be configured at the bucket level for every newly uploaded object.
Cloud Storage handles data disposal through a multi-stage lifecycle. Soft delete retains deleted files for a configurable recovery window. Logical deletion removes references from the index. Cryptographic erasure destroys the underlying encryption keys, rendering stored blocks unrecoverable.
Exam tip: Once Bucket Lock is applied to a retention policy, the retention period can only be increased; the policy cannot be shortened or removed until the bucket is completely empty and deleted.
BigQuery manages analytical storage costs through configurable billing models and automated price reductions. Datasets can be billed for logical storage (uncompressed bytes) or physical storage (compressed bytes on disk).
BigQuery automatically promotes data into long-term storage when a table or partition remains unedited for 90 consecutive calendar days. Once transitioned, the base storage rate drops by 50 percent with no degradation in performance. Any write, update, or append resets the 90-day timer to zero.
Expiration settings provide an automated hierarchy for deleting obsolete records:
Exam tip: Any update or modification to a BigQuery table or partition resets the 90-day timer required to qualify for the 50 percent long-term storage discount.
Multi-storage tiering balances storage cost against retrieval expenses and latency by placing data in the class matching its access frequency. Cloud Storage classes range from Standard (highest capacity cost, zero retrieval fees, millisecond latency) to Archive (lowest capacity cost, highest retrieval fees, 365-day minimum duration).
Effective cloud data architectures separate the persistent storage layer from the computation layer. Data pipelines store raw files in Cloud Storage while running analytical workloads in services like Cloud Dataflow. Colocating compute clusters in the same region as storage buckets prevents inter-region network charges and lowers latency. Lifecycle rules and monitoring tools like Cloud Monitoring ensure policies remain aligned with evolving business needs.
Exam tip: Archival storage classes offer the lowest monthly capacity costs, but high retrieval fees make them cost-prohibitive for data subjected to unexpected or frequent query access.
BigQuery automatically promotes data into long-term storage when a table or partition remains unedited for 90 consecutive calendar days, reducing the base storage rate by 50 percent with no performance degradation. Any write, update, or append resets the 90-day timer to zero.
Cloud Storage classes have increasing minimum duration requirements: Nearline requires at least 30 days, Coldline requires 90 days, and Archive requires 365 days. Deleting, modifying, or rewriting an object before completing the minimum storage duration triggers an early deletion charge for the remaining period.
BigLake enables secure data virtualization across formats like Parquet and JSON without moving data. It supports fine-grained access control through access delegation, so data consumers only need access to the table itself rather than requiring permissions on both the table and the underlying Cloud Storage files.
Private Google Access allows virtual machines with private IP addresses to reach Google Cloud Storage APIs without routing traffic over the public internet. This avoids external data egress pathways and the associated network costs.