learntodriveai.dev/Data Engineering/Building and Verifying a CSV Pipeline
Data EngineeringProject 016 unitsVerified on 16 October 2026

Building and Verifying a CSV Pipeline

Sarah HendersonCatchment Monitoring Coordinator · Regional water utility · Bendigo, Australia
Email · from Sarah
Right now, if EPA Victoria asks "how many breaches did Upper Coliban have last quarter?" I have to open three spreadsheets and add numbers by hand.
Chat with Sarah

What you hand back

  • One DuckDB database of all twelve files
  • A staging table with chlorine in mg/L
  • A deduplicated mart table for compliance queries
  • Breach counts by monitoring point
  • Result-class distribution across the catchment
  • An inspector lookup with sample traceability

6 units

  1. Unit 1: Meet the client and understand the brief

    Read Sarah's brief, the pipeline spec and the schema, then look over the Lake Eppalock sample file.

    Open unit 1
  2. Unit 2: Set up the project and load the data

    Set up the project folder, load all twelve CSV files into DuckDB and record the 4,810 source row count.

    Open unit 2
  3. Unit 3: Build the staging layer

    Build the staging table that casts types, renames drifting columns and converts chlorine from µg/L to mg/L.

    Open unit 3
  4. Unit 4: Build the mart table

    Build the deduplicated mart table, then check its 4,800 rows and the top three breach counts.

    Open unit 4
  5. Unit 5: Verify and re-run

    Run the whole pipeline a second time, confirm the counts hold, and check the result-class distribution.

    Open unit 5
  6. Unit 6: Show Sarah and close the project

    Write Sarah's three queries, add her average turbidity request, then commit and push the finished pipeline.

    Open unit 6
Read the full brief

You're building a data pipeline for a regional water utility in Bendigo, Victoria — loading CSV sampling records from six catchment monitoring points into DuckDB, cleaning and deduplicating them in a staging layer, and transforming them into a mart table the utility can query for compliance reporting to EPA Victoria.

The discipline skills: loading CSV data into DuckDB with correct encoding and type coercion, writing SQL transformations for cleaning and deduplication, verifying row counts between source and target, and reading a schema specification before building anything.

This is your first time directing AI to build a data pipeline. AI will produce something that runs without errors — and that can still produce wrong numbers. A pipeline that completes successfully is not the same as a pipeline that's correct. The skill you're building here is checking AI's output against known targets: row counts, breach totals, specific values. AI won't tell you when the numbers are wrong. You find out by looking.

Your Role

You're building Sarah's data pipeline. Everything you need is provided — the pipeline spec, the schema, the expected output targets. Read them before you direct anything. Your job is to give AI the right context, review what it produces, and verify the numbers.

What's New

This is your first real pipeline. The work follows a pattern you'll use on every project after this: read the spec, direct AI, check the result against known targets.

The hard part isn't getting the pipeline to run. Claude Code will produce something that executes without errors. The hard part is knowing whether the output is actually correct. A pipeline that completes successfully can still produce wrong numbers — and it won't tell you.

Tools

  • Python — via your Miniconda de environment
  • DuckDB — lightweight database for loading and querying the monitoring data
  • SQL — for transformations inside DuckDB
  • Claude Code — your AI agent, doing the implementation work
  • Git / GitHub — version control from the start
  • VS Code — your editor

Materials

You'll receive:

  • Pipeline specification — what to build and what "correct" means
  • Schema documentation — the staging and mart layer structure, naming conventions
  • Sample data — CSV files from Sarah's monitoring points
Materials · 15 files
Start Project 1

You work at a computer with a terminal. Signed in, your place is saved.