Interview's MateData Engineer
Interview's Mate

Data Engineer

SQL · Spark · Lakehouse · Streaming

Visualizer

DSA Visualizer
All 32 lessons
Custom Playground
Try your own examples

Learning

System Design
31 architecture topics
SQL Learning
160 foundations → production topics
AI Engineering
160 LLM → backend topics
Data Science
160 Python → MLOps topics
Data Engineer
160 SQL → streaming topics
Docker
160 Docker learning topics
Kubernetes
160 K8s fundamentals → cloud
Java LearnSoon
Coming soon
Python Learn
Interview Q&A & internals
JavaScript Learn
Closures, async & DOM Q&A
Tech Learn
Search, practise & track Q&A
AI DSA Practice
Solve coding problems
Theme
Home
Data Engineer topics
Lesson 118/ 160
06. Data Transformation (dbt) & Workflow Orchestration

Combining Airflow / Dagster with dbt Core & dbt Cloud

Trigger dbt Core or Cloud runs from Airflow/Dagster with clear ownership of tests and deploys.

Advanceddbt Core · dbt Cloud · Orchestration3 quiz questions
Practice Generative AI Q&A
In plain wordsDiagramTheoryStep by stepWhen to use itInterview cluesMistakes to avoidQuiz (3)Practice

In plain words

Orchestrator freshness/readiness event. Next, pinned command, selector, target, and artifact path. Finally, docs/catalog metadata and downstream dependency release.

Think of it like…

dbt is the SQL build tool and its manifest is the blueprint; the orchestrator is site management deciding when construction may begin and how a failed inspection blocks delivery.

Where you’ve seen it

Airflow waits for a source, runs dbt build --select tag:daily+ --fail-fast --target prod, stores artifacts, and triggers warehouse validation; Dagster can expose individual dbt models as assets or one grouped job by adapter/provider.

Words you’ll hear

dbt Core
The open-source CLI and project runtime that executes dbt compilation/transformation inside a managed command environment.
dbt Cloud
A hosted dbt service exposing scheduled jobs, IDE, API, artifacts, and execution infrastructure.
Orchestration
The outer workflow system responsible for time, cross-tool dependencies, retry admission, and process state.
Operational boundary
Using dbt run after every Airflow task rebuilds an uncontrolled graph, and treating the dbt Cloud job as green while downstream artifact failures are ignored creates false completion. Make one orchestrated dbt invocation per logical dependency, pass environment/selection/full-refresh inputs explicitly, collect manifest.json and run_results.json, and map node failures/tests/exposures into task or asset state.

Visual diagram

Loading interactive diagram

Theory & deep dive

dbt Core: the working mechanism

Airflow or Dagster should own task timing, retries, dependencies, and dbt process execution, while dbt owns compiled SQL graph/tests; integration must propagate selectors, artifacts, and failure state across that boundary.

Orchestrator freshness/readiness event. Pinned command, selector, target, and artifact path, then task/assets, run results, failures, and retries; this exposes the state governed by Orchestration.

Combining Airflow / Dagster with dbt Core & dbt Cloud in one concrete design

Airflow waits for a source, runs dbt build --select tag:daily+ --fail-fast --target prod, stores artifacts, and triggers warehouse validation; Dagster can expose individual dbt models as assets or one grouped job by adapter/provider.

Key takeaway: Airflow or Dagster should own task timing, retries, dependencies, and dbt process execution, while dbt owns compiled SQL graph/tests

Combining Airflow / Dagster with dbt Core & dbt Cloud: failure mode and production response

Using dbt run after every Airflow task rebuilds an uncontrolled graph, and treating the dbt Cloud job as green while downstream artifact failures are ignored creates false completion.

Make one orchestrated dbt invocation per logical dependency, pass environment/selection/full-refresh inputs explicitly, collect manifest.json and run_results.json, and map node failures/tests/exposures into task or asset state. Track Artifact path as "manifest and run results retained per run", and make Selector scope visible to the dataset owner.

Key takeaway: Make one orchestrated dbt invocation per logical dependency, pass environment/selection/full-refresh inputs explicitly, collect manifest.json and run_results.json, and map node failures/tests/exposures into task or asset state.

How it works, step by step

Step 1 of 4
dbt Core

1. Gate source

Orchestrator freshness/readiness event. Airflow or Dagster should own task timing, retries, dependencies, and dbt process execution, while dbt owns compiled SQL graph/tests; integration must propagate selectors, artifacts, and failure state across that boundary.

orchestrator freshness/readiness event
Key numbers at this step
Artifact path
manifest and run results retained per run
dbt Cloud
A hosted dbt service exposing scheduled jobs, IDE, API, artifacts, and execution infrastructure.

When to use it & trade-offs

What it is

Airflow or Dagster should own task timing, retries, dependencies, and dbt process execution, while dbt owns compiled SQL graph/tests; integration must propagate selectors, artifacts, and failure state across that boundary. Airflow waits for a source, runs dbt build --select tag:daily+ --fail-fast --target prod, stores artifacts, and triggers warehouse validation; Dagster can expose individual dbt models as assets or one grouped job by adapter/provider.

Why it matters: Using dbt run after every Airflow task rebuilds an uncontrolled graph, and treating the dbt Cloud job as green while downstream artifact failures are ignored creates false completion. Make one orchestrated dbt invocation per logical dependency, pass environment/selection/full-refresh inputs explicitly, collect manifest.json and run_results.json, and map node failures/tests/exposures into task or asset state.

When to reach for it

  • Trigger dbt Core or Cloud runs from Airflow/Dagster with clear ownership of tests and deploys.
  • Choose dbt Core because it provides this capability: The open-source CLI and project runtime that executes dbt compilation/transformation inside a managed command environment.
  • Keep evidence for Artifact path at "manifest and run results retained per run" so the last production stage-Publish - docs/catalog metadata and downstream dependency release-remains testable.

When to avoid or be careful

  • Using dbt run after every Airflow task rebuilds an uncontrolled graph, and treating the dbt Cloud job as green while downstream artifact failures are ignored creates false completion.
  • Do not conflate dbt Cloud with dbt Core. The second concept contributes different behavior: A hosted dbt service exposing scheduled jobs, IDE, API, artifacts, and execution infrastructure.
  • Release only after this guardrail is in place: Make one orchestrated dbt invocation per logical dependency, pass environment/selection/full-refresh inputs explicitly, collect manifest.json and run_results.json, and map node failures/tests/exposures into task or asset state.

dbt Core / dbt Cloud / Orchestration - roles, limits, and operating cost

dbt Core
Best for: The open-source CLI and project runtime that executes dbt compilation/transformation inside a managed command environment.

Strengths: The open-source CLI and project runtime that executes dbt compilation/transformation inside a managed command environment. Airflow or Dagster should own task timing, retries, dependencies, and dbt process execution, while dbt owns compiled SQL graph/tests.

Watch out: Using dbt run after every Airflow task rebuilds an uncontrolled graph, and treating the dbt Cloud job as green while downstream artifact failures are ignored creates false completion.

dbt Cloud
Best for: A hosted dbt service exposing scheduled jobs, IDE, API, artifacts, and execution infrastructure.

Strengths: A hosted dbt service exposing scheduled jobs, IDE, API, artifacts, and execution infrastructure. In this workflow it supports: Interpret nodes - task/assets, run results, failures, and retries.

Watch out: The operating cost is real: exact models/tests in the intended graph.

Orchestration
Best for: The outer workflow system responsible for time, cross-tool dependencies, retry admission, and process state.

Strengths: The outer workflow system responsible for time, cross-tool dependencies, retry admission, and process state. Its output can be checked with Failure mapping.

Watch out: Operating guardrail: Make one orchestrated dbt invocation per logical dependency, pass environment/selection/full-refresh inputs explicitly, collect manifest.json and run_results.json, and map node failures/tests/exposures into task or asset state.

Interview signals & numbers to know

When this topic comes up

  • “Where is the failure boundary for dbt Core, and how would Artifact path reveal it?”
  • “Why is dbt Cloud distinct from this behavior: the outer workflow system responsible for time, cross-tool dependencies, retry admission, and process state?”
  • Production clue: Using dbt run after every Airflow task rebuilds an uncontrolled graph, and treating the dbt Cloud job as green while downstream artifact failures are ignored creates false completion.
  • Design probe: Make one orchestrated dbt invocation per logical dependency, pass environment/selection/full-refresh inputs explicitly, collect manifest.json and run_results.json, and map node failures/tests/exposures into task or asset state.

Benchmarks & rules of thumb

Artifact path -
manifest and run results retained per run
Selector scope -
exact models/tests in the intended graph
Failure mapping -
dbt node/test status reaches orchestrator SLA and rerun

Common mistakes & follow-ups

Common interview mistakes

  • Using dbt run after every Airflow task rebuilds an uncontrolled graph, and treating the dbt Cloud job as green while downstream artifact failures are ignored creates false completion.
  • Reporting success from a job exit code without checking Artifact path and Selector scope.
  • Treating this example as complete without replay, rollback, or access boundaries: Airflow waits for a source, runs dbt build --select tag:daily+ --fail-fast --target prod, stores artifacts, and triggers warehouse validation; Dagster can expose individual dbt models as assets or one grouped job by adapter/provider.

Likely interviewer follow-ups

  • How would you prove this contract instead of only checking that the command ran: The open-source CLI and project runtime that executes dbt compilation/transformation inside a managed command environment.
  • What does the recovery plan do when this occurs? Using dbt run after every Airflow task rebuilds an uncontrolled graph, and treating the dbt Cloud job as green while downstream artifact failures are ignored creates false completion.
  • When is dbt Core insufficient for Selector scope, and what does adding dbt Cloud cost in Artifact path?
Interview tip: Lead with the data path and failure boundary: Airflow or Dagster should own task timing, retries, dependencies, and dbt process execution, while dbt owns compiled SQL graph/tests; integration must propagate selectors, artifacts, and failure state across that boundary. Then make the answer operational: Make one orchestrated dbt invocation per logical dependency, pass environment/selection/full-refresh inputs explicitly, collect manifest.json and run_results.json, and map node failures/tests/exposures into task or asset state.

Knowledge check

Loading quiz

Put it into practice

Practice related interview Q&A

Apply Combining Airflow / Dagster with dbt Core & dbt Cloud with data engineer interview Q&A and hands-on practice.

Open Data Engineer Q&A →Machine Learning Q&A
Previous topic
Asset-Centric Orchestration with Dagster (Assets, Partitions, I/O Managers)
Next topic
Deploying Orchestrators on Kubernetes (KubernetesExecutor, Astronomer, AWS MWAA)