Foundation

Data Engineering Lifecycle

Framework fundamental untuk memahami end-to-end data engineering

⏱️ 25 min read 📅 Updated Jan 2025 👤 Based on "Fundamentals of Data Engineering" by Joe Reis & Matt Housley

🎯 Learning Objectives

Mode Baca Pemula

Jika ini pertama kali kamu belajar topik lifecycle, baca urut:

  1. Definisi lifecycle
  2. 5 stages (Generate -> Serve)
  3. Undercurrents (security, data management, DataOps)

Kamus istilah: DE-GLOSSARY.md

Prasyarat Ringan

Istilah Penting (3 Lapis)

Istilah: Lifecycle

Definisi awam: Siklus hidup data dari lahir sampai dipakai.

Definisi teknis: Tahapan end-to-end pengelolaan data: generation, storage, ingestion, transformation, serving.

Contoh praktis: Event transaksi dari aplikasi masuk storage, diproses, lalu tampil di dashboard.

Istilah: Undercurrents

Definisi awam: Hal-hal penting yang selalu ikut di semua tahap.

Definisi teknis: Cross-cutting concerns seperti security, governance, orchestration, observability.

Contoh praktis: Walau beda stage, kebutuhan logging dan access control tetap wajib.

Apa itu Data Engineering Lifecycle?

Data Engineering Lifecycle adalah framework yang menjelaskan bagaimana data bergerak dari sumbernya (source) ke tangan pengguna (consumers). Framework ini dikembangkan oleh Joe Reis & Matt Housley untuk membantu data engineers memahami big picture dari pekerjaan mereka.

💡 Key Insight

"The big idea of this book is the data engineering lifecycle: data generation, storage, ingestion, transformation, and serving. Since the dawn of data, we've seen the rise and fall of innumerable specific technologies and vendor products, but the data engineering lifecycle stages have remained essentially unchanged." — Joe Reis

The 5 Stages of Data Engineering Lifecycle

📡
GENERATE
Source Systems
💾
STORAGE
Data Repositories
🔄
INGEST
Data Movement
⚙️
TRANSFORM
Data Processing
📊
SERVE
Data Consumption

🌊 Undercurrents (Cross-Cutting Concerns)

🔒 Security
📋 Data Management
🚀 DataOps
🎼 Orchestration
💻 Software Engineering

Stage 1: Generation (Source Systems)

📡

Data Generation

Data berasal dari berbagai source systems. Sebagai Data Engineer, kamu perlu memahami karakteristik dari setiap source untuk merancang ingestion strategy yang tepat.

Common Source Systems:

📱 Case Study: E-commerce Platform

Sebuah e-commerce di Indonesia seperti Tokopedia memiliki multiple sources:

Stage 2: Storage

💾

Data Storage

Storage adalah tempat data disimpan dalam berbagai format dan untuk berbagai tujuan. Memilih storage system yang tepat adalah kunci untuk performance dan cost-efficiency.

Storage Type Use Case Examples
Data Warehouse Structured analytics, BI Snowflake, BigQuery, Redshift
Data Lake Raw data storage, ML S3, GCS, Azure Data Lake
Data Lakehouse Best of both worlds Delta Lake, Apache Iceberg
OLAP Fast analytics queries ClickHouse, Druid, Pinot
Time-Series DB Metrics, IoT data InfluxDB, TimescaleDB

Stage 3: Ingestion

🔄

Data Ingestion

Ingestion adalah proses memindahkan data dari source systems ke storage. Ada dua pola utama: Batch dan Streaming.

Batch vs Streaming:

Aspect Batch Processing Stream Processing
Latency Minutes to hours Milliseconds to seconds
Data Volume Large volumes Continuous, smaller chunks
Use Case Daily reports, ETL Real-time analytics, fraud detection
Tools Airflow, Spark Batch Kafka, Flink, Spark Streaming

Common Ingestion Patterns:

Stage 4: Transformation

⚙️

Data Transformation

Transformation adalah proses mengubah raw data menjadi format yang lebih useful untuk analytics dan machine learning.

Types of Transformations:

ETL vs ELT:

ETL (Extract, Transform, Load): Transformasi terjadi sebelum data masuk ke warehouse. Cocok untuk data yang sudah well-defined.

ELT (Extract, Load, Transform): Data langsung dimasukkan, transformasi terjadi di dalam warehouse. Lebih fleksibel untuk exploratory analysis.

Stage 5: Serving

📊

Data Serving

Serving adalah stage terakhir dimana data dikonsumsi oleh end users. Berbeda user memiliki kebutuhan yang berbeda.

Data Consumers:

Reverse ETL:

Reverse ETL adalah proses mengirim data dari warehouse kembali ke operational systems. Contoh: mengirim customer segmentation data dari warehouse ke CRM (Salesforce, HubSpot).

The Undercurrents

Undercurrents adalah concerns yang melintasi seluruh lifecycle. Mereka tidak spesifik ke satu stage, tapi relevan di semua stages.

🔒 Security

📋 Data Management

🚀 DataOps

🎼 Orchestration

💻 Software Engineering

Case Study: End-to-End Lifecycle

🏪 Gojek Food Delivery Analytics

Business Context: Gojek ingin melihat real-time analytics untuk order food delivery.

Lifecycle Implementation:

  1. Generate: Order data dari aplikasi (Firebase Events), driver location (GPS), restaurant data (PostgreSQL)
  2. Storage: Raw data ke S3 (Data Lake), cleaned data ke BigQuery (Data Warehouse)
  3. Ingest: Kafka Streams untuk real-time events, Airflow DAG untuk daily batch
  4. Transform: dbt untuk modeling, Spark untuk aggregasi large-scale
  5. Serve: Looker dashboards untuk business teams, API untuk driver app

Undercurrents Applied:

Decision Framework: Memilih Desain Lifecycle

Decision Point Pilih Opsi A Jika... Pilih Opsi B Jika...
Batch vs Streaming Latency target masih menit/jam, fokus cost efficiency Butuh respon detik/sub-detik, use case fraud/ops real-time
Warehouse vs Lakehouse Workload dominan BI SQL, governance sederhana Perlu satu platform untuk BI + ML + raw data
ETL vs ELT Transformasi wajib sebelum data masuk (compliance ketat) Ingin fleksibilitas eksplorasi dan transformasi di warehouse
Serving via BI vs API Consumer utama analis/business user Consumer utama aplikasi operasional/produk

Failure Modes & Anti-Patterns

Kesalahan Umum yang Perlu Dihindari

Production Readiness Checklist

Checklist Sebelum Go-Live

  1. Setiap dataset punya owner teknis dan owner bisnis.
  2. SLA/SLO freshness dan success rate terdokumentasi.
  3. Data quality checks aktif (schema, null, duplicate, range).
  4. Retry, timeout, dan idempotency sudah diuji.
  5. Lineage source-to-serving bisa ditelusuri.
  6. Ada runbook untuk incident dan prosedur backfill.
  7. PII masking/encryption sesuai klasifikasi data.
  8. Monitoring biaya (storage + compute) dan alert threshold tersedia.

✏️ Exercise: Design a Data Pipeline

Bayangkan kamu adalah Data Engineer di Bukalapak. Design lifecycle untuk sistem analytics berikut:

Pertanyaan:

  1. Apa storage systems yang cocok untuk use case ini?
  2. Batch atau streaming untuk clickstream data?
  3. Undercurrents mana yang paling kritikal untuk sistem ini?

🎯 Quick Quiz

1. Stage mana yang bertanggung jawab untuk memindahkan data dari source ke storage?

A. Generation
B. Storage
C. Ingestion
D. Transformation

2. Mana yang merupakan contoh Undercurrent (bukan stage)?

A. Data Lake
B. Security
C. ETL Pipeline
D. API Serving

3. Apa keuntungan utama dari ELT dibanding ETL?

A. Lebih cepat karena transformasi terjadi di source
B. Lebih fleksibel untuk exploratory analysis karena raw data tersimpan
C. Lebih aman untuk data sensitif
D. Tidak membutuhkan storage system

Key Takeaways

🎯 Summary

📚 References & Resources

Primary Sources

Official Documentation

Articles & Websites