Mirage Academy · Course · Advanced · Data pipelines

Data engineering for AI course: build the pipeline behind your AI app

Data Engineering for AI Applications sits at the advanced level, for engineers and technical product people who build AI features. You build an ingestion, transformation and retrieval pipeline, and you learn to keep its data current and traceable instead of loading it once. Lessons and this page are English only.

Open the courseNext: the Production RAG course

The pipeline

One pipeline runs through the course: ingest, clean, check, serve, and a schedule runs it again

The course follows a single pipeline from source to retrieval. Watch the intro video, then read the pipeline station by station.

Intro video
Still from the intro video for the course Data Engineering for AI Applications
Intro video, 1 min 3 s. Transcript below.
Read the transcript

Your AI application is only as good as the data it retrieves. This course is for engineers who must keep that data fresh, clean and traceable, not just load it once. The course follows one pipeline. You ingest files, APIs and change data. You clean, parse and normalise the text. You check quality against contracts. You serve the result to retrieval and models, and the schedule runs it again. A pipeline you can trust differs from a one-off script. Orchestration replaces running it by hand. Lineage and versioning replace guessing which data produced an answer. Checks replace finding bad text in production. In the capstone you build your own ingestion-to-retrieval pipeline. If that is the work in front of you, enroll and start with chapter one.

  1. 01Ingest
  2. 02Clean and parse
  3. 03Check against contracts
  4. 04Serve to retrieval and models

The schedule runs it again

  1. 01

    Ingest

    Files, APIs and change data come in through full and incremental loads.

  2. 02

    Clean and parse

    Text is cleaned, parsed and normalized so that equal content looks equal.

  3. 03

    Check against contracts

    Quality checks and data contracts decide what may move on.

  4. 04

    Serve to retrieval and models

    The result is served to retrieval and to models, in a form the application can query.

The course pipeline as a conveyor of four stations, from ingest to serving, with a dotted line back to the start for the schedule.
  • Chapter one sets the base: what stays the same and what changes when AI uses the data, pipeline stages with volume arithmetic, fitness for purpose measured in SQL, freshness as a measurable promise, and the choice between batch, micro-batch and live query.
  • The rest of the course turns a one-off script into a scheduled pipeline, with chapters on orchestration, lineage and versions, and quality checks.

Chapter 2

An incremental load picks up only what changed since its watermark, and it misses deletes

Edit, add or delete a row in the example source, run the load, and see which rows move to the target.

Run an incremental load on an example

Made-up records, shown only to explain the method. They are not data from the course or from any system.

Watermarknone yet

Source table

  • Record Aversion 1 · changed at 1 · waits for the next run
  • Record Bversion 1 · changed at 2 · waits for the next run
  • Record Cversion 1 · changed at 3 · waits for the next run
  • Record Dversion 1 · changed at 4 · waits for the next run
  • Record Eversion 1 · changed at 5 · waits for the next run

Target table

Nothing is loaded yet. Run the load.

Nothing has run yet. All source rows wait for the first run.

The rule: a run loads each source row that changed after the watermark, writes each one by its key so that a row already in the target is replaced, not duplicated, and then moves the watermark to the newest change it loaded. A run that finds nothing new changes nothing. A row deleted at the source does not count as changed, so the target keeps it: deletes need change data or another signal.

  1. 01

    Full and incremental loads

    Full loads, incremental loads and the watermark that remembers where the last one stopped.

  2. 02

    Upserts and repeatable loads

    Writing by key so that running a load again gives the same table.

  3. 03

    APIs with pages and limits

    Reading from paginated, rate-limited APIs, page by page and within their limits.

  4. 04

    Files and formats

    Reading files in their different formats.

  5. 05

    Change data and deletes

    Capturing change data, including the deletes that a watermark cannot see.

An example incremental load: a source table, a target table and a watermark. Edit, add or delete source rows, run the load and watch what it picks up.

Chapter 3

Text is cleaned, normalized and deduplicated before anything is chunked

Three before and after pairs show what a cleaning step does. The strings are made up for the example.

Raw → CleanedExample strings

  • Unicode"Cafe\u0301""Caf\u00e9"Same letters in one canonical form: two code points become one, so equal words match.
  • HTML to text<nav>Home | Docs</nav><p>Refunds follow the policy.</p><footer>Imprint</footer>Refunds follow the policy.Navigation and footer text often repeats across pages, so it goes. The content stays.
  • DuplicatesRefunds follow the policy. Refunds follow the policy. Refunds follow the policy!Refunds follow the policy.The exact copy is dropped. The near copy is caught by a similarity rule that you choose.
  1. 01

    Encodings and Unicode normalization

    Encodings, and Unicode normalization so that equal text is equal.

  2. 02

    HTML to text and boilerplate

    Turning HTML into text and removing boilerplate.

  3. 03

    Exact and near duplicates

    Finding repeated content, whether it is identical or nearly the same.

  4. 04

    Chunking arithmetic

    Working out how many chunks a document yields at a given size and overlap.

  5. 05

    Parse quality gates

    Checks that stop badly parsed text from moving on.

Three raw strings next to their cleaned form: Unicode normalization, HTML to text, and duplicate removal.

Chapter 4

Raw tables become modeled layers, and versions are kept

The retrieval data model is designed, tested and versioned like any other product table.

LayersExample drawingRawExactly as it was loadedStagingCleaned and typedRetrieval modelWhat the application readsTwo versions of one row over time
  • Version 1replaced
  • Version 2latest

As-of query: the row as it stood on an earlier dayLatest row per key: the current answer

  1. 01

    Staging and modeled layers

    Separate layers for what was loaded and for what the application reads.

  2. 02

    A retrieval data model

    A table design made for retrieval, not copied from the source.

  3. 03

    Versions and as-of queries

    Keeping all versions and asking what was true on an earlier day.

  4. 04

    Latest row per key

    Picking the current row for each key.

  5. 05

    Tested normalization functions

    Cleaning logic written as functions that carry tests.

Three data layers from raw to the retrieval model, and two versions of one row on a time axis: an as-of query reads the old one, the latest row is the current one.

Chapter 5

A check is a query that returns the failing rows, and its severity decides what happens next

Each example check pairs one query with one severity and one action.

Checks as failing-row queriesExample checks

  • Text is not empty

    block
    SELECT id FROM chunks WHERE text = ''ActionStop the run before anything is served.
  • Source is known

    warn
    SELECT id FROM chunks WHERE source_id NOT IN (SELECT id FROM sources)ActionRaise an alert and keep loading.
  • Change time is set

    quarantine
    SELECT id FROM chunks WHERE updated_at IS NULLActionMove the failing rows aside and load the rest.

The rule: a check passes when its query returns no rows. When it returns rows, the severity decides: warn raises an alert, block stops the run, and quarantine moves those rows aside and lets the others through.

  1. 01

    Kinds of checks

    The families of checks and what each one can catch.

  2. 02

    Data contracts

    Data contracts, one lesson in the quality chapter.

  3. 03

    Checks as failing-row queries

    Writing each check so that it lists the rows that break it.

  4. 04

    Severity and action

    Deciding whether a failure warns, blocks or is handled another way.

  5. 05

    Quarantine

    Quarantine for the rows that fail a check.

Three example checks written as failing-row queries, each with a severity chip and the action it triggers.

Chapter 6

Orchestration replaces running the pipeline by hand

Chapter 6 covers tasks and dependencies, schedules, idempotent runs and backfills, retries, and sensors.

Schedule: one run at a set time each dayExample graph

    • Extractretryneeds: nothing
    • Cleanneeds: Extract
    • Checkneeds: Clean
    • Embedneeds: Clean
    • Loadalertneeds: Check and Embed
  1. 01

    Tasks and dependencies

    Tasks, and the dependencies between them.

  2. 02

    Schedules

    Running the pipeline at set times.

  3. 03

    Idempotent runs and backfills

    Idempotent runs, and backfills of past periods.

  4. 04

    Retries, timeouts and alerts

    What a task does when it fails, runs long or needs someone told.

  5. 05

    Sensors and triggers

    Sensors and triggers for starting a run.

An example task graph under a schedule: five tasks in four steps, each listing what it needs, with a retry on the first and an alert on the last.

Chapter 7

Lineage and versions tell you which data produced an answer, and support erasure across derived data

Derived rows point back to their sources.

Content hash on each nodeExample trace

Source
  • handbook.pdfa3f9
Derived chunks
  • Chunk 171c2
  • Chunk 2e04b
  • Chunk 39d18
Vectors
  • Vector 171c2
  • Vector 2e04b
  • Vector 39d18

Remove the source, and the nodes derived from it are found on the same trail.

  1. 01

    Lineage and impact analysis

    Tracing which outputs depend on an input, and what a change would touch.

  2. 02

    Content hashes as versions

    Using a hash of the content to tell versions apart.

  3. 03

    Run manifests

    A record of each run, so that a result can be reproduced.

  4. 04

    Versioning vectors

    Keeping versions of the vectors, not only of the text.

  5. 05

    Erasure across derived data

    Removing a source and everything derived from it.

An example lineage trace: one source file, the chunks derived from it and one vector per chunk, with a content hash on each node.

Chapter 8

The retrieval table is built to be queried, with access control inside the query

The pipeline ends where the application starts: a table that retrieval and models read.

A retrieval tableExample table

chunkvectorversionteamReader may see this row
Refunds follow the policy.(vector)2support
Pay bands by level.(vector)1hr
Setup steps for a new device.(vector)3support

The query's own filterWHERE team IN (the reader's teams)

  1. 01

    A retrieval table

    A table shaped for the questions retrieval asks.

  2. 02

    Access control in the query

    Access control inside the query itself.

  3. 03

    Keyword plus vector

    Serving both search types from one table.

  4. 04

    Index settings and maintenance

    Choosing index settings and keeping the indexes healthy.

  5. 05

    Datasets for evaluation and training

    Cutting datasets for evaluation and training from the same data.

An example retrieval table: the query carries its own filter, so a reader gets the rows of their team and the others stay locked.

Chapter 9

The capstone is an ingestion-to-retrieval pipeline that you specify, build and operate

The last chapter runs the whole pipeline in five steps.

capstone run log
  1. Specify sources, refresh and gates

    done

    You write down your sources, how often they refresh and the gates a run must pass.

  2. Ingest and clean

    done

    You build the ingestion and the cleaning.

  3. Model and check

    done

    You model the data and add the checks.

  4. Load, serve and evaluate

    done

    You load the table, serve it to retrieval and evaluate the result.

  5. Operate and document

    done

    You run the pipeline and document how it works.

A pipeline built, checked and documented. The full syllabus is on the course page:Open the course: Data Engineering for AI Applications

The capstone as a run log of five steps, each ticked off, ending with a pipeline that is built, checked and documented.

How you learn here

An AI coach hears you explain your pipeline, and a certificate follows

AI coach
You talk through your design decisions with the coach by voice. It is an AI, and it presses on the parts you explain loosely.
Certificate
A certificate comes with the course once you meet the rules. It has a check code, and anyone holding the code can use the public check page to see whether the code is genuine. The page names no one.
Limits
The Get certified page says the certificate is not a state-recognized qualification. The coach has no say in whether you receive it.
Learning here in three rows: the voice coach, the certificate and where the certificate's claim ends.

All rules for the certificate →

Where to go next

Pair the pipeline with the search that is built on top of it

These three pages sit closest to this course.

  • Production-Ready RAG Engineering

    • Course

    Build a searchable, grounded knowledge application that cites its sources and is measured.

  • RAG course guide

    • Topic page

    A guide to what RAG is, for the search side of what this pipeline serves.

  • AI-Powered Data Analytics & Business Intelligence

    • Course

    Answer business questions with data and AI, and tell evidence from speculation.

The sibling course on retrieval, its topic page and a neighboring course on data and AI analytics.

Production RAG course →RAG course guide →AI data analytics course →

Questions about the Data Engineering for AI Applications course

  • What is the Data Engineering for AI Applications course?

    An advanced course in which you build an ingestion, transformation and retrieval pipeline that keeps AI applications fed with good data. It has nine chapters and ends with a capstone.

  • What does the pipeline capstone leave me with?

    An ingestion-to-retrieval pipeline. You specify sources, refresh and gates, ingest and clean, model and check, load, serve and evaluate, and finally operate and document it.

  • Is this a data engineering course or a RAG course?

    It is a data engineering course for AI applications. Retrieval is where the data ends up, and chapter eight serves it to retrieval and models, but the subject is the pipeline that feeds it. For the search side, see the Production-Ready RAG Engineering course.

  • Which ingestion methods does it cover?

    Full and incremental loads with watermarks, upserts and repeatable loads, paginated and rate-limited APIs, files and formats, and change data including deletes.

  • How does the course handle data quality?

    You write checks as failing-row queries, group them by kind, tie them to data contracts, give each a severity and an action, and quarantine the rows that fail.

  • What does it say about lineage and deleting data?

    Chapter seven covers lineage and impact analysis, content hashes as versions, run manifests, versioning vectors and erasure across derived data.

  • Will I get a certificate for the data engineering course?

    Yes, the course comes with a certificate. Its check code can be looked up by anyone on the public check page, and, as the Get certified page notes, the certificate is not a state-recognized qualification.

  • How does the coach deal with my pipeline design?

    You talk through your design decisions by voice. The coach is an AI that follows up on vague answers, and it has no say over your certificate.