Blog
BeginnerReferenceDE Foundations

Data engineering foundations - modelling, ETL and the lifecycle

The generic-but-load-bearing layer - how data is modelled for transactional versus analytical use, the ETL-versus-ELT split, the stages a pipeline moves through, and the vocabulary every later section assumes.

Applies to
SQL Server2016-2025 (13.x-17.x)
matureUpdated Reviewed
beginnerAssumes no prior exposure to the subject.

What you will be able to do

  • Explain why transactional and analytical schemas are shaped differently.
  • Choose between ETL and ELT and say what each charges.
  • Name the stages a pipeline moves through and what each one owns.
  • Use the vocabulary the rest of the curriculum assumes - grain, key, partition, idempotency.

Concepts covered

This is the foundation layer - the vocabulary and the two or three ideas every later section uses without re-explaining. It is deliberately generic; the depth is in the tracks that follow, and nothing here is there to be impressive - only to make the rest coherent.

The two schema shapes

A schema is shaped by what questions it must answer:

  • Transactional (normalised) - a write-heavy schema avoids storing the same fact twice, because an update then touches one place. Third normal form trades a small join cost at read time for a cheap, consistent write.
  • Analytical (denormalised / dimensional) - a read-heavy reporting schema accepts duplication because joins over a billion-row fact table are the expensive thing. A star schema’s wide fact and dimension tables exist to make aggregates fast, not to be pretty.

The mistake is using the wrong one: reporting against a normalised OLTP schema is why analytics queries fight transactions, which is the entire reason the analytical offload tracks exist.

ETL versus ELT

ETL ELT
Order Extract, transform, then load Extract, load, then transform
The transform engine A separate tool tier The destination platform’s own compute
When it wins When raw data should not reach the destination, or the destination is weak When the destination is powerful and scalable (a warehouse/lakehouse)

On this stack, ELT is the default modern shape: land raw data in S3 or a staging table, then transform with Snowflake’s or Databricks’ compute - because those engines are better at the heavy work than a general-purpose transform tier. ETL survives where data must be cleaned or masked before it is allowed in the destination at all.

The pipeline stages

The lifecycle every pipeline shares

  1. Source

    The system of record - an OLTP database, files, a stream

    Data is extracted here; correctness is bounded by the source

  2. Ingest / land

    Raw data lands unchanged - a landing zone or raw table

    Immutable copy - the point you can always replay from

  3. Refine

    Clean, deduplicate, conform, join

    The transform tier - ELT does this in the destination

  4. Serve

    Modelled data the consumers query

    The contract with downstream users - shape, freshness, correctness

Whatever the tool, a pipeline is source to serving through these stages - the names change, the responsibilities do not.

The vocabulary the rest assumes

  • Grain - what one row means. “One row per order line” is a grain; get it wrong and every aggregate after it is wrong.
  • Idempotency - running the pipeline twice produces the same result as once. The property that makes retries safe instead of corrupting.
  • Incremental vs full load - process only what changed versus reload everything; the former needs a reliable way to know what changed (CDC, a watermark).
  • Partition - the physical boundary a purge or a parallel job respects; the reason retention and reloads are cheap.
  • Serving layer - the tables a consumer sees; everything upstream exists to keep this correct.

These five definitions are referenced constantly in the pipeline and platform sections - learn them once here rather than mid-lesson.

The real-world analogy for the whole lesson is a warehouse versus a shop floor. A shop floor (OLTP) keeps every item where staff can reach it in one walk, so nothing is stored twice - one change, one place. A warehouse (analytics) accepts that the same kind of item sits on hundreds of pallets because the job is counting and shipping volume, not finding one item - layout follows the aggregate, not the unit. ETL is packaging goods at the depot before the lorry leaves; ELT is sending the crates raw and unpacking them inside the warehouse, which only makes sense because the warehouse has the forklifts.

The most common beginner mistake is reaching for ETL because it was the default shape for twenty years - paying for a transform tier the destination’s own engine already provides, out of habit rather than requirement. The discipline is to ask where the transform compute should live, not where it historically lived.

Guided practice

A beginner exercise, worked step by step. The scenario: a shop’s OLTP database holds orders, order_line, customer and product. The requirement is a daily dashboard - “units sold and revenue per product category per day” - refreshed each morning. Work each step and check yourself before moving on.

  1. Name the grain of the serving table. Write it in one sentence before designing anything else. Check: the grain is “one row per product category per day”. If you wrote “one row per order”, the serving table is a copy of the source and no modelling happened - go back to the grain definition above. An order contains many lines and many categories; the dashboard’s question is asked per category per day, so that is the grain.
  2. Choose ETL or ELT, and state what the choice charges. The destination is a cloud warehouse or lakehouse in this curriculum’s stack. Check: ELT is the defensible default - land raw extracts, transform with the destination’s compute, which is built for exactly this work. ETL is defensible only if you name a reason raw data may not land (for example a masking rule). If you chose ETL without a reason, you repeated the most common mistake named above.
  3. Assign each pipeline stage a concrete artefact. Source, ingest, refine, serve - write what exists at each in this design. Check: source is the four OLTP tables; ingest is a raw daily extract that is never modified in place (the replay point); refine is the category aggregation; serve is the modelled table the dashboard queries. If your ingest step transformed data, reread the stage diagram - landing must stay immutable or you lose the replay point.
  4. Prove the replay is safe. Last night’s run is replayed because a file arrived late. What must be true for the second run to be harmless? Check: idempotency - the refine step keys its writes on the grain (category, day), so rerunning overwrites rather than appends. If your design appends, a replay double-counts the day. Fix the grain key first, then re-check.

Check your understanding

Ordered easy to hard. Answer each before reading the answer; a wrong answer names where to look.

  1. What does grain mean? What one row in the table means, stated in one sentence. Everything downstream - keys, aggregates, idempotent writes - hangs off it.
  2. Why does a transactional schema normalise while a reporting schema denormalises? Normalisation keeps each fact in one place so an update touches one place - correct for write-heavy OLTP. Reporting pays the join cost a billion times instead, so it accepts duplication for fast aggregates. If you answered “because 3NF is correct”, revisit the two schema shapes - correctness is workload-dependent, not a form number.
  3. When is ETL still right on this stack? When data must be cleaned or masked before it may enter the destination at all, or the destination genuinely lacks the compute. ELT is the default because the destination is strong, not because the letters are newer.
  4. A replayed run double-counted a day. Which property was missing, and which stage owns it? Idempotency, owned by the refine step through grain-keyed writes. Ingest is not the owner - landing the file twice is fine; refining it twice is the bug. If you blamed ingest, revisit the stage responsibilities.
  5. Argue the case for serving this dashboard straight off the OLTP schema. A deliberate position: if the query volume is tiny and freshness must be seconds, the reporting fight is acceptable cost. The point is that the wrong schema is a trade you may choose with eyes open - it is not always a mistake. If you cannot construct this argument, the schema-shapes trade-off is the section to reread.

Section close - the stage project and the debrief

Project: land and serve a week of orders. Design, on one page, a four-stage pipeline that turns the shop’s OLTP tables into the daily category dashboard above - but for a rolling seven days and a real destination (a Snowflake trial account or a local SQL Server schema). The deliverable names: the grain, the load type (full or incremental and why), which stage owns which artefact, and what a replay does. Walkthrough: start from the grain, let it decide the serve table’s key; choose ELT; make refine key on (category, day). Where people get stuck: the grain drifts mid-design (“one row per order” creeps back), and replay behaviour is designed last when it belongs in the key choice.

Debrief. Having finished this section you can explain why schemas are shaped by workload, choose ETL versus ELT with the charge named, and use grain, idempotency, incremental load, partition and serving layer without looking them up. The gaps that usually remain even when it feels understood: you can recite ETL versus ELT but cannot yet cost the transform compute - that needs the Snowflake and Databricks sections; and you have met the stages as a diagram but not as a failure, which is what Data Pipeline Engineering adds. Next session: SQL Server Engineering, starting with engine internals - the section where the vocabulary meets the engine that runs it.

Where SQL Server sits

How this component relates to the rest of the stack. Items without a link are not covered here yet.

Deployed with

Commonly run alongside

  • Windows Failover Clustering

Alternatives

Solves a similar problem differently