
dbt dynamic schema migration (launched)
New tooling to migrate a data model to dynamic schemas. This opens up the ability to test dbt changes on test schemas across the full app.
Transcript
This transcript is auto-generated. Names and product terms may be wrong.
I have something to demo okay so you've all been uh following along with the DBT virtualization stuff and um it's mostly ready to go it still needs to do go through some testing but there's a big question which is once we turn this on for people uh how do they use it especially when they have a when they could have a bunch of extensions in their model to the base DBT schema that they've so like they've already been building on top of the old non- virtualized schema how do we transition them over to the new virtualized thing that we want them to do and um so the what we're doing what we're trying out uh to solve that is uh essentially like copy pasting all
of those extensions from the old DBT schema onto the virtual one um so I'll I'll show you what that looks like um in this little setup I have uh my DBT prod that has an extension on this users table so it has a calculation and that does not exist on the virtual schema which you can't see here which is called a Omni DBT and then I also have a branch which has an extension on top of the my Dev schema DBT Buck um so that's called Branch calculation there's now this button migrate to DBT environments that you can click you get a confirmation it's going to try to explain what's going on you click run tells you it's done and now that calculation has been
added on top of the virtual schema and the reference has been updated to point to the virtual schema to so Omni DVT and if we switch off of the branch the same thing happened on the shared model this calculation uh for DBT prod has been copied into the virtual schema and the reference has been updated um also there's relationship that I didn't show you before it was just this uh this relationship from the DBT prod schema to a user table has also been copied and had its references updated to the virtual schema um yeah I think that's pretty much everything very cool this is awesome Buck I am curious about workbooks we we're not hitting workbook extensions I imagine we are this is looking for
everything that's a descendant everything that's a descendant of the shared or of the schema model yeah amazing um seeing this the the one thing that I think of too is maybe we want an option to not just copy but actually uh move like remove the old ones or something like that but if we do that that we'd probably only want a Target stage but it's just a thought that like people probably want both in the same underlying mechanism it would work for both yeah removing the old one gets into the difficulties of um just being much more destructive and that what this thing is not doing is it's not updating any content to point to these new schemas um for the first pass we're leaving
it for users to use the content validator to find and replace if they so shoes um doing that incrementally wholesale um when we go to remove them automatically then we sort of have to bite the bullet and just do that destructive find replace for them um so that's largely the reason for not having it in this first pass but I agree they'll want that at some point it's just uh yeah that makes sense and I guess what I'm getting at is like if you had that ability and you only applied it to the you applied the change to say the branch you were able to apply to the branch then the content validator would actually identify the content that you need to move for you
because it would suddenly be broken yeah that's a good point or so if there's some way that we can get to that I think that that might be a next next step there yeah cool well as usual I can't stop sharing I did some submit a bug request to Rome about this so hopefully they'll do something thanks