How to build a full analytics workflow in Snowflake Cortex Code with Omni Skills

Product video · May 25, 2026 · 12:42

Transcript

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

  1. Hello everyone. My name is Peter and today I'm going to walk you through how Omni can integrate with Snowflake's Cortex code. In the demo today, what I'll do is I'll create a fictional demo data set via Cortex code and then I'll introduce you to Omni skills that we built directly into Cortex code so that you can interact with Omni in the same command line interface as you're interacting with Snowflake via Coco.

  2. Um we'll be able to create a model within Omni. We'll be able to create dashboards within Omni. And once we create all that content, if we want to, we can take all those definitions that we've built into Omni's model and harden them back into our Snowflake warehouse via semantic views. So other users can interact that interact with them in other tools like maybe a a notebook or with Snowflake intelligence, something like that.

  3. So let's jump right into it. I'll be pausing throughout the demo um to let Cortex code run on the back end, um but let's start right here in my VS Code window. What I'm going to do is fire up Cortex code and I'm just going to hit Cortex. Now what I'm going to do is tell it to create a synthetic data set.

  4. I will say So I'm going to create this fictional demo data set. Um hopefully it asked me what schema I want to put this in. I'm sure it will. Um but I'm going to pause this here for now while it creates this demo data set and we'll see you back here in 1 second. All right. We've came back and now we have three tables as you can see right here.

  5. Um it gives us a few statistics on our tables of what they look like. And then if I go over to my Snowflake warehouse, refresh this page, we should see that we have those tables, podcast streams, and users in here as well. Now, what I want to do is next grant our Omni user access to these tables so I can access them via um Omni.

  6. So, let's go back to my VS Code window here, and I'm going to say grant select access to the Omni demo role on all these tables. So, let's have them run that. And then, we can go in and um talk about Omni skills. So, Omni skills are essentially just, you know, a way for us to interact with Omni via the API in a bash command in the command-line interface.

  7. So, we're going to be able to do things like administrative capabilities. We can um build out an Omni model. We can build out Omni content. We can also just run Omni queries if we wanted to as well. So, let's take a look at what this looks like in here. So, we've granted Omni access to those tables. So, now when I go back here and I go to Omni, um let's go to admin, I can say refresh the schema of the Coco Omni model.

  8. And I can tell it to do this for me, and you can see I have my Coco Omni file over here. In our um schema down here, I do not see those podcasts and streaming data. So, I'm going to tell it to refresh this, and I'll pause this as we're doing it. All right, we can see that that schema refresh happened over here.

  9. So, it says we have podcast, users, and streams tables now available to be discovered. So, when I refresh the page here, we'll pop this open, and we can see that we have our podcast and streams view all built into our Omni model. Now, these are just a straight um definition from the information schema. So, we're just grabbing those those column names, bringing them directly into here, and then we give it a simple count star as well.

  10. Now, the next thing we want to do is actually model these out with our skills. So, what we can do is go into here and say um Omni uh let's go model builder. Can you create an awesome streaming analytics for me? I want a topic with the streams, podcast, and um users view in the Loco demo schema.

  11. I want to see um listen and metrics, user preferences, and anything else that interests me. Um dimensions should have descriptions, labels, and drill fields. AI contexts, synonyms. Same with the topic should have AI contexts and sample queries. Now, I'm going to tell it to go off and actually model this data out for me, and when we come back, we'll refresh the tab or the page in Omni, and you'll see all these models already built out.

  12. So, let's pause it here. Okay, we're back. Uh our skill has done a lot of work. It created uh definitions in view files. It created definitions in the relationships files, so that join logic. And then it created uh definitions in our topic files, so the curated approach for analytics here. Now, it did this all with developer best best practices in mind.

  13. So, it checked out its own branch, and it's actually developing isolation right now. I am waiting to merge this into production. So, if I want to see the updates this has actually done, I can go over here and pop over into the branch that it created over here. And I can see all of those updates it did.

  14. So now you can see it's added, you know, labels, descriptions, synonyms, AI context to help provide better and rich uh context to our AI model. You know, this could be powered by Cortex underneath the hood as well. Um it's created uh you know, different buckets like uh with case when statements, tiers. It's created different measures that we want want to interact with.

  15. Then it's also created um this streaming analytics topic. So here you can see it's actually giving us a description of what this topic is, you know, our joins that we can use, and then even giving us some sample queries that, you know, we can have as starting points. So if I want to take a look at what this looks like in the model, let's explore this in the workbook.

  16. And I can see, let's go to Cocoa Demo, Streaming Analytics. And look at all these um sample queries we got. Most popular genres, let's take a look at it. Genre, stream counts, already prepackaged for me. All that have a lit heavy lifting was done with our Omni skill directly in Cortex code. Now, what I'm going to do is say, "Hey, these look good.

  17. Let's bake this into the production model." So I'm telling it to merge those changes into our prod branch right here so that now I can, you know, go see them for everyone else in our shared model. Now, we could hook this up to get, you know, have a true get integration where I can have this open up a PR with um the model um and go from there.

  18. Perfect. Now we successfully merged those branches. So when I come back over here, I'm going to get out of my branch here, and we'll see that all those changes we made are now in production in our shared model here. Now, now that we have all of this models built out, what I want to do is start creating content.

  19. Now, I could go back to my workbook environment and start creating analysis here. Really, that's where Omni shines with a build-as-you-go workflow. You know, I can go in here and start editing these fields and, you know, exploring them right here within the workbook. But, I can have my Omni skill do that for me directly in Cortex code.

  20. So, I'm going to go back over to my Cortex code CLI and I'm going to say Omni content builder can you build me an executive dashboard for me streaming analytics. I want KPIs and streaming trends over time. So, we're going to let this go off, build a dashboard for us. And once we come back, we'll be able to pop that open in Omni and see what it's done for us.

  21. All right, and we're back. And it created us a dashboard. You can see here it's given us a rundown of 14 tiles with buried chart types. So, let's click on this. Let's open it up and we'll take a look at what dashboard it created for us. So, gave us a couple KPI tiles, some trends over time. Um, really really good dashboard.

  22. It's a great starting point for us. You know, we're still improving the API here coming out so we can actually format this in a better way. And, you know, we're going to make it even better where this could actually create a dashboard from an image of something else. A lot of that can be done directly in Blobby, our AI assistant in app, but we're building that into the API as well.

  23. Now, this has given us a great starting point. We've gone from absolutely nothing to creating a model to building a dashboard within a few minutes, all within Cortex code. Now, I've created all this in Omni, Um, want to actually bake some of these definitions back into my Snowflake warehouse in semantic views. Now, we also have a skill for that where we can actually take a look and actually take a topic in Omni, that streaming analytics topic that I just created, and actually push that back down to Snowflake in semantic views.

  24. So, let's do that. So, let's go um uh Omni to semantic views. Um Can you create a semantic view in analytics and of the uh streaming analytics topic? So, now we're going to let this go off. It's going to review the topic. It's going to review the relationships. And also the view files, take all those definitions, bake them in a semantic view, and it's even going to take those sample queries and parse those into SQL queries and put those as verified queries within the semantic view as well.

  25. So, we'll pause this as it runs through this and I'll come back and we'll go check out the semantic view. All right, and we're back. Um, so went ahead and it reviewed all of our files within Omni, and it actually translated that into a uh Snowflake semantic YAML file and pushed that to Snowflake. So, here you can see it created three logical tables, relationships, verified queries, added the AI context that I built into Omni into the question categorization within the semantic view as well.

  26. And then it even granted uh the demo role select. So, if I go back to Omni and look at my model here and actually hit refresh schema, I'm going to do this manually in here, we should actually see that streaming analytics semantic view in here because Omni pulls that um directly in here as well. Perfect. And there it is.

  27. We can see that it's pulled this in as a referencing the semantic view. Now, let's go over here and we'll actually go over to our Cortex Analyst. We can see that semantic view that was created just now. We can look at um all of that rich metadata that it pulled in from Omni right here. So, it's going to give me that AI context in my question categorization.

  28. Each table has their descriptions. We even have name filters that are being populated in here. Um all those uh relationships that it created. And then, of course, all those uh uh uh sample queries that it translated into um SQL queries right here for us. So, what this workflow has really done is shown us how we can integrate Omni directly in Cortex code.

  29. We can do everything we want to do in Omni right within that CLI, while also doing that other data engineering work downstream in Snowflake as well. And we can actually have this push and pull in both ways, creating a really um robust workflow directly from one CLI.