We all love interactive experiences – and what better way to visualize change than to see it in Power BI? Streaming Datasets are part of the Power BI service that you can continually feed data into and watch your charts respond to the data changes. Greg will walk through the basics of setting up a real-time dashboard in addition to a real-world scenario of viewing the current demand for electricity for the western interconnection. This will be a great opportunity to see this feature in action.
2. Greg McMurray
Senior Software Engineer at WECC
Founder of Aritus Computer Services - 19 years
Experience in Aerospace, Branding & Marketing, Software, Healthcare, Energy
Active in many user groups and communities
Find me online
@goyuix
https://www.linkedin.com/in/goyuix
https://stackoverflow.com/cv/goyuix - top 3% of users
3. Western Electricity Coordinating Council (WECC)
Non-profit to ensure the reliability of the western interconnection
Approved Regional Entity by Federal Energy Regulatory Commission
Create, monitor & enforce reliability standards
Publish various models and independent perspective
Covers 14 western states, 2 Canadian provinces and Baja Mexico
We work with SDGE: San Diego Gas & Electric
4. What We Will Cover
Streaming datasets in Power BI
Associated visualizations for streaming datasets
PowerShell scripts to push data to the service
Issues to watch out for
Discussion around potential uses
6. Power BI Streaming Datasets
Preview announced in August 2016
https://powerbi.microsoft.com/en-us/blog/real-time-in-no-time-with-power-bi/
Released to general availability in January 2017
https://powerbi.microsoft.com/en-us/blog/announcing-general-availability-of-power-bi-
real-time-streaming-datasets/
Datasets available through REST API or via PubNub
Example: Azure Stream Analytics pushes to REST API
Optionally store historic values – 1GB limit Pro / 10GB Premium
Important Note: Dashboards auto-refresh / Reports require refresh
8. Create a Streaming Dataset
Login to powerbi.com portal
Under your workspace create a new Streaming Dataset
This is different than a regular dataset, and isn’t an option there
We will create a sample for holding random numbers with the following schema
Value : Number
Min : Number
Max : Number
Stamp : DateTime
Enable Historical Analysis
9. REST API: Adding Data via PowerShell
Each Streaming Dataset has a unique Push URL
Looks like https://api.powerbi.com/beta/<guid>/datasets/<guid>/rows
Has an encoded access key parameter as well
Base64 encoded, 64 bytes long
Doesn’t appear to be a string representation of anything special – just bytes
POST to this URL with a JSON string
Needs to be an array of objects that represent each row
Example: [ { “Value”:50 } ]
11. Some Gotchas
Can’t open / use with Power BI Desktop
Dashboards auto-refresh to show latest data but…
Reports need to be manually refreshed
You can do this through the API as well
https://powerbi.microsoft.com/en-us/blog/announcing-data-refresh-apis-in-the-power-bi-
service/
Streaming charts are touchy – you will break them
12. Discussion: What are good examples?
Some common examples:
Bulk Electric System (of course!)
Temperature
San Diego: Traffic, Water, Tides, Fires, Park Attendance, Gas Prices, ???
What do these all have in common?
Similar values
Steady values / changes
They also can trigger actions: Change in generation, HVAC, traffic signals
13. Wrap Up
Do you have any questions?
Does this spark any ideas for use for you?
Editor's Notes
PubNub: Real-time publish / subscribe messaging platform founded in 2010. I first saw this in action with the Humble Indie Bundle about the same time.
Azure Stream Analytics: Creates or overwrites a dataset automatically from Azure. Utilizes the API under the hood.
API: This is what we will we be covering tonight.
PeakRC.org publishes the current load on the western interconnection each minute. This was built using Azure Functions to run a PowerShell script each minute to grab that data and push it to a realtime streaming dataset in Power BI.