# A meal-kit subscription company runs two reports off the same Postgres orders database

Canonical URL: <https://datadriven.io/problems/a-meal-kit-subscription-company-runs-two-reports-off-the-sam-51266874>

Domain: Pipeline Design · Difficulty: medium

## Problem

A meal-kit subscription company runs two reports off the same Postgres orders database. The canvas has both consumers in place: a Looker chart read once Monday mornings (last week's orders by region) and a fulfillment fraud-blocking service that flags suspicious orders within 30 minutes before fulfillment ships. Apply the three-question test this section just taught and pick the rhythm per consumer: the Monday chart tolerates daily or weekly freshness (Tier 4 or 5; batch wins on cost), and the fraud signal needs sub-15-minute freshness (Tier 1 or 2; streaming wins because batch cannot meet the floor). Build two side-by-side pipelines from the same Postgres source: pipeline A is daily batch (an orchestrator like Airflow plus a warehouse like Snowflake plus the Looker chart, slaFreshness < 24h on the warehouse table), and pipeline B is sub-15-min streaming (Kafka CDC plus a streaming engine like Flink, Spark Structured Streaming, or Kafka Streams plus a low-latency serving store plus the fraud service, slaFreshness real-time or < 1min on the streaming side). The same Postgres source feeds both; do not duplicate the source.

## Related

- [All practice problems](https://datadriven.io/problems)
- [Mock interview mode](https://datadriven.io/interview/a-meal-kit-subscription-company-runs-two-reports-off-the-sam-51266874)
- [System Design Interview Questions](https://datadriven.io/data-engineering-system-design)
- [Data Engineering Interview Prep Guide](https://datadriven.io/data-engineer-interview-prep)
- [Daily Challenge](https://datadriven.io/daily)

---

Source: DataDriven (https://datadriven.io). 100% free data engineering interview prep. Live code execution against Postgres 16, Python 3.11, and Spark sandboxes. No paywall, no premium tier, no signup gate.