Exploring the dbt - BI workflow (Omni Live: April 2024)

Omni Live · May 1, 2024 · 18:51

Transcript

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

  1. All right, let's get started. Hey, Jack. How are you? Doing good, Chris. Doing good. Great. So, welcome to today's Omni Live. We're going to talk about the DBT and BI workflow. I'm Chris Merrick. I'm co-founder and CTO of Omni. Uh, before we dive in, just want to let people know uh we're going to record this to share it around later.

  2. Uh, so if you need to jump, uh, you'll be able to see the recording. Uh, also, if you have questions, we're going to keep an eye on the feed. So, uh, send those questions in and we will try to get to them at the end. Um, so just to get started, uh, my name is Chris Merrick, CTO, co-founder of Omni.

  3. Um, and you know, one of the things I also did in my past life was I worked closely with, uh, the folks who originally built DBT. Actually, I was one of the first committers to the DBT project. Um, and uh, have actually been probably one of the longest running users of DBT. So DBT is in my in my DNA from from day one.

  4. Uh, Jack, do you want to tell us a little bit about yourself? Yeah. Uh great to meet everyone. My name is Jack Sweeney. I'm a solutions engineer here at Omni. So I've been spending a lot of time in the field with our customers uh with and without DBT, but mostly with uh seeing a wide range of behavior there.

  5. Uh but very excited to share a little bit more from the technical side today too as we dive in with Chris and we'll jump into a little bit of a demo later on as well to show some use cases off. Yeah. And so you know Jack and I like Jack said like a lot of our customers use DBT.

  6. You know, at this point DBT is is ubiquitous, right? It's uh saying you use DBT is like saying you breathe air. Uh and it's been incredible to watch the growth of DBT as a project, as a community, as a company. Uh it's just been unbelievable. Um and you know, Jack and I sort of see this from two different angles.

  7. I talk to a lot of our customers and and users about how they are using DBT and sort of how Omni as a product integrates with it and interacts with it. And Jack, of course, I mean, you you probably work with it directly with some of our customers. Obviously, we use it internally as well. Um, and so, yeah, Jack, do you have any other any other thoughts on how you've seen DBT?

  8. Yeah, absolutely. I think like you said, uh, we definitely see it from a couple different sides, but, uh, from the field, what we've seen quite a bit with customers and just talking to other folks out there in the data world using DBT is there's a wide range of how folks are using it. Today we see folks who uh are very heavy of everything being modeled in dbt all the way up to folks who are doing very lightweight stuff in dbt and not you using a little more sparingly for things that are just materializing very heavy tables.

  9. Um what's been interesting is it seems like there's uh some accepted best practices but continuing to see more and more patterns emerge of where folks are really driving towards is what they want to have as their end state uh especially when it comes to the BI side of things. Absolutely right. And like I said, so I have been using DBT from from day one.

  10. Um, but then also kind of had this uh interesting experience of of starting Omni uh about two years ago. Uh and you know as we started Omni, one of the things we were really cognizant of is the fact that DBT is ubiquitous and it's a great tool for uh doing in database modeling. And so uh you know one of the benefits you get is when you start the a product with the paradigm already in existence you get to sort of think about what's the right way to interact with dbt and this is something that we thought a lot about and you know one of the things we said from from the get-go is that you know data modeling and querying I think of them as

  11. just two sides of the same coin right like when you're writing a query you are modeling in some sense uh and you know sometimes you might literally want to be re reusing that model. Other times, you might just be, you know, modeling a little calculation that you then throw away. And and on the other hand, when you're when you're building a model, you know, I've I can remember, you know, building many DBT models where I had to go actually analyze the data as I was modeling to understand what my model was actually doing and producing.

  12. So, I I really think of modeling, querying, and analyzing as just two sides of the same coin. uh and you know as we built Omni one of the things that we really are trying to optimize for is uh thinking of DBT and sort of the in database model and then also the sort of model within Omni the BI tool as sort of these two complimentary pieces and thanks Jack for showing for for flashing up this this diagram um but you know we think of these things as sort of a layer cake and you know there's always going to be a database model right like there the data needs to exist in some form in the database and again with ubiquity ubiquity of DBT uh there's

  13. going to be additional models in the database that are you know curating that data cleaning it uh structuring it in the way folks want it to be structured um but then additionally there's always a model in the layer above the database because querying is modeling so you know sometimes in in Omni that's a sort of a semantic layer model that has a bit of structure uh but you know if you're just writing SQL it's also there's some modeling in there as well.

  14. Um and so rather than you know I think if you look at other tools sort of tools that were uh built before kind of the DBT paradigm became so common I think there's a lot of tools trying to own the data model and sort of be the one-stop shop for data modeling. Um and and that's not really how we're thinking about Omni.

  15. We rather think of omni as sort of the top layer of the data model but also a layer that needs to facilitate movement of the data model between the layers. Right? Because sometimes right like we said I might start querying and have no intent around data modeling in the moment that I'm writing my query. I'm just trying to answer a question explore some data but then realize oh wait okay I've defined this calculation.

  16. I've defined uh you know the structure of a view and I actually I'm gonna need to reuse this and and maybe I need to reuse it within my BI tool within Omni or maybe I need to reuse it across sort of all of my data sets and sort of at a more foundational level in the database. And one of the things we are doing with Omni is trying to make that a very seamless transition so that you can start modeling in in sort of the the kind of at the end user like you can you can start modeling in our you know Excel-like interface even and that model can then sort of progressively get promoted into you know a shared model with an Omni or

  17. it can go straight into DBT and everything else within Omni just sort of updates and and continues working seamlessly. So that's the workflow that we are trying to optimize for. It's really something that we think is kind of unique relative to how other people are thinking about DBT in the ecosystem. Um, and you know, at the end of the day, the goal there is, you know, make sure that the folks who are sort of spending most of their time in DBT are uh able to interact with the DA BI layer in the simplest possible way and then at the same time making sure that the folks who live in BI are able to get to data and do their jobs as quickly and efficiently as

  18. possible. Um, so Jack, yeah. do do you want to uh talk a little bit more about that and and show us off a little bit about how we actually do that in Omni? Yeah, absolutely. So, what I'll go ahead and do here is I'll actually jump over to this other slide. Uh and what we'll see here is really just uh that we have four main use cases where we can really talk about how DBT and Omni work together.

  19. And so the first here that we have on screen uh is really just how surfacing changes in DBT models within Omni can happen. Oftentimes when folks are working in DBT, we're very rapidly creating new columns, new tables. We're changing names of existing parts of models. There's a lot of things moving in flux and moving very quickly. A lot of BI tools uh don't do a great job of absorbing those changes though.

  20. So this can end up creating some duplicate work or some pain down the line of updating those column names or updating SQL queries underlying all of this. With Omni, all we have to do is push a button. We have a button for refreshing our schema. it'll pull all those database data warehouse changes through automatically unlike other tools that might require some more manual lift.

  21. Uh and this can actually also be triggered uh via our API as well. So we have a way of automating this for a true hands-free experience from when you hit dbt build to push through all the way to have that data fresh and ready and waiting for you in Omni. The second uh really goes handinhand with the first.

  22. Uh this is about bringing any metadata along with from along with you from DBT into Omni. So for things like view and field level descriptions, these are going to propagate through to uh Omni, preventing the need for any duplicate work that you might be doing already in DBT. Uh so really helps just cut down on any dupliciveness and save you a lot more time uh while still providing that value to your end users there as well.

  23. The third uh which we'll dive into a little bit more uh via demo after this uh is actually the ability to create net new uh DBT models from Omni. This is super important for two key reasons. Uh the first is really when we're modeling data we're not familiar with, uh it can be really critical to touch and feel that data to understand what we're actually even looking at.

  24. I might not know the exact values for a field underneath it, especially if it's a table that's new to me, uh or if it's net new data from a new source that we're pulling in and I haven't really interacted with before. Working in Omni allows you to do just that where I can really touch and feel it and I can perform what we call like just in time modeling.

  25. So really incrementally as Chris was alluding to start to model these things out and decide where that needs to live either within uh Omni itself or pushing it out to DBT very seamlessly through our integration. The second uh is really just kind of alluding to the the last point I made there is really that we often don't realize where uh something might need to live in terms of logic at time of creation.

  26. things can start off as a nice ad hoc or one-off request. Uh but really isolated business logic might need to be more widespread as time goes on. Those ad hoc analyses all of a sudden turn into a weekly, monthly, quarterly kind of requests from uh VPs or uh boards that might need some sets of data. Uh the nice thing is that within Omni, we provide a lot of lightweight gestures to move these things fluidly around within the data model, making it nice and easy for you to get what you might need uh while still having the flexibility to create where you might want to and adjust that later on.

  27. The last piece here uh is really for ensuring minimal breaking changes as you move data from uh dev schemas to broad scheas within DBT. Oftent times BI layers are pointed at DBT broad environments. That makes a lot of sense. Obviously, we want to use that production data and that's what we've been vetting and testing and have ready to go.

  28. Uh, but with Omni, what we can also do is simultaneously point a branch back at a DBT dev schema. This is great because it lets us see uh how our changes impact the BI layer. We can proactively make bulk changes for things like field name changes, update columns, change all the references we might need to in a very scalable way.

  29. And then when we actually merge those changes at the DBT level, we can actually move and lock step at Omni to merge those as well. So that way your end users have a really seamless experience with minimal breaking changes as you're moving from a development uh schema within DBT shifting all that data into production. It makes for a nice experience of the BI layer as well without having to go through an old process that might look something like move from de dev to prod and then go check the BI layer very quickly and frantically for anything that might have broke and make the appropriate adjustments there.

  30. So those are four of the main use cases. With that, we're actually going to jump into a little bit of a demo here on the third item. Uh and this is going to be use a particularly exciting example. So, we actually interact with quite a lot of JSON data. And as folks may know, interacting with JSON data in SQL can be pretty messy.

  31. Uh, when it comes to unnsting data, especially if you're not familiar with the blob uh or what might be within its contents, uh, this can be pretty tricky, especially as these fields tend to be high velocity and might have a lot added to them over time, too. With Omni, we can easily unnst the JSON using the UI, harden it at the DBT level, and do all this without writing a single line of SQL.

  32. So this is huge for nontechnical users because it enables them to interact with these fields in a way that they might not be able to otherwise. And for technical users, it's great because it provides a huge time savings. Frankly, time is probably better spent elsewhere than unnesting JSON and moving that into the DBT layer for a lot of folks.

  33. So let's go ahead and jump in. And I'll go ahead and I'll actually exit out of these slides here. And we'll go over into Omni. And what we'll see here is a workbook where I've got a table pulled up. And what I can see in this table is I actually have this pages context JSON field. And what we can see when we click into this field is it has a couple different keys and values within it.

  34. So I can see that I've got uh a page initial refer, a page initial referring domain, a page path, refer a referring domain, and a page search. This is great. As an end user, I might want to come in and interact and pull out this page path, but I don't know how. So, I can scroll all the way to the right in our table here.

  35. And when I click on this field, I'll actually be able to see an option here that says create field from JSON. This will pop up a little modal where I can actually come through and select the different items that I might want in here or even just select all of them all together. When I do this, I'll go ahead and hit create fields.

  36. This will actually open up additional fields in my JSON. So I can remove that raw from our query and I'll go ahead and actually just pull in the individual columns where we can see these flowing through uh as we'd expect as if they were just independent fields extracted from the JSON themselves. This is great because I don't actually need to go through any process as an end user to write the SQL to do this or uh as a non-technical user to go look up how I might actually interact with JSON data in SQL and how I pull all that out.

  37. Now, one of the great things here is that let's say uh I actually wanted to take this data. It's relatively small scale today, but and we can see this just by adding a count to our table. If I go to the right, we can see that we've just got about at most 200 or so rows, but I just got a call from our marketing VP who just told me that this was a bit of a beta test that we were slowly rolling out to see how the functionality looked.

  38. And this is soon to be scaled up to several billion rows. Obviously, running this at query time is not something we want to do where we're running all these unn JSON functions under the hood uh every single time we track this data. It'd be much better if this was just a nicely materialized table. So, what started off out as more of an ad hoc analysis, I can actually now go to our model menu here, go into push to dbt, and I'll have an option here to give this DVT a file name or sorry, this file a uh this DVT file a name.

  39. And we can go ahead and just leave it as JSON demo. And down at the bottom right, we'll see a little toast pop up within Omni telling me my query has been pushed to my git repo. I can go ahead and hit view changes to take a look at this. And I'll see that I have the option to merge this into my base branch.

  40. But I'll actually scroll down and I can see the SQL that Omni's written under the hood to produce all of this. This is great because I as I can see it went through and did all the casting or pulling out from JSON uh without me having to write any of this. I don't even have to understand under the hood how this might work even though it would be useful too.

  41. What's super powerful here is now that we have this all in this uh pull request. This looks good to me. I can actually go ahead and create a pull request. But if you have other flows already set up for your git repo, we can actually go ahead and move these through any formalized processes that you might already have in place since this is moving to your repo.

  42. So I can go ahead and merge this into my base branch here. And now when I go over to my DBT cloud IDE, I'll go ahead and refresh here. And I'll have the option to pull through uh pull from remote to get an update here. And what we'll see here when I do this is our models will add in our JSON demo file.

  43. And we can now see same as what we saw in the git repo and same as what we saw in Omni. We now have the SQL written here where I can come in run dbt build and create this as its own table. So a very quick process just for creating uh and making all this data super accessible in a lot of ways.

  44. Uh and really just wanted to show that off uh to make sure that you can understand how it's easy to go from without any lines of code doing simple and powerful things in Omni and effortlessly moving them to DBT to be persisted to that warehouse layer. Obviously, there's quite a bit more uh to show about Omni and our DBT integration, but for the sake of today, we wanted to keep it short.

  45. I'll pause it there and I'll I'll pass it back to Chris. Thanks, Jack. Uh yeah, and I think just to emphasize too that this is a sort of iterative process, right? So model gets pushed to dbt and then you can add dimensions and other you know you can sort of work on top of that model in omni or in a query and then sort of edit it and repeat the process.

  46. So right like a model's never done and we want to really make sure that the workflow to to update it is seamless because there shouldn't be any friction to make some of these little edits. Um so that's it for today on on Omni Live. Uh we do have some uh questions uh that came in on the chat.

  47. So uh let's read back uh one of these. So uh question we have is uh said refresh schema with a button or API call. Does that update the omni model code or just the catalog that those models can pull from? uh it's it's actually updating the the Omni model code and you know so an interesting kind of uh added um uh sort of strategy to Omni itself in addition to sort of that layer cake of uh Omni sitting on top of DBT models and there's actually sort of a layered set of models within Omni itself and and sort of the base set of models is we call the schema model which is just a reflection of the the data we're seeing in your database.

  48. So, uh, when you hit that refresh schema button, it's actually updating that base layer of model in in Omni. Uh, and let's see, are there any other questions? Uh, looks like that was it for the questions. So, um, as Jack mentioned, there's lots more. Uh, if you want to get more information about Omni, about how we're thinking about DBT, if you just want to chat DBT, uh, with with myself or with Jack, uh, reach out, let us know.

  49. Uh, reach out on LinkedIn or or on our website. Um, and we've we've already written several blogs on this topic. We plan to be talking about a lot because it's something we're thinking about a lot. Um, and it's also something we're still in development on and want to talk with people about. So, uh, if you're interested, don't be shy.

  50. Uh, and thanks again, Jack, and everyone who joined and we'll see you next time. Thank you. Bye.