บทที่ 7: Ingestion
1 min readBatch Ingestion Patterns
| รูปแบบ | คำอธิบาย |
|---|---|
| Full Snapshot | ดึงสถานะทั้งหมดทุกครั้ง — ง่ายแต่ใช้ bandwidth เยอะ |
| Incremental | ดึงเฉพาะการเปลี่ยนแปลง — ลด network/storage แต่ซับซ้อนกว่า |
| ETL (Extract → Transform → Load) | Transform ก่อนโหลด — ระบบเก่า, on-premises (destination มีพลังประมวลผลจำกัด) |
| ELT (Extract → Load → Transform) | โหลดก่อนแล้วค่อย transform — cloud data warehouse (ใช้พลังของ warehouse ช่วย transform) |
Streaming Ingestion Patterns
- Real-time ที่แท้จริงไม่มี — ทุกระบบมี latency
- Near real-time: process ทีละ events หรือ micro-batches
| แพลตฟอร์ม | จุดเด่น |
|---|---|
| Kafka | Persistent log, replay, schema registry |
| Kinesis | Shard-based scaling, max 365 days retention |
| Pub/Sub | Push + pull subscriptions, managed |
Key Challenges
- Schema Evolution: ใช้ schema registry + dead-letter queue
- Late-Arriving Data: ต้องตั้ง cutoff time
- Duplicates & Exactly-Once: streaming platforms มัก deliver at-least-once
- Throughput: ใช้ buffering และ managed services
- Bursty data: ต้องการ buffering เสมอ
Tools & Technologies
| ประเภท | ตัวอย่าง |
|---|---|
| Managed Connectors | Fivetran, Airbyte, Matillion |
| Streaming | Kafka, Kinesis, Pulsar, Pub/Sub |
| CDC | Debezium, AWS DMS, Striim |
| File Transfer | SFTP, Snowball, Object storage |