Request a demo
Use case

Use case: a nightly carrier-manifest load for a logistics company

A worked example: a made-up logistics company's data engineer draws the nightly load of carrier shipment manifests (wait, convert, load, publish, check, test) and gets a DAG the whole team can review.

November 6, 2026 · 6 min read · All articles

Logistics runs on files. Carriers send manifests (which parcels were picked up, from where, going where, at what weight) as CSV drops on a schedule they choose, not you. Turning those drops into a table the operations team trusts every morning is a classic nightly pipeline, and a good test of whether a visual designer produces something an engineer would sign off.

Example · a made-up logistics company

Northbeam Logistics and the morning shipments table

Lena is a data engineer at Northbeam Logistics, a fictional regional carrier-of-carriers. Partner carriers drop manifest CSVs into an object-storage bucket overnight. By 07:00 the operations team expects analytics.shipments_daily to hold yesterday's shipments, and twice last quarter it silently held half of them. Lena's goal is a pipeline that fails loudly instead.

The shape of the pipeline

  1. Wait for carrier manifests (FILE_WATCHER): watch carriers/manifests/{{ ds }}/ in the landing bucket. If nothing arrives, the run fails here, at the right step, rather than loading an empty day.
  2. CSV to Parquet (FILE_PREPROCESS): convert each carrier's CSV to Parquet under carriers/parquet/{{ ds }}/.
  3. Load staging (LOAD_DATABASE): append the day's Parquet to staging.shipments through the warehouse data location.
  4. Publish daily shipments (LOAD_DATABASE with a query as its input source): conform the staged rows and append them to analytics.shipments_daily through the same data location.
  5. Check row counts (RECORD_COUNT_VALIDATION): the rows published must equal the rows staged. This is the step that would have caught last quarter's half-loads.
  6. dbt tests (DBT_TEST): run the tests on the shipments_daily model.

On the canvas

The carrier_manifests_nightly workflow on the designer canvas: Start, Wait for carrier manifests, CSV to Parquet and Load staging on the first row, then Publish daily shipments, Check row counts, dbt tests and End on the second, joined by links; the header says Saved, 8 nodes and 7 links.
Lena's pipeline in the designer: eight nodes, seven links, saved. Everything here is made up.

Lena drags the six nodes onto the canvas between Start and End and links them. The header tells her when anything is missing: before she fills in the row-count check's source and target, it reads "3 to fix". She fills each node's parameters in its dialog, pointing every database step at the warehouse location rather than typing a host.

Example · the review

What the team actually reviews

Lena's colleague reviews the change as files, not as a screenshot: the generated DAG (eight build_task calls and seven dependencies), the task list in config.yaml, and the parameters in properties.yaml. The review catches one thing: the row-count check was originally placed before the publish step, so it compared the files with staging and would never have caught a failed publish. Moving it after the publish, so it compares staging with the published table, is a drag on the canvas and a two-line diff in the YAML.

Scheduling and metadata

In the workflow list the pipeline is marked source FILEWATCHER, catalog logistics, category ingestion, priority P1, load type incremental, schedule 0 2 * * *. Those fields end up in the generated properties too, so whoever is on call at 02:15 can see what kind of pipeline failed and how much it matters.

Plan for carrier lateness. A file watcher that waits too briefly turns one late carrier into a failed night; one that waits forever hides the problem until 07:00. Decide how long to wait, and who is told when the wait runs out, before you deploy.

How long to wait is a scheduling decision

FILE_WATCHER leaves the waiting to the schedule: when its task runs, it checks the bucket (S3 or OCI Object Storage) for files matching the path or prefix, and reports what it found. The generated DAG retries a failed task once, five minutes later. So the real lever is the schedule. Lena looks at when the carriers' files have actually arrived over a few weeks and sets the cron to run after the usual last arrival, with enough time before 07:00 for someone to act. A straggler workflow later in the morning (see the variations below) handles the carrier that is late anyway.

She also leaves the watcher's AWS key fields empty. The node declares them as optional, falling back to the credentials of the environment it runs in, and a key typed into them would sit in properties.yaml.

Making the count check mean something

RECORD_COUNT_VALIDATION compares the row count of a whole source with the row count of a whole target: tables (location, schema and table) or CSV files. It does not filter by date. That shapes the design around it:

  • Truncate staging each night. If Load staging appends, staging.shipments grows every day and its count says nothing about last night. Setting the load mode to truncate makes the staging count exactly "rows received for this run".
  • Count the day, not the history. analytics.shipments_daily keeps history, so compare staging with something that holds only the day just published, such as a view over yesterday's rows, if your database counts a view like a table. Test that against the warehouse once before relying on it.
  • Leave "allow mismatch" off. It exists for observe-only trials; in production it would turn the one check that matters into a log line.
Test the publish step on a scratch schema first. LOAD_DATABASE with a table or query as its input source copies between tables through a data location. Point it at a scratch schema for the first runs, and check the row-count step fails when you expect it to.

The on-call view

Failed taskWhat it usually meansFirst action
Wait for carrier manifestsA carrier's file is late, or the path changedLook in the landing bucket for the run date's prefix
CSV to ParquetA file arrived malformed or with new columnsOpen the carrier's CSV; ask the carrier before changing anything
Load stagingThe warehouse location is unreachable, or the schema movedCheck the warehouse location and the table
Check row countsRows were lost or duplicated between staging and publishCompare the two counts by hand before rerunning
dbt testsThe data loaded but breaks a model's rulesRead the failing test; it names the model and the rule

What Lena gets

  • A DAG that looks like every other generated DAG, so the on-call engineer already knows how to read it.
  • Three explicit failure points (no file, count mismatch, failed test), each named after the step that failed.
  • A change process that is a YAML diff, which the team already knows how to review.

Variations

  1. Several carriers, one pipeline: keep one watcher per carrier prefix if they arrive at very different times; otherwise one watcher on the parent prefix.
  2. Late files: a second, later workflow can pick up stragglers with the same nodes and a different schedule.
  3. Notification: add an email node after the tests for a success summary, if the operations team wants one.

Next: use case: a finance team's daily API pull.

Draw one of your pipelines with us

Bring a pipeline you run today, hand-written or scheduled somewhere else. We will draw it in the designer, generate the DAG and walk through deploying it to your Airflow.

Request a demo