Data Engineering interview question · Most asked
Batch or streaming: how do you decide?
Summary
Start from a freshness requirement agreed with the data's consumers, then choose the simplest style that meets it: daily or hourly batch, micro-batch every few minutes, or true streaming only when decisions need seconds (fraud checks, live pricing, alerting).
Longer Answer
Streaming adds always-on infrastructure, state and checkpoint management, harder reprocessing, late-event handling and more on-call load. Many platforms combine both: a stream for a few low-latency use cases and batch for everything else, often fed from the same change data capture feed.
Key Points
- Turn 'real-time' into a freshness target.
- Prefer batch, then micro-batch, then streaming.
- Streaming costs complexity and on-call load.
- Mixed architectures are common.
Deep dive: ETL and Data Pipelines: Batch, Micro-Batch or Streaming?
Explanation
What interviewers look for
A requirement-driven decision and awareness of streaming's operational cost.
More most-asked Data Engineering questions
- What is the difference between ETL and ELT, and when would you choose each?
- What is change data capture (CDC), and why is log-based CDC preferred over polling?
- What does it mean for a data pipeline to be idempotent, and how do you achieve it?
- How do you implement incremental extraction, and what can go wrong?
- How do you deduplicate events, and what does 'exactly-once' really mean?
- What is a star schema, and why is it used in data warehouses?
- What is the grain of a table, and what is join fan-out?
- Explain slowly changing dimensions, especially Type 1 and Type 2.