dbt environment cleanup

Buck Ryan · Friday Demos · March 7, 2025 · 3:37

Some new tooling to make sure Omni metadata stays in sync with your dbt repo. More clarity for understand how Omni sees your dbt environments.

Transcript

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

  1. okay I'm up all right so uh new DBT thing um I uh about once a week there are issues that I see which means that this is probably happening a lot more frequently when I don't see it um but where people have set up some sort of they're initially connecting DBT or maybe they're setting up their development environment uh their development DBT environment and like things just aren't working most often it's like these virtual schemas aren't filled out with anything um and there's not really a good way to figure out why other than like digging into the code for their DBT repo to figure out how they name schemas and stuff um so this is the first uh sort of like push forward in terms

  2. of making the setup of the environments and the repo um debuggable one of the like what I typic do when this comes in is I go into the database and figure out like all right what is the what schemas uh and tables are actually trying like is DBT trying to match up what what what does DBT think the tables and such should be named um and that sort of insight has like not been available before um so you'll see now that there's this little Health indicator down here next to an environment within the IDE and when you click that it's going to start showing it's going to open this new dialog that shows you uh here are the databases and schemas that uh DBT thinks

  3. um your models are going to be named and here's the tables and whether or not they're matched up to an omni view um so like in this case we can see that this model is not being matched up and behind the scenes I created it and let's hope this demo Works where I can then refresh schema and a branch I guess um it's I haven't tested all these different scenarios for the demo but um give this a second I guess okay um cool so the health is all good now so now it's telling me that everything is matched up um what happens more commonly is you have a branch and you make a new environment that's like my Dev thing and uh one of the

  4. most frequent things is that this target scheme is wrong because like it should be DBT prod but maybe I think that I should put in sales because I'm really just interested in the sales schema so I'm going to save that this health shows me that nothing has been synced in yet so I should run refresh schema or a DBT sync once again wait a second uh health is still not good and now we can see that it's trying to build schemas DBT prod sales DBT prod sales sales so that's like an indicator that I've got the target schema wrong and it'll tell you over here like if the schemas to the left are not correct then you got to update your environment so I won't

  5. walk through that but if I were to update this and then run or refresh it would then like be correct so this is hopefully solving the bulk of the problems with getting DBT set up Ju