Demo: Data Modeling in Omni

Omni · March 11, 2025 · 10:07

Transcript

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

  1. Hi, this is Connor from Omni . I would like to talk a little about our data modeling philosophy: a data model should help you quickly explore information and get accurate answers without creating bottlenecks for your team. So we designed Omni with a flexible and layered approach: workbooks allow you to query data, create dashboards, and reports, and a shared model or semantic layer serves as a starting point that allows you to freely explore the data further.

  2. And also the schema layer, where your raw data and any transformed tables from DBT are located. This allows you to approach analysis and modeling in Omni in a way that is most convenient for you. You can start in a workbook, instantly analyze raw data, develop metrics useful to your organization, migrate them to a shared data model, and optionally anchor them in your data warehouse using DBT.

  3. Or you can go the opposite way: start by modeling everything in advance in your data warehouse or in DBT. Use this as the basis for a shared data model, and in workbooks only analyze already modeled data for visualization; or , most likely, you will choose a hybrid approach. Perhaps you model something in advance, transform the data you will definitely use, analyze it in a workbook, and, having found useful insights, transfer this logic into a shared model for colleagues across the organization.

  4. And if it's particularly useful, you can use DBT to pull it directly into your data warehouse. The main goal is to help you work quickly when analyzing data. It also provides a way to manage business logic from your database all the way to dashboards. So whether you use Omni for internal reporting or external analytics , this consistency makes it much easier to manage changes securely.

  5. For example, if you change a field in the data warehouse or in DBT, all queries in Omni, both internal and external, that reference that definition will be updated instantly thanks to the common data modeling framework. You no longer need to worry about breaking something and having to quickly edit a bunch of individual queries. The Omni data model helps manage such changes much more smoothly.

  6. Okay, let me show you how this works in practice. So I'll go to the requests tab. This is the Omni workbook interface, and we are in the topic of order transactions . So you can see those topics here. These are essentially curated datasets that are typically prepared by a data team. This is done so that all these associations are already defined in advance.

  7. Therefore, end users are free to use any of these tables. I'll show you this ID column, and if I open up the SQL, you'll see that the data is pulled directly from the eCommerce Orders Product dataset . No additional definitions are needed. But if I select a different field, like “months since user’s first order,” you’ll see that it’s actually a calculated field based on the first order date and the order creation date in ecommerce.

  8. So this field doesn't actually exist in our database, but it's a metric we defined in Omni that's useful for queries inside Omni, and it doesn't have to be at the database level . We can also change these metrics a bit, so we're not limited to just what's here. I'll clean this up. Let's say I want to create a profit metric.

  9. So, I'll pick a date so we can see it more clearly. I'll take the total sale price. And then I need a margin field. So I'll just quickly create a metric for this . So, we have a total margin. And we will calculate the profit by subtracting the margin from the total selling price. So I can just use Excel syntax here in Omni .

  10. I'll just do B1 minus C1. Let's call this " profit". Perfectly. And then, from here, I want to make it public in this workbook where I'm at. So I can just click "advance to workbook" and that will add it to this field selection here. This profit metric can just stay in this workbook. It doesn't have to interact with anything else.

  11. But if we realize that this is useful for other users, I can click here and select "promote." And this will make it so that other people in other workbooks will also have access to this metric. So if I go to a new workbook, let's say I create a new workbook. I'll go to the order transactions, and here's the profit field.

  12. Now other people have access to this profit metric, even though I created it in a separate workbook. You can see that the modeling here is quite fast and iterative. We did all this in the user interface. It's pretty quick and easy to create new metrics. We've found that this helps bridge the gap between data analysts who are constantly immersed in the details and engineers or team leaders who strive to create an environment that is accessible to everyone, even if users don't know all the metrics.

  13. However, for more complex developments, we can switch to an IDE. Let me show you what this profit metric looks like on the backend. So, we created this profit metric through the interface, simply by pointing and clicking on items using Excel syntax. But behind the scenes, Omni writes this as YAML code. And you see that you can do much more in this IDE, for example, define drill fields.

  14. If I scroll up , there are a few links there. This user ID field leads to a user search bar so you can get more detailed information about a specific user. You can also use this shared model to define access rights. This allows you to control what access or what data will be visible to different users. If I open this model file, you'll see defined permissions, such as "can see PII," which determines whether the user has permission to see certain fields.

  15. And if I go to this users view, we'll see that the first name and last name fields require the "CAN SEE PII" permission to be active. With this shared model, we have a central repository from which all queries in Omni originate. This makes it much easier to manage changes across the entire data stack. Let's say you change the name of a field from "sales" to "revenue" and want to update all queries in Omni that reference that field so that they don't stop working after the rename in the database.

  16. Let me describe in general terms what this process might look like. First, I'll enter the branch. I already have a test branch here. So I'll just go into it. And here, first of all, I will update the diagram. This will push changes from my schema layer, the database layer, to the Omni shared data model. I won't do that now, as we have a lot of data.

  17. This may take time, but will introduce new changes to the Omni shared data model. After that, I can move on to the content validator. It's kind of like a " find and replace" for all the queries you have in Omni. So I can just find a field, like e- commerce, ordered items, sales price, and indicate that it's a representation.

  18. I want to review the entire copy. Oh. Let me type that again. Selling price. This is a field. Yes. Let's take a second to search. OK. So, we see several queries that use this field. And here I can just click " replace". It's like a regular search with replace. I can just write ecom order items.revenue. Then I just click " replace", check the content where this field is used.

  19. I make sure everything works. Once that's done, I can merge this branch. This greatly simplifies change management from start to finish right in Omni. We try to make this automatic in Omni so that the development process is seamless. The last thing I wanted to draw attention to is our integration with DBT. You may have seen when I was looking at this model file, let me find the "order items" view.

  20. We pull up the metadata so you can see a description of your submission. If you scroll down, there 's a full definition. But if you want more details, you can go to the DBT IDE tab and see more metadata from your DBT instance. You can look at specific models. Let's say I open the order items model .

  21. And if you want to go further, you can open it in an Omni workbook. It will now load. It will take a second while DBT is being accessed. You see the full definition of your DBT model, including references. Let's say I want to make a change. Here we have uppercase for status. I can change it to the lower one.

  22. Just rename it. I make a quick change and can push it back to my DBT repository. I call it "change status to lowercase." Perfectly. I press "push" and this will open a merge request (PR) on GitHub. You can go and open it. And then use your organization's usual CI/CD process to apply changes to DBT. OK. This is a brief introduction to data modeling in Omni.

  23. Our goal is to ensure that wherever you place your business logic—in Omni, DBT , a data warehouse, or a combination of both— having a data model as the foundation ensures consistent reporting and simplifies creating a single source of truth across your organization. If you are interested in learning more about data modeling, please contact our team. We'd be happy to show you more.