HomeInterview QuestionsWhen reprocessing new jobs with stored procedures,…

When reprocessing new jobs with stored procedures, what type of architecture would you use to handle a terabyte of data?

🔴 Hard System Design Senior level
1Times asked
Jul 2026Last seen
Jul 2026First seen

💡 Model Answer

When reprocessing new jobs that rely on stored procedures and need to handle a terabyte of data, I would design a batch‑processing architecture that separates data ingestion, transformation, and storage. First, raw data lands in an object store (e.g., Amazon S3) as immutable files. An orchestrator like Airflow or AWS Step Functions triggers a Spark job that reads the new files, applies the stored‑procedure logic via a JDBC connector to a data warehouse (e.g., Snowflake or Redshift), and writes the results back to a partitioned table. The Spark job uses partition pruning and columnar formats (Parquet) to keep I/O efficient. For incremental loads, I’d maintain a change‑data‑capture (CDC) table that records processed file names, so re‑runs only touch new data. Monitoring is handled with CloudWatch or Datadog, and the architecture is horizontally scalable: adding more executors or scaling the warehouse cluster handles larger volumes. This design keeps the stored‑procedure logic reusable, ensures idempotent re‑processing, and supports terabyte‑scale throughput.

This answer was generated by AI for study purposes. Use it as a starting point — personalize it with your own experience.

🎤 Get questions like this answered in real-time

Assisting AI listens to your interview, captures questions live, and gives you instant AI-powered answers on a discreet on-screen overlay.

Get Assisting AI — Starts at ₹500