Creating your first EVENTSTREAM in Microsoft Fabric

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
- Yooo! What's up? This is Patrick from Guy in a Cube. And Adam and I have talked about almost every feature in Fabric, Lakehouse, Warehouse, Pipeline, dataflows, but we've been skirting around RTA (Real-Time Analytics). We talked about Real-Time Analytics Kusto with Sofia a while ago, but we haven't talked about it since Fabric's been out. And we were out in Oslo, shout out to the team in Oslo, Marthe, Emilie and Cathrine, such a great event. And we did a workshop there, and we talked about real time analytics there. And I decided, hey, I should do a video (bright music) and show people how cool this is and how easy it is to set up. So imagine you have, wait, wait, wait, enough of all this talking. You know what I like to do, let's do what? Let's head open to my laptop. So what I'm doing, I've written some PowerShell, and I'm simulating ice cream truck temperatures. If you are a follower of this channel, you watch the videos, you know I did this with streaming dataflows, which I don't think is available anymore, but now I'm gonna reuse this code. I'm not lazy, just efficient with Real-Time Analytics, okay? I've created some PowerShell that basically streams data to an event hub in Azure, and I'll show you how the event hub ties in in just a little bit. That's all it is, and we'll share this code with you. Then I went in the Fabric and I created a workspace, and after I created the workspace, I switched to the RTA, the realtime analytics persona, and I created a KQL database, all right? And so if you click on this KQL database, you'll see there's no action, there's nothing, there's no tables or anything. So to get data into the database, I can click the database itself, and I can choose to Get data, and you can see I have lots of options here. And I can get data one time or continuous. I'm gonna use continuous, and you can go to event hubs. I'm gonna use an event stream, and you may be thinking, Patrick, wait, wait, you said you were gonna be talking about Real-Time Analytics. Well, I need this event stream, because it allows me to capture, transform, and even land data into different destinations within Fabric with no code, so I'm gonna use this event stream to show you. You can choose New Eventstream or Existing Eventstream, or you can go to the workspace here and choose New and choose Eventstream. This is my eventstream for temps, so let's call it that, and we're gonna choose Create. So just give it a few seconds. It's gonna build out the designer force, because we're not gonna write it in code, which I like, and now you need to choose your source. And so I can go over here and choose the source I want, or I can come right here and choose the source. You can choose sample data, event hubs, IoT hubs, or a custom app. I'm gonna choose an event. So once I choose my event hub, I need to give it a name, so we're gonna call this ehICTruckTemps. And then you can choose an existing connection, or you can click Create New. If I choose Create New, I have to provide some information. I need to provide the namespace, I need to provide the hub, and then a shared access key. Now, when you're in Azure, and you create your event hub, you'll get the namespace, so this is your namespace name. And then if you go to Event Hubs, and you create your event hub, and then you need to click on that, and this is where you would get your shared access key after you create your policy, okay? Don't get it on the namespace, get it on the event hub. I'm not gonna create a new one, I've already created one. I'm just gonna choose my Fabric streaming. You can see it right there. Consumer group is default. I didn't change it, and the data format is JSON. So I click Add, it's gonna do some work behind the scenes, and now you can see my source successfully added, and now I can choose my destination. So you can see there's multiple destinations. So Custom App, Lakehouse, KQO Database and a Reflex. Now I am gonna do a follow up video to this video to show you how you can use Data Activator with Event Stream, so you can proactively monitor the events that's coming from Event Hub using Activator. I'm gonna choose KQL Database. And you have two choices here, you have direct ingestion, which means I'm not gonna change the data at all, or you can choose event processing, so maybe I want to do some transformations of the data. We'll come back and we'll probably do a video on that. So we're gonna call this diTruckTemps. We're gonna choose our workspace, and then we're gonna use this RT analytics one, and then we're gonna choose our database, and then we'll choose Add and Configure. It's gonna add my destination, and then we need to call this ICTruckTemps, and then we're gonna put event hub, so we'll know this is coming from an event hub. You gotta make sure that event is streaming before you get all that done, and then we're gonna choose Next. There we go, so it's found a couple of events. We click Finish, it's gonna do everything it needs to do and then we click Close, there we go, it's ingesting data. If we go here, we should see some data coming in, just give it a little bit. Ah, there you go, so you can see data that's starting to come in. You click refresh, you'll see more and more rows start to stream in. Now it's streaming into my KQL database, check this out. I'm gonna go back over to my KQL database, you can see that it's getting data. I click on my table, it's got some data. So now I want to explore this data, and this was fun. This is when we were in our session. I was like, "Hey Adam, can you write KQL?" And he was like, "Yeah." I was like, "Can you quickly write some up for me?" And so it's funny, let me show you what Adam did. He was like table name in, and he ran it and he goes, "There you go, there's my KQL." I was like, "No man, I need more than that. "I wanna just get a few columns out of the table. "If you go here, you can see there's a few columns. "I just want vehicle, temperature, and capture time." He looked at me and he's like, "You know you can write SQL." I'm like, "What, no you can't." He's like, "Watch, let me show you. "Go back to your explore data. "And what we're gonna do is we're gonna write some SQL." and say select * from, right, so let's run that. You can select it and run this. Boom, it gave me all the columns. I'm like, "What?" And so he said, "What do you want?" I said, "I want vehicle, Vehicle, "Temperature, and Capture time." He's like, "Select it and run it. "There you go, that's what you need." But I need that to be enabled, 'cause I wanna create a Power BI report. And he goes, "Ah, you gotta have KQL for that." The vein was sitting in the front row and he goes, "Patrick, put explain right before your SQL statement. I'm like, "What?" So you put explain and you run and guess what, it gives you the KQL. Put that there, and I run just this statement, you can see and there's my KQL query set, and now if I do this, I can actually build a Power BI report and monitor this stuff in real time. It's pretty remarkable, check it out. Here's my columns, lemme create a line chart. Let's create a line chart. Let's get rid of this filter section. And what I'm gonna do is for the vehicle, I'm gonna put that as legend and then the temperature, I'm gonna put that on my Y axis and then the capture time, and now I can see that truck one is running hot. The temperature for truck one is running a little higher than the temperature for the other truck, and I may need to do some stuff, and you can see how it's refreshing the data. If I'm a little more patient, you can see it's adding more. And if I want to, I can save this report, and I can switch over to the RTA analytics folder. This is so great, and I can call this Truck Temps. I've created a full solution in a matter of minutes. So now it's saved it out, and now if I go over to my analytics workspace, let's refresh this page, there we go. There's my report, there's my eventstream, there's my Semantic model, everything I need is built by building that report. All right, what do you think, are you using RTA? Are you writing KQL queries? What scenarios are you using for this? I'd love to know. You know what to do. Post it in the comments below. If you want to know more about Fabric, there's probably a video flying above my head. And as always, from Adam and myself, thanks for watching. We'll see you in the next video.
Info
Channel: Guy in a Cube
Views: 12,973
Rating: undefined out of 5
Keywords: big data, data analyst, data analytics, data engineering, data integration, data science, data warehouse, kql, kql database, kusto, lakehouse, machine learning, microsoft fabric, microsoft fabric demo, microsoft fabric power bi, microsoft fabric tutorial, real time analytics in fabric, real time data, real-time analytics, rta, rta eventstream
Id: SyRDll6OvX0
Channel Id: undefined
Length: 7min 4sec (424 seconds)
Published: Wed Feb 21 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.