Real time streaming in Power BI


Hello. And thank you for joining me today. I’m Mohammad Sbeeh. In this webinar, I will show you how to set up real-time streaming dataset in Power BI. So, let’s see our topics First, I will explain what is a real-time streaming in power BI? Then, we will understand the types of real-time datasets. And finally, I will demonstrate how to push data into Power BI Streaming Datasets.
Okay Let’s Start. With Power BI real-time streaming, you can stream data and update dashboards in real-time. The devices and sources of streaming data can be factory sensors, social media sources, service usage metrics and anything else from which time-sensitive data can be collected or transmitted. There are three types of real-time datasets which are designed for display on real-time dashboards: Push dataset
Streaming dataset
PubNub streaming dataset With a push dataset, data is pushed into the Power BI service. When the dataset is created, the Power BI service automatically creates a new database in the service to store the data. With a streaming dataset, data is also pushed into the Power BI service, with an important difference Power BI only stores the data into a temporary cache, which quickly expires. (the data will clear itself after an hour.) streaming dataset are optimized for quickly displaying real-time data. PubNub is a global Data Stream Network and Realtime network-as-a-service company. With a PubNub streaming dataset, the Power BI web client uses the PubNub SDK to read an existing PubNub data stream, and no data is stored by the Power BI service. In this webinar, I will be focus on Push dataset. In streaming and PubNub streaming dataset there is no underlying database in Power BI so you cannot build report visuals against the data that flows in and cannot take advantage of report functionality such as filtering, custom visuals, and so on. this table explain the difference between the three types of datasets There are three primary ways you can push data into a dataset: By using the Power BI REST APIs
Power BI REST APIs can be used to create and send data to push datasets and to and streaming datasets. using the Streaming Dataset UI
In the Power BI service, you can create a dataset by selecting the API approach Using Azure Stream Analytics
You can add Power BI as an output within Azure Stream Analytics (ASA), and then visualize those data streams in the Power BI service in real time. Now, I will demonstrate Create Streaming Dataset
Create Dashboard
Push Data into Power BI Streaming Datasets with C# Let’s go to demo the first step is creating streaming
data set to do that we need to open Power BI service I need to open my workspace and in the
top right corner we need to create a new streaming data set. I need to select API for Dataset name I need to type
temperature because this demo simulate temperature data from a factory zone, so
I will define the following value zone name as a Text temperature as a Number date
and time as a DateTime When Historic data analysis is disabled, you create a streaming dataset. When Historic data analysis is enabled, the dataset becomes both a streaming dataset and a push dataset now click on create’ button to create
the Dataset once the Dataset is created copy the Push URL and save it somewhere. now that the data set has been created
it’s time to add a dashboard after creating the dashboard we need to
add a tile to add tile click add tile and then select Custom streaming data. select
temperature zone dataset and click Next now we can add a custom data tile before creating the application that
post data to data set we need to make sure that all that asset value names
without space now we are ready to write code to push
random data to streaming data set from visual studio we will create a new
console application to push data I renamed my application to temperature
sensor I need to remove all the generated code first step I need to create entity class
for temperature data I need to define the three property for temperature
entity class zone name temperature and DateTime now I need to create objects from
HttpClient an object from Random class and string variable for Power BI post URL from nuget package I need to
install “newtonsoft.json” library Copy and Past Power BI Post URL now, I need to put the code to post data now in the main method I need to write
while loop and throw while loop I need to put my code to Post random number
to Power BI Service I delay the post function one second every time. now I
need to run my application and check my dashboard while the application is running the
streaming data set tile should update in real time if you need more information about
real-time streaming in power bi you can visit war bi documentation website. Thank You!

Leave a Reply

Your email address will not be published. Required fields are marked *