Preserve Field References in SQL Views

Steven Talbot · Friday Demos · November 27, 2026 · 3:06

An upcoming fix preserves model field references when saving raw SQL views instead of replacing them with inline SQL expressions. This keeps views connected to their source definitions so…

Transcript

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

  1. I want to quickly show a fix for a very old technical debt that we're going to eliminate. Previously, in raw SQL views, you could refer to a field like this. So, I have this SQL query, I have n't saved it yet, I'm going to save it, and I referenced this field from the regular model . But when I save it, and this is on the current code, the value of the field is " baked in", we saw the user's age plus two, and let's say I entered that my field is actually age plus one.

  2. Now, if I fix my field, obviously the link won't update because it's not even in my model. So, the model is not deceiving you about what it is doing. She's honest, she says: I'll put your link in the box with a dollar sign and curly brackets and you won't get it anymore, but it's frustrating if you want to keep it up to date with this gesture.

  3. So now wait while I restart my server with the fix. Hopefully it will be relatively quick. What we want to do is take this same exact strategy, let's try doing it again on a new branch, wait until it's up and running so my server doesn't go down. Let's go. So, let's try again . So now we have, let's save this, and here it is.

  4. So, the user's age plus two is left . So if I go to users and fix that, obviously it will work. I'll do it very, very quickly and Yes. So, I didn't give him a nickname. So he's like, Why don't you Oh, yeah, you have to give things a nickname and So, that messed up the demo a little bit, but let's fix it so we don't have to go back and do this recording again.

  5. This is it. Good. A lot of effort to demonstrate this one small fix. Who knows how many people will watch this to the end, but here it is. Fixing old technical debt. Hooray.