Macros
Learn how to reuse logic with dbt macros.
Introduction to macros
Jinja macros are reusable pieces of templated code. They’re similar to functions in other languages, such as Python.
Why do we need macros?
Sometimes, we find ourselves rewriting the same logic over and over again. For example, we might be grouping by day and summing potatoes sold:
Access this course and 1400+ top-rated courses and projects.