Reviewed by Aditya Kumar · Last reviewed 2026-08-08
Batch processing handles large volumes of historical financial data at scheduled intervals for tasks like reporting and reconciliation, prioritizing throughput. Stream processing, conversely,…
This hard-level General/Other question appears frequently in data engineering interviews at companies like Goldman Sachs. While less common, it tests deeper understanding that distinguishes strong candidates.
This is a senior-level question that tests architectural thinking. Lead with the high-level design, then drill into specifics. Discuss trade-offs explicitly - there is rarely one correct answer. Show awareness of scale, fault tolerance, and operational complexity. The expert answer includes a code example that demonstrates the implementation pattern.
Batch processing handles large volumes of historical financial data at scheduled intervals for tasks like reporting and reconciliation, prioritizing throughput. Stream processing, conversely, processes financial events continuously as they arrive, enabling real-time actions for fraud detection or algorithmic trading where low latency is paramount.
Batch Processing
Batch processing operates on finite, bounded datasets at predetermined intervals (e.g., hourly, nightly). It's well-suited for tasks that require a complete view of historical data or complex aggregations where immediate results aren't critical. While it incurs higher latency due to scheduled runs and processing entire datasets, it's generally simpler to design, debug, and manage state.
* Financial Use Cases: End-of-day (EOD) reporting, general ledger reconciliation, calculating daily portfolio valuations, monthly regulatory compliance reports, and large-scale data warehousing transformations using tools like dbt on platforms like Snowflake or Spark batch jobs.
Stream Processing
Stream processing handles continuous, unbounded streams of data, processing events individually or in micro-batches as they arrive. Its primary advantage is extremely low latency, enabling near real-time insights and actions. This comes at the cost of increased complexity in managing state, handling out-of-order events, and ensuring fault tolerance with "exactly-once" processing semantics (e.g., using Kafka offsets or Flink checkpoints).
* Financial Use Cases: Real-time fraud detection, algorithmic trading signal generation, market data analytics, instant payment processing, and real-time alerts for unusual account activity using systems like Apache Kafka for ingestion and Apache Flink or Spark Structured Streaming for processing.
The fundamental trade-off lies between latency and complexity/cost. Stream processing provides immediate insights but demands more sophisticated infrastructure and development effort. Batch processing offers simpler development and more predictable resource allocation, making it generally cheaper, but with delayed insights.
For example, calculating the total daily trading volume for regulatory reporting is a perfect fit for a batch job:
-- Batch processing: Calculate yesterday's total trade volume
SELECT
trade_date,
SUM(trade_amount) AS total_volume
FROM
daily_trades
WHERE
trade_date = CURRENT_DATE - INTERVAL '1 day'
GROUP BY
trade_date;
Conversely, detecting a fraudulent transaction requires stream processing to analyze each transaction as it occurs, comparing it against real-time risk profiles to block suspicious activity within milliseconds.
In the interview, also mention that modern data architectures often combine both approaches, such as Lambda or Kappa architectures, to leverage the strengths of each for different analytical needs.
Pro-Move: 'We use batch for EOD P&L and stream for fraud—batch is source of truth; stream catches 95% of fraud in under 1 min.' Red Flag: Stream for everything—over-engineering; batch suits most reporting.
Some links below are affiliate links. If you buy through them we may earn a small commission at no extra cost to you — it helps keep DataEngPrep free.
According to DataEngPrep.tech, this is one of the most frequently asked General/Other interview questions, reported at 1 company. DataEngPrep.tech maintains an editor-reviewed database of 1,863 data engineering interview questions across 7 categories.