My Three Favourite Things About dbt

This week I completed the dbt fundamentals course. This was my first time using dbt and three particular features really stuck out.


The Ref Macro

The ref macro is used to reference other models within a project. It ensures that dependencies between models are properly managed, allowing dbt to build models in the correct order, handle incremental models, and enable testing and documentation of these relationships.

The key advantages of this are:

  • An automatically generated data hierarchy
  • Improved readability of a script by showing clear dependencies between models
  • Resilience to database name changes
  • Optomised performance (unnecessary queries are no longer run)

Documentation

dbt models can be documented directly alongside the code, helping to prevent the common issue of documentation falling behind development. This approach ensures that documentation is always up to date and in sync with the code being built.

The key advantages of this are:

  • Enhanced clarity in an analytical engineers' work
  • Improved collaboration
  • More maintainable data pipelines
  • Supports data governance

Automation

In dbt, models, tests, and documentation can be run on a regular schedule. With dbt's strong integration of tools like GitHub, teams can ensure their data pipelines are consistently deployed without manual intervention, reducing errors and enhancing efficiency.

The key advantages of this are:

  • Pipelines can be deployed in a standardised and repeatable manner
  • Reduced manual effort
  • Improved management of larger projects
  • Error reduction
Author:
Dan Booth
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2025 The Information Lab