beginner 2 min answer

A team proposes bronze, silver and gold layers for a pipeline that ingests one CSV daily and produces one report. Is that right?

pragmatismlayeringdesign
Show the full answer Hide the answer

What the interviewer is testing

Whether you apply a pattern's principle or its ritual.

The answer

Two layers, not three. Keep the raw landing zone; produce the report table. The silver layer here would be a copy with no distinct work being done in it.

Three physical copies of data that needed one transformation is triple storage, triple latency and triple maintenance for ceremony.

What must be kept regardless of scale

The immutable raw landing zone. This is the part that is not optional, and the reason is specific: when the transformation turns out to be wrong — and it will — you must be able to reproduce everything downstream from something you still have. A pipeline that transforms on ingestion and discards the source cannot be corrected retrospectively.

Also keep quality checks at the boundary between raw and derived. Validating that the CSV has the expected columns, row count range and value ranges is what stops a malformed file silently producing a wrong report. At any scale, that check is worth more than an extra layer.

The general principle

The layers should exist where genuinely distinct work is done: raw preservation, conforming and cleaning, and consumption shaping. When two of those collapse into one transformation, the layers collapse with them.

The pattern earns its three layers when there are many sources needing conforming, multiple consumers wanting different shapes, and reprocessing that must not re-ingest.

What a strong answer adds

Noting the cost of premature structure on a small pipeline: more objects, more scheduling, more places for the pipeline to fail, and a longer path from source to report — which is a real freshness cost for a daily report with a delivery deadline.

And that the decision is revisitable: adding a middle layer later, when a second source arrives, is straightforward. Removing one is not.

Common weak answers

Applying the three layers because it is the reference architecture. Rejecting layering entirely and transforming on ingestion with no raw copy.