How to Write dbt Macros Using Jinja2
A tutorial and cheatsheet on writing your first dbt macro
Published in
7 min readMar 28, 2022
I recently came across a problem that stumped me. Aren’t those the best? They immediately humble us.
This problem led to much frustration around how the code I was writing was working. It was my first ally digging deep with dbt macros. I’ve used them before but never added custom…