Power BI for Developers Rui Romano SQLSaturday.com
Rui Romano BI Pro / Architect / Developer Blog Twitter 2 |
Agenda PowerBI Intro (a quick one ) PowerBI Developer Platform Integrate Enhance
PowerBI? SaaS Data Service Data Analysis & Exploration Raw Data => Insights (fast & easy) Out of the box Connectors to SaaS Solutions Extension to current BI Investments
Demo – PowerBI
Power BI Developer Platform IntegrationREST APIEmbed Stream Analytics Extension Custom Visuals Content Packs*
REST APIs /DataSets/Dashboards /Reports /Imports /Groups Standards based REST JSON OAuth Cross Platform Easy to use
Get DataSets GET Authorization Bearer eyJ0eXAiOiJKV1QiLCJhbGc1NiIsIng1dCI6Ik1uQ1… (Access Token) Response { "datasets": [ { "id": "5018fd65-71e6-47cb-8dde e7b8", "name": "MyMovies" }, { "id": "9862d253-f4a d aff78d5e", "name": "SQLSaturday_SalesMarketing" }
Create DataSet POST Request { "name": "SalesMarketing", "tables": [ { "name": "Product", "columns": [ { "name": "ProductID", "dataType": "Int64"}, { "name": "Name", "dataType": "string"}, { "name": “Price", "dataType": “double"}, { "name": "IsCompete", "dataType": "bool"}, { "name": "ManufacturedOn", "dataType": "DateTime"} ] } ] } Int64 String Bool Datetime Double
POST Table Rows POST /tables/ /rows Request { "rows": [ { "ProductID":1, "Name":"Adjustable Race", "Category":"Components", "IsCompete":true, "ManufacturedOn":"07/30/2014"},{ "ProductID":2, "Name":“Racing Bike", "Category":“Bikes", "IsCompete":true, "ManufacturedOn":“10/30/2014"} ]}
Demo – PowerBIPS
Power BI App OAuth Requirement Identification to PowerBI and Users Declares the permissions it needs Two Types: Native App Web App
OAuth: WebApp Auth. Flow
OAuth Access Token? Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Ik1uQ19WWmNBVGZNNX BPWWlKSE1iYTl…
Demo – Send to PowerBI (ASP.Net)
Login the user Call Call Get the embed tile URL Ex: &tileId= &tileId=<tileGUID Create an IFrame with the Tile URL PostMessage the AccessToken Embed Visuals in your App // find the iFrame on the page and handle the loaded event. var iframe = document.getElementById('iFrameEmbedTile'); iframe.src = embedTileUrl + "&width=" + width + "&height=" + height; iframe.onload = postActionLoadTile; // post the access token to the iFrame to load the tile function postActionLoadTile() { // get the access token. accessToken = document.getElementById('MainContent_accessTokenTextbox').value; // construct the push message structure var m = { action: "loadTile", accessToken: accessToken, height: 500, width: 500}; message = JSON.stringify(m); // push the message. iframe = document.getElementById('iFrameEmbedTile'); iframe.contentWindow.postMessage(message, "*"); }
Demo – Embed Visualizations
Demo – PhantomJS
Demo – PowerBI Tiles
Custom Visuals GitHub Community Driven Visualizations & Framework TypeScript D3.js
IVisual? Init()Update()Destroy() JavaScript Object
Demo – Custom Visuals
DataView?
Capabilities
Real-Time Analysis
Demo – Twitter Real-Time Analysis
Automatic Retention Policy BasicFIFO Store up to rows Affects all the Tables in the DataSet
PowerBI + Stream Analytics Components of an Azure Stream Analytics Application Azure SQL DB Azure Event Hubs Azure Blob Storage INPUT Source of Events Azure Blob Storage Azure Event Hubs Reference Data Query runs continuously against incoming stream of events Power BI
Demo – PowerBI + Stream Analytics
Applications & Samples DevScope “Send to PowerBI” Excel App DevScope “PowerBI Tiles” Office App Chrome Extension SSIS Adapter
Links PowerBI Authentication (OAuth) service/ service/ Custom Visualizations Stream Analytics + PowerBI
THANK YOU! ASK