Data Transformation

Beginner-friendly guide to data value, structured/semi-structured/unstructured data, Google Cloud storage services, storage classes, and data pipelines (Pub/Sub, Dataflow, Looker).

CDL data solutions covers approximately 15-20% of the exam. Knowing which storage service to use and when, and how to build data pipelines, are the key skills tested.

 

Why Data Matters

In modern business, data is like oil — raw data has no value, but when refined through analysis, it drives business decisions. A supermarket analyzing customer purchase patterns to optimize inventory or personalize recommendations makes far more accurate decisions than relying on intuition alone.

Three Types of Data

| Type | Format | Storage Examples | |------|--------|-----------------| | Structured | Tables, rows/columns | Cloud SQL, Cloud Spanner, BigQuery | | Semi-structured | JSON, XML | Firestore, Bigtable | | Unstructured | Images, videos, text files | Cloud Storage |

About 80% of data in the world is unstructured. Cloud Storage handles all unstructured files, while BigQuery excels at structured analytics.

 

Google Cloud Data Storage Services

The most-tested CDL question type is: "Which service should you use in this situation?" Here is the complete guide.

Cloud Storage — Object Storage

Cloud Storage stores any type of file — images, videos, backups, raw data — in buckets (containers). Each file (object) is accessible via a unique URL. Capacity is unlimited with 11 nines (99.999999999%) durability. Commonly used as a data lake (raw data repository for large-scale analytics).

Storage Classes optimize cost by access frequency — lower access frequency means lower storage cost but higher retrieval cost:

| Class | Min. Storage | Best For | Example | |-------|-------------|---------|---------| | Standard | None | Frequent access | Website images, app data | | Nearline | 30 days | Monthly access or less | Monthly backups | | Coldline | 90 days | Quarterly access or less | Quarterly audit data | | Archive | 365 days | Yearly access or less | Long-term archives, compliance |

Cloud SQL — Managed Relational Database

Fully managed MySQL, PostgreSQL, and SQL Server. "Fully managed" means Google handles patching, backups, replication, and failover automatically. Best for migrating existing MySQL/PostgreSQL apps to the cloud, web app backends, and OLTP (Online Transaction Processing) workloads. Vertical scaling is easy; horizontal scaling has limits.

Cloud Spanner — Globally Distributed Relational Database

Cloud Spanner goes beyond Cloud SQL's limits: it maintains full ACID transactions (like a relational database) while supporting unlimited horizontal scaling across the globe. This is rare — most relational databases struggle with horizontal scaling.

Best for: global financial transaction systems, worldwide inventory management, mission-critical apps with billions of records. If Cloud SQL is a local branch bank, Cloud Spanner is a global bank connecting all branches in one system.

Cloud Bigtable — NoSQL Wide-Column Database

Built on the same technology that powers Google Search, Gmail, and Google Maps internally. Handles millions of reads/writes per second and scales to petabytes.

"Wide column" means flexible schema — each row can have different columns. Best for: IoT sensor data, time-series data (time-stamped measurements), user behavior analytics, real-time streaming analysis. Does not support SQL, so unsuitable for complex joins or transactions.

BigQuery — Serverless Data Warehouse

One of the most important data services for the CDL exam. Analyze terabytes or petabytes with standard SQL — no server provisioning or management needed (serverless).

Optimized for OLAP (Online Analytical Processing): large-scale aggregation queries like "What were total sales by region last year?" Contrast with OLTP (individual transaction processing) — Cloud SQL handles OLTP, BigQuery handles OLAP.

BigQuery combines storage and compute, so you can load data and analyze it immediately without separate ETL pipelines.

Firestore — NoSQL Document Database

Fully managed NoSQL document database storing JSON. Optimized for mobile and web apps. Key feature: real-time sync — when data changes, all connected clients (apps, browsers) receive updates instantly, like Google Docs live editing.

Best for: chat apps, real-time collaborative editing, mobile game leaderboards, shopping carts.

Service Selection Guide:

| Service | Type | Core Use Case | |---------|------|--------------| | Cloud Storage | Object storage | Files, images, videos, backups, data lakes | | Cloud SQL | Relational (managed) | Web app backends, MySQL/PostgreSQL migration | | Cloud Spanner | Relational (global) | Global financial transactions, unlimited horizontal scale | | Bigtable | NoSQL (wide-column) | IoT, time-series, high-throughput analytics | | BigQuery | Data warehouse | Large-scale SQL analytics, BI, data exploration | | Firestore | NoSQL (document) | Mobile/web apps, real-time sync |

 

Data Pipelines: Ingest → Process → Analyze → Visualize

!Data pipeline stages: ingest, process, analyze, visualize

Pub/Sub — Real-time Message Streaming

Pub/Sub is an asynchronous messaging service using the Publisher-Subscriber pattern. Like a newspaper subscription: publishers publish articles, subscribers receive what they subscribed to.

Key benefit: decoupling — publishers don't need to know how many subscribers there are or when messages are processed. Thousands of IoT sensors send data; Pub/Sub buffers messages and delivers them to processing systems.

Best for: IoT data ingestion, event-driven architectures, microservice communication, real-time notifications.

Dataflow — Batch and Streaming Data Processing

Fully managed (serverless) data processing service based on Apache Beam. Uniquely, it handles both batch processing (analyze a day's accumulated logs all at once) and streaming processing (analyze data in real time as it arrives) with the same code and pipeline.

Typical pipeline: Pub/Sub (ingest) → Dataflow (transform/aggregate) → BigQuery (store/analyze)

Looker — BI and Data Visualization

Business Intelligence platform for Google Cloud. Turns data stored in BigQuery or other databases into interactive dashboards and reports that business users can explore without writing SQL.

LookML (Looker's modeling language) defines data relationships, enabling non-technical users to run complex analyses.

 

Exam Key Points

"Tables, rows/columns, SQL" -- Structured data

"JSON/XML, flexible structure" -- Semi-structured data

"Images, videos, no fixed format" -- Unstructured data

"Store any file/image/backup, object storage" -- Cloud Storage

"Cost by access frequency — frequent" -- Standard

"Monthly or less" -- Nearline / "Quarterly or less" -- Coldline / "Yearly or less" -- Archive

"Existing MySQL/PostgreSQL migration, managed relational DB" -- Cloud SQL

"Global transactions, unlimited horizontal scaling" -- Cloud Spanner

"IoT, time-series, millions of ops/sec" -- Cloud Bigtable

"Large-scale SQL analytics, serverless data warehouse" -- BigQuery

"Mobile/web apps, real-time sync" -- Firestore

"Publisher-subscriber async messaging, service decoupling" -- Pub/Sub

"Batch + streaming unified processing, Apache Beam" -- Dataflow

"BI dashboards, LookML, data visualization" -- Looker

Back to blog list