dbt Fundamentals: Data Transformations as Code

<p>Marrow Coffee Co.'s scattered SQL scripts once produced two conflicting definitions of "active wholesale account" -- until an analytics engineer rebuilt the transformation layer in dbt. Follow her migration end to end: structuring models into staging, intermediate, and mart layers wired together with ref() and source(), catching bad data automatically with built-in and custom tests, generating documentation and a lineage graph straight from the project, and replacing copy-pasted SQL with reusable macros and Jinja templating. Real dbt YAML and SQL throughout, built around one company's actual growth story.</p>

Tools: dbt, SQL, PostgreSQL, Jinja, Git, YAML