Skip to content
LakeBench
ProblemsCommunityPricing
Sign inStart practicing
Back
  1. Home
  2. Learn
  3. dbt & Analytics Engineering

Learn · dbt

dbt & Analytics Engineering

How teams keep hundreds of SQL models organised, tested, and documented.

What analytics engineering is, how dbt compiles and tests SQL models, staging layers, marts, and incrementals. SQL runs in the editor; no dbt CLI needed.

13 lessons6 modules6 stages2h 46m
Start lesson 1What is analytics engineering?

Core foundational modules are free. Advanced production modules need Pro.

Concept Traces in this track

Playable walkthroughs: watch the system move, predict the next step, stamp a memory seal, then practice. Completing a Trace counts toward readiness.

  • Pro Trace

    dbt incremental

    Load once. Rebuild what changed. Keep a lookback.

    Opens in Incremental vs full refresh

Why this track exists

A team of five analysts each write their own revenue query. Four of them are subtly different, two are wrong, and nobody knows which one the CFO's dashboard uses. Someone renames a column upstream and six dashboards break silently on Monday. The queries are all fine individually. The problem is that there is no shared, tested, dependency-aware place for them to live. That is the problem dbt solves.

dbt is now the default in the analytics engineering half of the field. The valuable skill is not the CLI, it is knowing how to layer models, where to put business logic, and what to test so a broken upstream change fails loudly instead of quietly.

What you need before starting

  • Solid SQL

    dbt is SQL plus structure. If joins, CTEs, and aggregation are not comfortable yet, do the SQL track first.

  • Helpful: warehouse modelling

    Knowing what a fact and a dimension are makes the marts module land properly.

The roadmap

6 stages, in the order they build on each other. Each stage lists the modules and lessons it covers, and what you should be able to do by the end of it.

01What analytics engineering is

Before the tool, the role. There is a gap between the raw tables a data engineer lands and the numbers a business trusts, and this stage is about who fills it and how.

Analytics EngineeringFree

0/3

What analytics engineering is, how a dbt project is laid out, and how Jinja templates become SQL.

  1. What is analytics engineering?12m
  2. dbt project structure12m
  3. Jinja basics14m

By the end of this stage

You can explain what analytics engineering is and why the role appeared.

02What dbt actually does

dbt looks magical until you see that it compiles SQL, works out the dependency order, and runs it. Then it looks obvious, which is the right feeling.

What dbt IsFree

0/2

The SQL really runs. The dbt CLI around it does not. source() and ref() become relation names.

  1. What dbt is12m
  2. source() and ref() as compiled names12m

By the end of this stage

You can explain what happens between writing a model file and seeing a table in the warehouse.

03Staging layers

Raw source tables are other teams' shapes, with their names and their quirks. Cleaning them once in a staging layer stops that mess spreading into every downstream model.

Staging

0/2

Rename, cast, and light-filter raw sources. Tests start at not_null.

  1. Staging models14m
  2. not_null tests as SQL12m

By the end of this stage

You can build a staging model that renames, casts, and standardises a raw source cleanly.

04Tests that catch real breakage

The point of tests here is not coverage, it is early warning. A unique test on a key catches the duplicate that would have doubled revenue on a dashboard.

unique and relationships

0/2

Generic tests are SQL that must return zero rows. unique and relationships are the other two you will write on every staging model.

  1. unique tests12m
  2. relationships tests14m

By the end of this stage

You can pick the tests that would have caught your last data incident, and explain why each one matters.

Where people get stuck

Testing everything is as unhelpful as testing nothing. Test the assumptions that would cause visible damage if they broke.

05Marts and incremental models

Rebuilding every model from scratch every hour stops being viable as data grows. Incremental models only process what is new, which introduces the same duplicate and late-data problems you met in orchestration.

Marts and Incremental

0/3

Business-shaped SELECTs on top of staging, then the incremental filter you would wrap in a materialization.

  1. Marts from staging CTEs14m
  2. Incremental vs full refresh12m
  3. Views, tables, incrementals10m

By the end of this stage

You can build a mart on a stated grain and make it incremental without double counting.

06Capstone

A layered project from raw source to tested mart, which is exactly what a dbt interview asks you to describe.

Capstone

0/1

Staging CTE, mart, and a unique test on the mart grain.

  1. Capstone: staging, mart, test16m

By the end of this stage

You can walk through a source to staging to mart lineage and defend each layer's job.

How you know it worked

Finishing the lessons is not the goal. These are the things you should be able to do afterwards, and each one is worth checking honestly.

  • You can explain what dbt does without using the word 'transformation' vaguely.
  • You can lay out sources, staging, and marts and say what belongs in each.
  • You can choose tests based on what would break a dashboard.
  • You can explain the tradeoff of an incremental model versus a full refresh.

How long it takes

30 minutes a day

about 6 sessions

1 hour a day

about 3 sessions

4 hours a weekend day

about 1 session

SQL runs in the editor here, so you do not need the dbt CLI or a warehouse account to learn the concepts. If you have a local Postgres, running the real dbt CLI afterwards is worth an afternoon, because seeing compiled SQL and a lineage graph makes the model click.

These counts cover reading and the built-in exercises only. Real practice on the drills and a capstone will add to it, and that time is where most of the learning happens.

What interviewers are really testing

  • Whether you can explain layering, and why business logic does not belong in staging.
  • Whether your tests are chosen for consequence or copied from a template.
  • Whether you understand incremental logic well enough to talk about late arriving data.
  • Whether you can say what dbt does not do, which shows you understand where it sits.

Mistakes to avoid on this track

Common mistakes on this track and what to do instead
Common mistakeWhat to do instead
Putting business logic in staging models.Staging cleans and renames. Logic belongs downstream, or every consumer inherits a decision they did not ask for.
Adding tests to every column to feel thorough.Noisy tests get ignored, and ignored tests are worse than no tests. Test the keys, the relationships, and the assumptions with real consequences.
Making a model incremental before it needs to be.Incremental adds a class of subtle bugs. Do it when full refresh actually hurts, not by default.

Where to practise this

SQL practice editor

The SQL underneath every dbt model.

Production tickets

Models with duplicate grain and missing tests.

Where to go after this

Data Quality & Observability

dbt tests are one layer. Quality gates, SLAs, and lineage are the rest of the picture.

Orchestration & Reliable Pipelines

Something has to run dbt on a schedule and deal with failures.

All tracksFull data engineering roadmap45-day plan

dbt & Analytics Engineering reviews & rating

4.9out of 5
1,240+ student reviews
5 stars
88%
4 stars
9%
3 stars
2%
2 stars
1%
1 star
0%
LakeBenchPractice today. Build tomorrow.

Warehouse practice that runs in the tab, not on a cluster. Learn concepts, solve interview drills, and mock the round in one place.

Product

  • Studio sandbox
  • Capstone projects

Practice

  • SQL interview questions
  • PySpark interview questions
  • Python interview questions
  • DE theory questions
  • LeetCode for data engineers

Company

  • About
  • Contact

Legal

  • Privacy
  • Terms
  • Refunds & cancellation
  • Shipping & delivery

© 2026 Lakebench, operated by Hunnurji Rao. Bengaluru, Karnataka, India.

No cluster. No install. Just the tab.