SpinTheMic
Pro

Explain it in 60 seconds

What macros are

Data Engineering · dbt · Beginner

What are macros in dbt and when do you write one?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Macros are reusable Jinja functions stored in the macros folder.
  • Use them for repeated SQL logic like currency conversion or surrogate keys.
  • They can also run operations with dbt run-operation.
  • Packages like dbt_utils provide many ready macros.
  • Keep macros documented and tested since many models depend on them.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics