PracHub
QuestionsLearningGuidesInterview Prep
|Home/System Design/Jain Global

Design an Incremental Rolling-Metrics Data Pipeline

Last updated: Aug 5, 2026

Quick Overview

Design a production pipeline for rolling metrics over historical and daily ticker observations, with fast analyst and dashboard reads. The case examines bounded recomputation for corrections, versioned lineage, idempotent atomic publication, columnar partitioning, validation, backfills, orchestration, and proof that incremental results match a full rebuild.

  • medium
  • Jain Global
  • System Design
  • Data Engineer

Design an Incremental Rolling-Metrics Data Pipeline

Company: Jain Global

Role: Data Engineer

Category: System Design

Difficulty: medium

Interview Round: Technical Screen

## Design an Incremental Rolling-Metrics Data Pipeline Design a production pipeline that computes rolling-window metrics for approximately 1,000 tickers over about 900 days of historical observations. The initial load must compute the full history, while daily runs should avoid recomputing unaffected results. Analysts and a dashboard need fast access to the latest values and selected historical ranges. Describe the computation strategy, data model, partitioning and indexing choices, columnar storage layout, orchestration, and serving path. Explain how the pipeline handles late or corrected observations, schema changes, retries, and validation. Compare full recomputation with incremental processing and state which events should trigger each approach. ### Constraints & Assumptions - Each ticker normally has one observation per trading day, but values may arrive late or be corrected. - Several rolling windows may be computed from the same underlying series. - A failed run can be retried and must not create duplicate or partially published results. - Dashboard reads are more frequent than source-data updates. ### Clarifying Questions to Ask - Which rolling functions and window definitions are required, including minimum-period behavior? - Must corrected history be visible immediately, and how far back can corrections occur? - What latency is expected for daily publication and dashboard reads? - Do consumers need point-in-time reproducibility or only the latest corrected view? ```hint Find the invalidation range A correction on date d affects only output dates whose windows include d; use that fact to bound recomputation. ``` ### What a Strong Answer Covers - A full bootstrap followed by incremental computation that reads the new data plus the necessary window overlap. - Deterministic invalidation for late data and corrections, with versioned inputs and idempotent publication. - A schema that identifies ticker, observation date, metric, window, value, source version, and computation version. - Columnar files or tables partitioned to avoid tiny files and excessive partition scans, with clustering or indexes aligned to read patterns. - Data-quality checks, lineage, backfill controls, atomic publish semantics, and a serving layer suited to dashboard access. ### Follow-up Questions - How does a correction 30 days in the past affect a 20-day and a 60-day rolling metric? - Would you partition by ticker, date, or both, and how would you avoid thousands of tiny files? - How would you prove that an incremental run produces the same results as a clean full recomputation?

Quick Answer: Design a production pipeline for rolling metrics over historical and daily ticker observations, with fast analyst and dashboard reads. The case examines bounded recomputation for corrections, versioned lineage, idempotent atomic publication, columnar partitioning, validation, backfills, orchestration, and proof that incremental results match a full rebuild.

Related Interview Questions

  • Model Effective-Dated Compliance Restrictions for Securities - Jain Global (medium)
  • Design and Debug a Point-in-Time Backtest Data Pipeline - Jain Global (medium)
|Home/System Design/Jain Global

Design an Incremental Rolling-Metrics Data Pipeline

Jain Global logo
Jain Global
Aug 3, 2026, 12:00 AM
mediumData EngineerTechnical ScreenSystem Design
0
0

Design an Incremental Rolling-Metrics Data Pipeline

Design a production pipeline that computes rolling-window metrics for approximately 1,000 tickers over about 900 days of historical observations. The initial load must compute the full history, while daily runs should avoid recomputing unaffected results. Analysts and a dashboard need fast access to the latest values and selected historical ranges.

Describe the computation strategy, data model, partitioning and indexing choices, columnar storage layout, orchestration, and serving path. Explain how the pipeline handles late or corrected observations, schema changes, retries, and validation. Compare full recomputation with incremental processing and state which events should trigger each approach.

Constraints & Assumptions

  • Each ticker normally has one observation per trading day, but values may arrive late or be corrected.
  • Several rolling windows may be computed from the same underlying series.
  • A failed run can be retried and must not create duplicate or partially published results.
  • Dashboard reads are more frequent than source-data updates.

Clarifying Questions to Ask Guidance

  • Which rolling functions and window definitions are required, including minimum-period behavior?
  • Must corrected history be visible immediately, and how far back can corrections occur?
  • What latency is expected for daily publication and dashboard reads?
  • Do consumers need point-in-time reproducibility or only the latest corrected view?

What a Strong Answer Covers Guidance

  • A full bootstrap followed by incremental computation that reads the new data plus the necessary window overlap.
  • Deterministic invalidation for late data and corrections, with versioned inputs and idempotent publication.
  • A schema that identifies ticker, observation date, metric, window, value, source version, and computation version.
  • Columnar files or tables partitioned to avoid tiny files and excessive partition scans, with clustering or indexes aligned to read patterns.
  • Data-quality checks, lineage, backfill controls, atomic publish semantics, and a serving layer suited to dashboard access.

Follow-up Questions Guidance

  • How does a correction 30 days in the past affect a 20-day and a 60-day rolling metric?
  • Would you partition by ticker, date, or both, and how would you avoid thousands of tiny files?
  • How would you prove that an incremental run produces the same results as a clean full recomputation?

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More Jain Global•More Data Engineer•Jain Global Data Engineer•Jain Global System Design•Data Engineer System Design

Your design canvas — auto-saved

PracHub

Master your tech interviews with 9,000+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • AI Coding Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.