
Improving dbt description pushdown
Bit of tuning the dbt promotion workflow to improve reliability and quality of pushing down metadata.
Transcript
This transcript is auto-generated. Names and product terms may be wrong.
All righty. All right. This will be quick. Um, this isn't this is a I find this this feature very fascinating, which is mostly why I wanted to to demo it. Um, so this is uh kind of like a bug fix that I did this week related related to pushing descriptions. Um, and I saw something in the wild that I've I don't think I've ever seen before.
So YAML uh which we all know and love has this feature called anchors and aliases where it's almost like creating a variable inside your YAML file. And we have a customer doing that where they're defining a set of columns once at the top and kind of like this end columns thing here is defining a variable in a way.
Um and then defining this list of columns where then if you reference this columns name down below like this the full map gets plopped into there or the four list in this case. So they have multiple different models that are sharing the same list of columns and this is a way to define it once instead of copy pasting the list of columns into each model.
Um, and this is dbtl by the way. Um, so when they went to push descriptions, uh, our system saw this and didn't know how to handle it. Um, the, uh, the push descriptions to dbt thing is actually much more complex than you would think trying to modify these yl files. And this is one example of why. So the system was just throwing an exception.
And at the moment uh we still don't I didn't implement a way to deal with that because you can imagine if they updated you know one model's column description but not another one that's sharing this definition you know what do we do? Do we update the shared definition? Do we update just one of them which is kind of annoying.
So, uh, at the very least, instead of throwing an exception and the user getting a, um, an internal server error, what is happening now is if you push to dbt and we ever encounter something we don't know how to deal with in the YAML, we will still make the pull request, but now the pull request will have this little warning from our system um, explaining that we can't modify this model because the columns key is using an alias.
Um, so we try to get specific about the warning. Um, this is better than throwing an internal server error. Um, and it's also better than just like hiding in logs what was missing so the user knows we knew about this thing, we just couldn't handle it. U, but mostly I just found this whole like anchors and alias thing interesting and wanted to share about that.
So that's it.