Memahami berbagai sumber data dan cara mengekstraknya
Anggap source system sebagai βasal dataβ. Fokus baca:
Kamus istilah: DE-GLOSSARY.md
Definisi awam: Tempat asal data sebelum masuk pipeline data.
Definisi teknis: Sistem operasional atau eksternal yang menghasilkan data untuk ingestion.
Contoh praktis: PostgreSQL aplikasi, API payment gateway, log clickstream.
Definisi awam: Ambil hanya data yang berubah.
Definisi teknis: Teknik capture perubahan insert/update/delete dari source database.
Contoh praktis: Order baru/diupdate otomatis tersinkron ke warehouse tanpa full dump.
Source Systems adalah sistem atau aplikasi yang menciptakan data. Ini adalah titik awal dari data engineering lifecycle. Tanpa memahami source systems, kita tidak bisa membangun pipeline yang efektif.
Data engineers don't control source systems, but must understand them deeply to build reliable pipelines.
MySQL, PostgreSQL, Oracle - Transaksi bisnis harian
REST, GraphQL - Data dari third-party services
CSV, JSON, Parquet, Log files
Kafka, RabbitMQ - Event streaming real-time
Sensors, wearables, smart devices
Salesforce, HubSpot, Google Analytics
OLTP databases adalah sistem transaksi bisnis utama. Mereka designed untuk ACID compliance dan low-latency writes, bukan untuk analytics.
| Database | Type | Best For | CDC Support |
|---|---|---|---|
| PostgreSQL | Open Source RDBMS | Web apps, complex queries | β Logical Replication |
| MySQL | Open Source RDBMS | Web apps, high read traffic | β Binary Log |
| SQL Server | Enterprise RDBMS | Enterprise applications | β Change Tracking |
| MongoDB | Document Store | Flexible schemas, JSON data | β Change Streams |
When: Small tables (< 1M rows), initial load
Pros: Simple, complete snapshot
Cons: Slow untuk large tables, heavy load on source
When: Tables dengan updated_at column
Pros: Efficient, lower load
Cons: Misses hard deletes, requires timestamp column
When: Append-only tables dengan ID
Pros: Reliable, no timestamp needed
Cons: Doesn't capture updates/deletes
When: Real-time requirements, audit needs
Tools: Debezium, AWS DMS, Fivetran
Pros: Captures all changes, low latency
Cons: More complex setup
CDC adalah metode terbaik untuk merekam setiap perubahan data di source system.
APIs adalah cara umum untuk mengakses data dari third-party services atau internal microservices.
| Type | Format | Best For |
|---|---|---|
| REST | JSON, HTTP verbs | General purpose, simple CRUD |
| GraphQL | Query language | Flexible data fetching, mobile apps |
| gRPC | Protocol Buffers | High performance, internal services |
| Webhook | HTTP POST callbacks | Real-time event notifications |
Message queues dan event streaming systems adalah source untuk real-time data.
Producers β Topics (Partitioned) β Consumers
Topics β Partitions β Segments (on disk)
Consumer Groups β Parallel processing
| Concept | Description |
|---|---|
| Topic | Category/feed name (e.g., "user-events", "orders") |
| Partition | Ordered, immutable sequence of messages within a topic |
| Offset | Unique ID of a message within a partition |
| Consumer Group | Group of consumers that share work (one consumer per partition) |
| Retention | How long to keep messages (time-based or size-based) |
Files masih menjadi source data yang umum, terutama untuk:
| Format | Structure | Best For | Compression |
|---|---|---|---|
| CSV | Text, row-based | Simple data, human-readable | β Poor |
| JSON | Text, nested objects | Semi-structured data, APIs | β οΈ Moderate |
| Parquet | Binary, columnar | Analytics, large datasets | β Excellent |
| Avro | Binary, row-based | Streaming, schema evolution | β Good |
| ORC | Binary, columnar | Hadoop ecosystem | β Excellent |
IoT devices menghasilkan data dengan karakteristik khusus:
Sebelum membangun pipeline, selalu tanyakan:
Volume:
Velocity:
Variety:
Veracity:
Transactional Data:
Behavioral Data:
Third-party:
| Decision Point | Pilih Opsi A Jika... | Pilih Opsi B Jika... |
|---|---|---|
| CDC vs Batch Extract | Butuh sinkronisasi near real-time dan source mendukung logs | Latency longgar atau source legacy tanpa CDC support |
| Pull API vs Webhook/Event push | Provider tidak menyediakan event endpoint | Perlu update cepat dan efisiensi network |
| Single source of truth vs Multiple source fusion | Ada sistem otoritatif yang jelas | Nilai bisnis butuh penggabungan dari banyak sistem operasional |
Kamu diminta untuk mendesain pipeline untuk sebuah fintech lending app. Identifikasi source systems berikut dan extraction method yang tepat:
Hint: Pertimbangkan volume, latency requirement, dan format data.
1. Metode terbaik untuk capture semua perubahan data termasuk delete adalah?
2. Format file terbaik untuk analytics workload adalah?
3. Kafka partition key digunakan untuk?
Memahami source systems adalah fundamental untuk data engineering. Setiap source memiliki karakteristik berbeda: OLTP databases untuk transaksi, APIs untuk integrasi, Kafka untuk streaming, dan files untuk batch.
Pilih extraction method yang sesuai: Full extract untuk small tables, incremental untuk large tables, dan CDC untuk real-time requirements.