Building a data product in less than 30 minutes

Omni Live · June 20, 2024 · 28:41

Transcript

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

  1. All right, Jack, let's get going here. Uh, welcome to everybody who's joined the Omni Live, uh, live stream. Today, uh, we are going to talk a little bit about Omni's embedded analytics offering. Uh, but before we do that, uh, introduce ourselves. Uh, you may have seen us here before. Uh, my name is Chris Merrick, co-founder, CTO of Omni.

  2. I'm here with Jack Sweeney. Jack, do you want to introduce yourself? Yeah, great to meet everybody. My name is Jack Sweeney. I'm a solutions engineer here at Omni. Uh, cool. So, Jack and I are going to show you a little bit about uh Omni's embedded analytics offering. So, first you what is embedded analytics? What do we mean by that?

  3. What we mean is uh the ability to embed Omni dashboards, charts, other you know visualizations into other applications. So uh very frequently used in sort of like a SAS uh web application context. Uh and uh this is something that you know we have built as a way to help people who want to add a data feature to their SAS application and also as a way you know we have uh customers who are using this as sort of the core of a very data focused application.

  4. So it can really be kind of as small or large as you know your application demands. Um and the beauty of uh using Omni to do this rather than doing it yourself and I say this as a person who's responsible for an engineering team is that it can be a very uh low lift for the engineering team to integrate Omni and then allow product managers, data analysts uh you know folks who are really uh intimately familiar with the data to essentially build the feature within Omni without using any code um you know using our chart building, querying uh dashboard building tools.

  5. uh and you know iterate on it, maintain it themselves rather than having to burden the engineering team. So it's really a good way uh you know essentially to kind of uh take that you know take an entire feature and uh outsource it to Omni rather than having to burden your own engineering team with it. Um we've had customers who you know have taken what they estimated would have been months of work and uh use Omni to to deploy a feature in about a week.

  6. Um sometimes even less. So, uh, you know, we to to kind of show you a little bit about what this looks like. Uh, Jack, do you want to bring up uh our our demo environment and and we can just give you kind of a quick peek? Absolutely. Let's go ahead. So, I'll go ahead and share my screen here.

  7. And what you'll see is what we call Gleam. And Gleam you can think of as an e-commerce retailer that carries many different brands. As Chris mentioned, this is a good example of an embedded analytics use case. We have folks who use uh embedded analytics with Omni to do a lot of different things. Look at product usage, uh brand performance, things of that nature.

  8. Uh but what we could do here is log into the Gleam portal and I'll log in as my admin user here. And uh this will allow me to see how my brand specifically is performing within Gleam's portfolio of brands that they sell online. And when I hit login here, uh I will see that I am being shown data that's only associated with Carheart, which is what my brand is as that admin user.

  9. Uh so we have a nice partitioning going on here behind the scenes uh which we'll dig into more and we'll get into the weeds of uh where we're actually injecting mandatory wear clauses for each user uh who is logging into the portal so that they are only shown their own data based on a single dashboard that's being built uh and allows for uh teams to expand that out across an entire group of customers rather than having specific dashboards per customer.

  10. within this dashboard it yourself um you'll be able to see we can do a lot of things like we can drill into the data if we'd like uh I can go ahead and see a lot of information on hover same as if I was within the native omni application um but allows for full exploration for end users to really get to know and touch and feel the data so within that I can also do things like I could filter this down to California uh and I could see the data that gets returned back to me will still be within that same carhe heart set um and provides just a nice ability ility to let folks really take the data into their own hands and self-s

  11. serve my own analytics. Now, what you'll also see is a lot of custom styling that we've done here within Omni specifically as well as with within the embedded iframe. We'll dig into this a little bit more, but we do have some different visualization types that provide a lot of flexibility that make it nice and easy to make things designed exactly as you might want your app to uh mirror, as well as the ability to do things like pass through different CSS parameters to have things like fonts, uh background colors, shading, all the type of stuff that you might expect and want to have to customize the look and feel available within Omni uh for your application as well.

  12. Anything to add there, Chris? No, that's great. And and so um this is kind of what a sort of fully baked uh embedded analytics uh implementation can look like. Um but Jack and I thought we might actually walk through how you get to this point, right? What what does it actually take, you know, sort of both within Omni and within uh sort of the engineering code base of your application to do this?

  13. Uh, and so, you know, the good news is Jack and I actually, you know, we have, uh, our own little side project that we run. Uh, you know, this is sort of our plan B in case, you know, for retirement way down the line. Uh, we have our our website called Cat Vids. And so, Jack and I, you know, this is a website where, uh, users can come and post their own cat videos.

  14. Uh, other users can interact with those cat videos. They can comment on them. They can like them. Um, and you know, Jack and I were thinking about this. We said, "You know what? It would be really great if we let our cat content creators uh have some analytics about how their videos are performing." Um, so started to do and and you know, the good news is we're we're like producty people.

  15. So, you know, we kind of started collecting this data from the very get-go, right? So we have a a data pipeline and we record all the interactions in the app uh into our Snowflake data warehouse. Uh so we have all this data um but we need to actually get it back into the application to show our users.

  16. So we thought we could use our omni live session here to actually implement that. So, the goal is going to be, you know, in the next, let's say, 10 minutes or so. I'll give Jack 15 just in case it takes a little extra, uh, to get our our analytics dashboard, you know, built from scratch and then integrated back into our cat mids website.

  17. Uh, so what do you think, Jack? You think we can do this? Do it. All right. Cool. I'll flip over back to Omni. And what we have here is actually just a workbook uh, right off the bat. Workbooks are where we can come in Omni to get started with a brand new analysis. We'll see that I've got uh right now I'm looking at my cat vids events data table.

  18. Um this is early days as Chris mentioned, so we're still building out a lot of the different features and things we might be glogging and collecting along the way. But if I go ahead and pull in some different columns here, I can see we've got a whole bunch of different events across the platform. Um upwards of a million.

  19. So we've had a lot of good uses so far, especially in the cat watching video or cat video watching department. Um, we've got a time stamp kind of telling us a little bit about when these things happened as well as some individual event IDs and user IDs so we can associate who might be actually interacting with these.

  20. Now, what we can do is we can very quickly pull together a couple different tiles and visualizations. We'll build that into a dashboard and then as Chris mentioned, we'll put that back into the Capid site. And what we'll do along the way there is we're actually going to take a quick sidetrack and pause uh just to show how we're going to implement that rowle security so that one user can only see their own usage data.

  21. Our users are very concerned about others uh being able to see their own activity. We want to make sure that that is nice and private and secure and not being shown across users. So let's go ahead and get started here. I'll start by just clearing out this query that I initially looked at. Uh and we're going to build out a couple things.

  22. The first is going to be just a simple visualization here where we're going to look at across every day the uh we're going to pivot on the event here uh and we're going to look at just the count of events uh by type every day. So I'll flip over to the results pane here uh and switch to a chart just to see what we get from Omni here.

  23. Omni is going to automatically select a visualization type. Looks like we've got a line chart to start which we can leave as is for now. And I'll go ahead and just rename this. And we'll just call this uh events uh by day. And I'm going to very quickly go ahead and actually duplicate this tab. And I'm going to make something uh similar, but in this sense, we're actually going to look at this in more of a data table.

  24. We have folks who might want to look at the aggregate trends here while also seeing their underlying activity data on a day-to-day. So, I'll flip back to the results view, and I'm actually going to go ahead and remove the events column here. And I'll go ahead and add in a year, a quarter, a month, and a week, allowing us to have some different rollups here as well.

  25. And I'm going to slide this timestamp date column all the way to the right to get these nice and in the right order. Now, if I want to, I can flip over to the chart view, and I'll see that I'm automatically brought into the Omni table visualization. And what I can do here is if I flip over in the options pane, I'll see that I actually have the ability to do something called grouping dimensions.

  26. This will look very similar in a lot of ways. uh to an Excel pivot table. So for example, I can open and collapse across these different time periods or any other dimensions that I might add to this data to see the individual row level detail or the aggregate subtotals for that. What we're actually going to do along the way here too is I'm going to go ahead in our styling and I'm actually going to set our background colors to be fully transparent.

  27. So that way when we embed this back into the cat bids site, we get a table that blends in nicely with the background of what Chris has helped set up on the front end for cat bids. Great. So we've got our uh our initial date detail table and I'll just call this maybe events by day detail. Um, let's build out a couple KPIs as well, just to make it nice and easy to have our key call outs by event uh for each person to know what they've been doing on a daily basis compared to the prior day.

  28. We like to think about our active users uh on a daily basis more importantly uh than some other grains. So, we really want to encourage that behavior and put some nice big numbers in front of them so they can know what's going on there. So, I'll go ahead and add a new tab here and I'll pop open that cats events table once again.

  29. And I'm going to go ahead and I'll filter the event to be on uh the we'll start with just a playing of videos. So the most popular interaction there. I'll go ahead and hit update just to add that filter. And I'm going to add as we mentioned just a time grain. And we'll just see a count of events uh for each day.

  30. I'll go ahead and I'll just call this maybe we'll call this like video uh plays KPI. and I'll flip over to uh the chart right after I sort this in a descending order. So I want to see how many have I watched today, what did I watch yesterday, etc. And when I go to our chart, we'll see Omni once again has selected a visualization for us.

  31. But I can actually go under options here and select a different visualization. We'll see we have a lot of choices here. Uh a lot of the standard things you might expect, bar charts, line charts, area charts, uh and scatter plots as well. But we also have our KPI visualization. And this will make it very easy for us to go ahead and actually add in uh just a key call out for what folks might want to see.

  32. So, for example, we'll start you out with a number in a period over period comparison, but I can go ahead and add in a spark line if I'd like. I could add a progress bar where I can maybe be tracking towards some goal of views that I might want to see every user hitting every day. Um, I could add in text to help explain what might be going on there, or even an image, which will default to a little kitten, uh, but could always be changed if we'd like.

  33. So, I'll go ahead and I'll clear these out and just stick to our original uh number and period over period comparison. And I'm going to go ahead and update the title here on the right just to say this is for video plays. Great. So, let's go ahead and we'll make a couple more of these. And very quickly, I can go ahead and just duplicate this tab.

  34. And I can switch my filter from a play video. And we're going to switch this to uh the video comment. And I'll go ahead and I'll just update my tab name as well. So, I'll just call this comments API. And I will also change the uh text up here just to say uh comments. And we're going to do the same thing uh as well.

  35. I'll go ahead and duplicate this two more times. And we're going to do this for the uh video likes as well. So, we'll go ahead and do that. And then I will go ahead and also do it for the Let's go ahead and update the name here. So, we'll just call this likes KPI. And I'll update that title once again.

  36. We'll call this likes and we will switch this one up here from comment to be uh video seeking. And we will just call this uh seeks KPI. Double click on that just to rename it. And I'll just update the title here too. We'll call it seeks. All right. Great. So, that was pretty quick. What did we just do?

  37. We went ahead and we built out a couple different tabs across this workbook to create all these different queries and results for our dashboard. Now, when I flip over to the dashboard view, I'll see that these are all actually laid out on the dashboard for me already. And I can go ahead and drag and drop and click to move these around.

  38. So, I can grab the video plays KPI and resize that tile down. I'll go ahead and grab the comments one and put it right beneath that and just mirror these sizes across the board here. We're going to go ahead and add in seeks and comments. So, really just making it nice and easy to adjust the layout here as I click and drag to move things around as I might expect as an end user.

  39. Now, let's go ahead and I'll resize this uh line chart as well. And we'll make this nice table, nice and wide. And what we can do as well, just from a design perspective, since Chris is setting up a nice framework for us on the front end, I really want this to blend in. So, I don't want these tiles to be on a white background.

  40. I want them to just kind of fade into the page. So, I can actually on a tile by tile basis go through and remove the backgrounds of those. And we'll see as I do that, these look like they sit in the page a little bit more and they'll blend in nicely with our cat vid site as well there.

  41. The one other thing I've noticed uh is it would be great to add a filter here. So, we've got this data for all time, but we might want our users to be able to interact and see how they might be comparing across different time periods uh to really have a little more control and gran over the granularity.

  42. So, I'll go ahead and I'll click add filter up here and I'll go into my cat vids events table and say I want to add a filter on the time stamp. And let's just say we can go ahead and update this uh timestamp uh label. We'll just call it date. And I'm actually going to change the default value from 7 days to something like 60 just to give us a little bit more range to work with.

  43. Now, the one other thing I'll note here is that I like the line chart, but maybe I'm a little more interested in the nominal values than just the trend. So, I can flip quick back into the workbook and I'm actually going to change this up to be a bar chart for us. And now when I flip back to the dashboard, we'll see that that is reflected in the stacked bars as well.

  44. Great. One of the last things we can do here is just let folks know what they're looking at. So, I'm going to go ahead and add a text tile. And this will give us a markdown tile that we can have in our visualization that I can come in and edit and update and apply all the types of markdown formatting that I might need.

  45. So, I'll just go ahead and call this uh welcome to cat vids stats. And the nice thing is if I don't know markdown formatting, we do have this little toolbar up here to help address uh heading sizing. We can do things like bolding, italicizing, strike through, all the same kind of commands you might be used to if you've used markdown in the past.

  46. And we'll go ahead and we'll remove the background here as well and just squeeze that up. All right, so we've got our dashboard and we can go ahead and we can drop this into uh into the cat vit site. But what do we still need to do? Well, we need to add that rowle security to make sure that user by user, we're not going to be showing folks the wrong data.

  47. To do that, we're going to do two things. The first is adding what we call a user attribute. And I'll go ahead and I'll open up a new tab here where I'll go back to the Omni homepage. And within the admin section, we'll see that there's this section called attributes. This will allow me to associate an individual user uh with a value for that attribute.

  48. And we can do this internally uh just by hitting a new attribute button here. And we'll call it cat vids user. I'm going to go ahead and use a uh API name of just the cat vids user. And we can do things like we can choose if this is going to be a string, a numeric, if we want to have multiple values allowed, give a description, or just provide a default value, which I'll set to be true.

  49. Now, the great thing is when I come over to users over here, I can actually go ahead and see uh for each user what's being set. I filter this down just to myself for the purposes of the demo, make it a little easier for us to work with. So, we have to look across all the users here.

  50. But I could go in and actually edit my value away from the default if I'd like. Now that we have this attribute, I'll pop back to our workbook here. And what we're going to do is I'm actually going to go back and go into the model within Omni. And I'll pass it back to Chris for just a moment to speak about the model as well to give a little bit of a high level of what we're working with here.

  51. Thanks, Jack. And yeah, so Jack's been hard at work kind of setting up all this analytics. And you know, I think this is where, you know, the data model underlying everything you do in Omni is a real sort of uh key piece of this puzzle because not only is this going to make it really easy for Jack to uh set up this rowle security sort of enforced filtering and you'll see he's adding this access filter which is going to ensure that anytime this data is accessed it is uh this filtering is applied.

  52. But I think the key the key other thing to keep in mind here is that this is not just going to apply to this workbook or this dashboard. Um you know we're applying this at the topic level and so the topic is kind of the entry point to exploring all of this data. So that means whenever this data is explored this rowle level filtering will be applied.

  53. So even if new dimensions new even views are added to this topic the rowle filtering will always be applied. So that you know when we go expand the types of analytics that we're offering our cat vids content creators, we can still rest assured that the they're never going to see data that doesn't belong to them. Um so that's you know and we're going to show uh shortly how we link this all together you know with the cat vids user ID that that is coming from the cat vids application.

  54. Exactly. Uh and as Chris mentioned here, what I was doing while he was speaking uh was adding what we call an access filter. So this is going to inject rowle security and there are three components to how this uh interaction works. The first is mapping what database field or uh reference we want to say should be included as part of the wear clause.

  55. So in this case we're doing that on our user ID. So I've got a table reference here and then the corresponding user ID for that. The next is the user attribute. So basically saying what am I comparing this to? What am I setting equal to in this column in the wear clause for the SQL uh which we can set back in that user attribute page and we'll do in just a moment.

  56. And the last is a value for unfiltered. You can think of this as almost a bypass for this access filter saying if anyone has a value of true so let's say the admins who might be building this dashboard such as ourselves uh let them see everything otherwise apply that rowle attribute. So what we'll do is I'll pop back to our uh user attribute here and I'm actually going to set my value to one of our user ids.

  57. Now what we'll see is when I go back to our dashboard here or our workbook rather. If I refresh the page, we'll see that this visualization will update. And now when I go ahead and take a look uh at the uh SQL here, we'll see that we are including a user ID that's actually being part of this restriction.

  58. So I can see that this is filtering on the given user ID uh to have that correct value and showing me just my individual views that I might have as a user. And we can see if I flip back to the dashboard view, this will be shown across the board for all my stats where I can see I actually don't even have any seeks, but I've got a few different items that have occurred here for when I've logged in while I've viewed different videos.

  59. And you can see this user has spent quite a bit of time looking at some different captive v videos on a regular basis here as well as the detail table that we provided. And just to drive this home when I flip back I'll show once more time one more time as I filter back to myself. If I were to unset this for myself now I can go back to my dashboard and I'll see I can refresh and I'll see that these numbers are now back to that global value.

  60. And if I look at the SQL directly for this individual tile for example, we'll see that there is no wear clause because my value is set to that unfiltered value. So it really provides that nice security around having that rowle security within the data set itself uh on a regular basis. And the way that we do this at scale is through our SDK which I'll actually flip over to now to talk a little bit about uh and let Chris kind of voice over as we're as we're looking through this.

  61. Thanks, Jack. Uh, and yeah, um, so this is the catwid's uh, source code. Uh, please, you know, try not to rip us off, uh, because this is highly proprietary, but you'll see in this. So, this is built using a web framework called Remix. uh you don't need to know anything about remix uh other than uh remix allow in this file we have sort of a function that's running on the server side that is uh generating our URL that is going to be put into an iframe to uh actually point to Omni and and expose the dashboard.

  62. So this function called loader is the function that runs on the server side and it's you know in this case it's really important that this runs on the server side. It contains uh a secret that you can see there in the middle. Um which is the way that we sign this URL to ensure that uh you are only able to embed uh your own dashboards and that your dashboards will never be embedded by anybody else.

  63. So uh the um the iframe URL is generated on the server side. And so let's kind of walk through it. Points to a con piece of content. Um, and that is a pointer to that dashboard that Jack just created. You can easily find that ID uh from within the share dialogue in the dashboard over that embed section.

  64. And yeah, you can see it right there at the end. Um, so the uh we point to the dashboard. We also we configure some information about like the user who's going to be using this um this embedded uh instance of omni. So we can give it an external ID that really can be anything that sort of is more useful for us to understand you know later who was the user.

  65. So we're going to use the the cat vids user's email as the external ID also the cat vids user's name as their name. Um and so then organization name and domain point map to the it essentially pointers to our instance of omni. So an organization name you know the will be really the the customer's uh organization. Uh I already mentioned the secret.

  66. Uh then we get kind to sort of the more interesting part the user attributes. So this is just a programmatic way to set the user attributes that Jack showed you a minute ago in the in the UI. Um, and so what's going to happen is you we are actually mapping that to the cat vid's user ID. Uh, so that's really kind of the key piece to that ties this whole puzzle together.

  67. That cat vid's user ID is going to get then passed into Omni set as a user attribute and we'll filter the dashboard down to just that user's data. And then finally, we can also pass in some theming information. Um, so we have done that to sort of match the catids brand uh brand guide. And uh you can see we're we're setting the background color, the border color that way.

  68. And there's uh dozens of other uh theming parameters that you can set uh using the SDK. Uh one thing I should call out too that I forgot to mention. Uh you can Jack at the very top, you can see we're importing this embed SSO dashboard function from the Omni SDK package which you can install with npm. Um, so this is just, you know, the part you didn't see was like a simple npm install or yarn add omnicombbed that makes this function available.

  69. Uh, and then we call it from within the server side of our application. Uh, and so the way remix works is we create this iframe URL on the server side. We return it from this loader function. Uh and then Jack, if you scroll down, you'll see on line 36, uh this index function is uh defines the actual UI the the the browser side code of this URL.

  70. So we grab this iframe URL from our server side and we put it into an iframe inside of the actual page. So that is sort of the full run through of the implementation. Uh as you can see, you know, it's a a one one function call with a handful of parameters and then you just wire it into your iframe and you are good to go.

  71. Uh so Jack, do you want to now uh show a little bit of let's see what this dashboard looks like? Um so if you refresh, we also one part we didn't show you that we also added a button for it. Uh so you can see the button for the admin section. We could click on that and we've got our dashboard.

  72. So, as Chris mentioned, nice job, Jack. Yeah, I think we might have got under uh under 15. Not quite sure if we got there under 10. Uh but as mentioned, we had that filter pulling through that I could still come in and interact with. I could adjust this down to maybe like n or up to 90 days or down to 30 days, for example.

  73. Uh making it nice and easy to see how that data changes. Uh, but we have the table that we have for the detail where I can come in and interact and see what the individual values are. I could go in and drill into this information as well. If I wanted to see what these events were, um, it allow me to just pull this right up and see within the within the iframe itself the actual individual play events that might have happened, when they happened.

  74. Um, and we have a lot of functionality within the iframe as we ear showed earlier with Gleam as well. So, big shout out to Chris for for getting this put together on our our snappy looking site, but we're hoping this is going to bring us a lot of lot of new customers here at Cat Vids and folks who join our community as well.

  75. Awesome. Well, so that is the full end to end uh run through of how you embed Omni Analytics into your SAS application. Um, obviously that was a super quick run through uh just to kind of give you an idea of what's possible. You know we have many customers doing this to to fuel their own data powered applications.

  76. Uh one of our customers primary bid have built and launched a customer data product in less than a week. Um so it's you know it's really it gives you a ton of power and flexibility to move quickly uh you know without burdening an engineering team to build all this functionality from scratch. So uh if you have any questions uh our team is sharing um so you know we can hang around here for a few seconds to see any questions come in you know otherwise uh feel free to reach out to us if you want to see more or hear more about uh our embedded analytics.