dbt pushdown with sources

Buck Ryan · Friday Demos · May 9, 2025 · 1:35

We'll now use source to mix table references with jinja references when we push queries back into dbt models.

Transcript

This transcript is auto-generated. Names and product terms may be wrong.

  1. Cool. Guess I'm up. Okay. So, uh first uh background is a feature that we've already had for a while. Uh so when you're this is about converting queries to DBT models. Um so one thing you often do is let's say you are querying against uh this organic user this model in my DBT repo. when I convert it to DBT, it replaces the ref.

  2. Uh, and for anyone that doesn't know, this is just the syntax you use to reference another model in your repo. Um, but sometimes what you want to do is not reference another DBT model, but reference a raw table. And DBT has this thing called sources where you can define your raw tables. Uh and then that allows you to sort of like connect the dots between the raw tables and the queries that are built on top of them, the models that are built on top of them.

  3. So if I were to now um this is the new feature. If I were to query against the raw users table and then convert that to a DBT model, we'll now do this new replacement where we'll add the right syntax to reference that source. Um so that's it.