The Vendor Who Never Warns You

A medium Pipeline Design interview practice problem on DataDriven. Design the pipeline on the canvas: sources, transforms, storage and checks, then get feedback on it.

Domain
Pipeline Design
Difficulty
medium
Seniority
L5
Asked in
Equinox

Problem

An external vendor sends us a data file every month, and its structure shifts without warning: new columns appear, existing ones get renamed, and some are occasionally dropped. Design the pipeline that ingests it for the analysts' monthly reporting.

Every month, something is different. The dashboards have no idea.

Business requirements

Worked solution and explanation

This is a contract boundary dressed up as a file-ingest job. Anyone can land a file and load it. The skill being probed: can you put a stable interface between a producer who changes shape without warning and consumers who cannot change at all? The trap is inferring the schema each month and loading whatever parses. A rename then becomes a silent null column in the dashboards, and a truncated file becomes a partial load that analysts find out about at 9am on the 2nd, when the totals are low.

Walk the requirements

Step 1: Land the raw file untouched, then let the orchestrator own the clock

The file arrives on the 1st and is needed by 9am on the 2nd, so you have a day of slack, not minutes. Keep the original in a landing zone so a bad run can be replayed without re-asking the vendor. The orchestrator schedules the run and pages if a stage is at risk, which is how you get warned before 9am rather than at 9am.

Step 2: Gate the load with a schema validator that alerts

Compare the file's columns, row counts and types against the registered schema on arrival. Anything missing, truncated or unrecognized stops here and alerts the team immediately. The validator is the only door into the load, so a partial file never reaches a table. That is what 'partial loads are worse than no load' means in practice.

Step 3: Normalize into the warehouse, then expose a contract view

The normalization transform maps whatever the vendor called a column onto your stable names and loads the warehouse table. Dashboards read only the contract view. When the vendor renames a column, you edit the mapping and the view definition stays put, so no dashboard query changes.

The validator is the only path into the load. The contract view is the only thing dashboards read. The orchestrator owns the deadline.
  • vendor SFTP file (source)
  • landing zone (storage)
  • orchestrator (transform, Airflow); alerting: Stage at risk vs the 9am-on-the-2nd deadline
  • schema validator (quality gate, Great Expectations); on error: alert; alerting: Schema drift, truncated or malformed file
  • normalization layer (transform, dbt)
  • target warehouse (storage, PostgreSQL); freshness: < 24h
  • contract view (storage)
  • analyst dashboards (consumer)
  • vendor SFTP file -> landing zone
  • landing zone -> orchestrator
  • orchestrator -> schema validator
  • schema validator -> normalization layer
  • normalization layer -> target warehouse
  • target warehouse -> contract view
  • contract view -> analyst dashboards
Load what parses
Infers columns each month. A rename lands as a new column, dashboards return nulls, and a truncated file loads partially. Nobody hears about it until analysts open their reports.
Validate, then load
Checks structure against the registered schema first. A bad file stops at the gate with an alert, and the warehouse keeps last month's complete data until someone decides.

Common follow-up questions