real time power bi

25
12.12.20 15 Real-Time PowerBI: API, Events, Hubs and Streams Davide Mauri [email protected] @mauridb 12.12.20 15

Upload: davide-mauri

Post on 06-Jan-2017

2.202 views

Category:

Data & Analytics


0 download

TRANSCRIPT

Page 1: Real Time Power BI

12.12.2015

Real-Time PowerBI:API, Events, Hubs and StreamsDavide [email protected]@mauridb

12.12.2015

Page 2: Real Time Power BI

12.12.2015

Thank you to our AWESOME sponsors!

Page 3: Real Time Power BI

12.12.2015

Davide Mauri Microsoft SQL Server MVP Works with SQL Server from 6.5, on BI from 2003 Specialized in Data Solution Architecture, Database

Design, Performance Tuning, High-Performance Data Warehousing, BI, Big Data

President of UGISS (Italian SQL Server UG) Regular Speaker @ SQL Server events Consulting & Training, Mentor @ SolidQ

E-mail: [email protected] Twitter: @mauridb Blog: http://sqlblog.com/blogs/davide_mauri/default.aspx

Page 4: Real Time Power BI

12.12.2015

PowerBI You all know what is that, right?

Page 5: Real Time Power BI

12.12.2015

What about REAL TIME dashboards?Two possible ways:

https://msdn.microsoft.com/library/mt267603.aspx

Page 6: Real Time Power BI

12.12.2015

First Option: PowerBI API

Page 7: Real Time Power BI

12.12.2015

Power BI API Workflow

https://msdn.microsoft.com/en-us/library/dn877544.aspx

Page 8: Real Time Power BI

12.12.2015

Power BI & Your App As many (all?) other Microsoft product, Power BI is a

also (mainly?) platform

Rich set of REST API REST: REpresentational State Transfer (REST)

http://www.restapitutorial.com/lessons/whatisrest.html

Allows to interact and manage almost all Power BI objects

Allows the creation of automatic updated (near) real-time dashboard

Page 9: Real Time Power BI

12.12.2015

Power BI & Your App What you can do via Power BI REST API?

Get and create Datasets. Get Tables and update Table schema. Add Rows and Delete Rows. Get Groups. Create Import, Get Imports, Get Import from GUID, and

Get Import by File Path. Dashboard operations: Get Dashboards and Get Tiles.

Power BI REST API Limitations / Throttling https://msdn.microsoft.com/en-US/library/dn950053.aspx

Page 10: Real Time Power BI

12.12.2015

Power BI & Your App Authentication needed

Azure Active Directory Via OAuth2

Full interactive documentation of Power BI REST API available here: http://docs.powerbi.apiary.io/

Page 11: Real Time Power BI

12.12.2015

Demoapiary.io

Page 12: Real Time Power BI

12.12.2015

Integrate Power BI With Your App Create a user account using Azure AD Add a new Application from the Azure

Management Portal https://manage.windowsazure.com

Allow Application to access Power BI Grant Application Delegated Permissions Get Client ID

Page 13: Real Time Power BI

12.12.2015

Integrate Power BI With Your App Authenticate against Azure AD

Use Microsoft.IdentityModel.Clients.ActiveDirectory Library From NuGet. Latest version as of today: 2.19.208020213

Get the token New or Refreshed one

Call the desired REST API specifying the Bearer Token in the Header Receive the JSON answer JSON.NET strongly recommended

Page 14: Real Time Power BI

12.12.2015

DemoPowerBI Client Console

Page 15: Real Time Power BI

12.12.2015

Integration via Event Hub and Stream Analytics

Event hubs allows to ingest *a lot* of events Up to millions per second

Again, REST API Assembly with Object Model available on GitHub

WindowsAzure.ServiceBus (as of today: 3.0.9)

API for Sending events But also for managing Event Hubs

Page 16: Real Time Power BI

12.12.2015

DemoEvent Hubs Client Console

Page 17: Real Time Power BI

12.12.2015

Second Option: Streaming Data

Page 18: Real Time Power BI

12.12.2015

Lambda Architecture Fits in the lambda architecture vision

Real time and “batch” analytics http://lambda-architecture.net/

Page 19: Real Time Power BI

12.12.2015

Integration via Event Hub and Stream Analytics

Azure Stream Analytics allows you to execute streaming queries Like StreamInsight or Apache Storm

Inputs and Outputs has to ben defined Streaming or Reference Data supported

Can use Event hubs as a Streaming Source

Page 20: Real Time Power BI

12.12.2015

Integration via Event Hub and Stream Analytics

Use Streaming SQL to Transform/Aggregate Streaming data Send results to an output

One of the output can be PowerBI This enables the creation of Real-Time

Dashboard That are automatically refreshed

Page 21: Real Time Power BI

12.12.2015

DemoPower BI & Stream Analytics

Page 22: Real Time Power BI

12.12.2015

Third Option: PowerBI DirectQuery

Page 23: Real Time Power BI

12.12.2015

Non-Streamed Data Another option is Azure SQL/DW + PowerBI with

Direct Query Stream Analytics will output to an Azure SQL Database

100% Lambda Architecture Merging can be done via Views or via Power Query

No Streaming so no automatic chart updates You don’t need to refresh data, since we’re using

Direct Query

Page 24: Real Time Power BI

12.12.2015

Questions?

Page 25: Real Time Power BI

12.12.2015

Thanks!!!