dbt (data build tool) is the standard framework for the transformation layer in modern data stacks. It brings software engineering practices — version control, testing, documentation, modular code reuse — to SQL transformations that previously lived as undocumented scripts scattered across dashboards and stored procedures. A dbt project is a directory of SQL files, YAML configuration, and Jinja templates that defines the full transformation layer: where raw data comes from, how it is staged, how it is modelled into analytical structures, and what tests must pass before models are production-ready.
The dbt model is the fundamental unit: a SQL SELECT statement in a `.sql` file that dbt compiles and materialises as a table or view in the warehouse. The model's filename becomes the table name; a model in `models/staging/stg_ipl_deliveries.sql` creates a table or view named `stg_ipl_deliveries`. Models reference each other using `ref()`, which dbt uses to build the dependency graph automatically — `SELECT * FROM {{ ref('stg_ipl_deliveries') }}` creates a dependency on that staging model and ensures it is built before the dependent model runs.
Analogy🏏Cricket
🏏 Think of it like cricket: Migrating from Airflow to Prefect is like the same bowling coach shifting from traditional Test cricket notation to a modern T20 analytics dashboard — the underlying ball-by-ball data (the business logic) is exactly the same. What changes is how the data is recorded, displayed, and acted upon. The yorker that Bumrah bowls in over 20 is identical whether it is recorded in the old scorebook (Airflow DAG file) or the new analytics platform (Prefect flow). The migration is a transcription exercise, not a strategy change — and a wise coach verifies that the runs, wickets, and economies match exactly between the old and new system before decommissioning the scorebook. That verification step is the whole heart of the migration: because the yorker is unchanged, the only honest test is to run the same over through both systems and confirm the recorded runs, wickets and economies match to the last digit before the old scorebook is thrown away. Rushing to burn the scorebook the moment the shiny dashboard lights up is how teams lose a season of records to a silent transcription slip. The coach keeps both systems running in parallel for a while, reconciles their outputs ball by ball, and only when every figure agrees does he trust the new dashboard alone — a transcription is only complete when you have proven nothing was lost in the copying.
🏏 Showing the Cricket analogy — a Cricket version isn’t available for this concept yet.