Power BI for the Developer Integrate, Extend, Embed!

Size: px
Start display at page:

Download "Power BI for the Developer Integrate, Extend, Embed!"

Transcription

1 Czech Republic Windows User Group 2 November, 2017 Power BI for the Developer Integrate, Extend, Embed! Peter Myers Bitwise Solutions

2 Presenter introduction Peter Myers Independent BI Expert, Bitwise Solutions BBus, SQL Server MCSE, Data Platform MVP (since 2007) Experienced in designing, developing and maintaining Microsoft database and application solutions (since 1997) Focuses on consulting, education and mentoring Based in Melbourne, Australia

3 Presentation outline Power BI overview Power BI for developers Summary

4 Power BI overview A new generation of BI Introducing Microsoft Power BI Power BI overview Power BI licensing

5 A new generation of BI Today, BI extends to everyone 3rd wave End user BI Everyone 2 nd wave Self-service BI Analyst to end user 1st wave Technical BI IT to end user

6 A new generation of BI Turning data into business insights is challenging Common BI challenges include End-to-end view Data often resides in disparate locations, making it difficult to see a complete picture of your business Multiple data sources Right data for the right users at the right time Data residing in SaaS solutions, and other external locations, is difficult to access and refresh securely Different roles have different needs, and business users need the latest operational data

7 Introducing Microsoft Power BI Experience your data. Any data, any way, anywhere. Power BI is a cloud-based business analytics service * Power BI

8 Power BI overview SaaS solutions E.g. Marketo, Salesforce, GitHub, Google analytics Content packs Natural language query Sharing & collaboration On-premises data E.g. Analysis Services Organizational content packs Corporate data sources, or external data services Azure services E.g. Azure SQL, Stream Analytics Excel files Workbook data and data models Power BI Desktop files Related data from files, databases, Azure, and other sources Live dashboards Visualizations Reports Datasets Data refresh Power BI Desktop Power BI REST API Prepare Explore Report Share

9 Power BI overview No matter what industry, or what role, Power BI is relevant Business user Business analyst BI professional Software developer

10 Power BI overview No matter what industry, or what role, Power BI is relevant Business user Import data from SaaS sources Work with dashboards and reports Ask natural language questions Discover quick insights from data

11 Power BI overview No matter what industry, or what role, Power BI is relevant Business analyst Import, reshape, integrate and model data Enrich data with calculations Create compelling reports and visualizations Publish reports to the Power BI service Publish content packs to share insights within the organization

12 Power BI overview No matter what industry, or what role, Power BI is relevant BI professional Connect to live Azure data services Connect to on-premises Analysis Services databases Educate and empower the business to create their own reports

13 Power BI overview No matter what industry, or what role, Power BI is relevant Software developer Integrate applications with Power BI Create real-time dashboards Develop custom visuals Develop custom connectors

14 Power BI licensing Three Power BI licenses are available: Power BI for authoring Power BI Pro for sharing and collaboration Power BI Premium for scale large deployments Embedding can also be achieved with Azure Power BI Embedded

15 Power BI licensing Power BI Supported functionality: Connect to hundreds of data sources Clean and prepare data using visual tools Analyze and build stunning reports with custom visualizations Publish to the Power BI service Embed in public websites (publish to web) Free! But no sharing

16 Power BI licensing Power BI Pro Supported functionality: Build dashboards that deliver a 360-degree, real-time view of the business Keep data up-to-date automatically, including on-premises sources Collaborate on shared data Audit and govern how data is accessed and used Package content and distribute to users with apps Currently USD 9.99/month with an annual subscription Academic, government and non-profit pricing is available Power BI Pro trial license can be obtained for 60 days

17 Power BI licensing Power BI Premium Supported functionality: Gain dedicated capacity you allocate, scale, and control Distribute and embed content without purchasing per-user licenses Publish reports on-premises with Power BI Report Server Unlock more capacity and higher limits for your Pro users Capacity pricing is per node per month Estimate cost with the Power BI Premium calculator

18 Power BI for developers Developing with Power BI Power BI REST API Integration with Azure services Custom visuals Custom connectors Embedded Power BI analytics

19 Developing with Power BI Five opportunities exist for developers to integrate, extend and embed the Power BI experience Power BI REST API Integration with Azure services Custom visuals Custom connectors Power BI Embedded

20 Power BI REST API Use the Power BI REST API to: Push data directly from an app into a Power BI dataset Integrate reports into an app Integrate dashboards and tiles into an app Dashboards will update in real-time as data is pushed No more waiting, or needing to press the Refresh button!

21 Power BI REST API Object model hierarchy A Power BI tenant can have multiple datasets, which are each identified by a GUID A dataset can: Be owned by a user or a group Have multiple tables, which are referenced by name A table has multiple rows Power BI workspace Datasets Tables Rows

22 Power BI REST API Authentication An application must be registered in the Azure Active Directory (AAD), and is required to establish an identity for the application Applications are identified by their Client ID Permissions are delegated to the Power BI service REST API calls are made on behalf of an authenticated user by passing a token in the Authorization header

23 Power BI REST API Authentication flow: Client application

24 Power BI REST API Authentication flow: Web application

25 Power BI REST API Common operations Operation Method List all datasets GET Returns a JSON list of all dataset objects that includes a name and dataset ID Create a dataset POST Creates a new dataset with the schema definition that is in the JSON body, and returns the dataset ID and the properties of the objects created List all tables GET Returns a JSON list of tables for the specified dataset Update an existing table schema Add rows to a table in a dataset Clear the rows in a table PUT POST DELETE List all groups GET Returns a JSON list of all the groups of which the user is a member List all dashboards GET (In preview) List all tiles GET (In preview) Returns a JSON list of tiles for the specified dashboard. Use this method to retrieve the embed URL. List all reports GET (In preview) Use this method to retrieve the embed URL

26 Power BI REST API Example: List all datasets Request GET HTTP/1.1 Authorization: Bearer {AAD Token} Content-Type: application/json; charset=utf-8 Response { } "datasets": [ { "id": "2C0CCF12-A A C249D5B9", "name": "Music" }, { "id": "C446840B-94AD-4B C276E69B8FAA", "name": "SalesMarketing" } ]

27 Power BI REST API Example: Add a row to a table in a dataset Request POST /Tables/Product/Rows HTTP/1.1 Authorization: Bearer {AAD Token} Content-Type: application/json; charset=utf-8 { } "rows": [ { ] } "ProductID":1, "Name":"Adjustable Race", "Category":"Components", "IsCompete":true, "ManufacturedOn":"07/30/2014"

28 01 Delivering a real-time dashboard with the Power BI REST API

29 Power BI REST API Restrictions Maximum rows per single push: 10K Note that ingestion rates are restricted to 1M rows/hour Maximum rows per table: 5M A dataset is defined with a retention policy: none: Rows will be collected to the limit basicfifo: Will keep up to 200K rows, and remove the oldest rows as new rows are added Maximum pending requests: 5

30 Integration with Azure services Machine Learning Storage Stream Analytics SQL Server Event Hubs HDInsight Power BI Azure and Power BI have the built-in connectivity and integration to bring Business Intelligence efforts to life Integration can be achieved without the need to develop complex solutions: Direct connect: Azure SQL Database Azure SQL Data Warehouse Spark on Azure HDInsight Power BI Desktop Real-time dashboards with Azure Stream Analytics

31 Integration with Azure services Real-time dashboards with Azure Stream Analytics Use Azure Stream Analytics to push live, streaming data to Power BI Enables real-time dashboards at scale, over data from devices and applications Can stream millions of events per second Can perform aggregation over time windows Can integrate Azure Machine Learning predictions

32 Integration with Azure services Real-time dashboards with Azure Stream Analytics Web Apps Mobile Apps Streaming Power BI Business users easily access results from anywhere, on any device ML API service Application Developer Azure Portal & ML API service Azure Ops Team ML Studio Data Professional HDInsight Azure Storage Desktop Data On-Prem Data

33 02 Delivering a real-time dashboard with Azure Stream Analytics

34 03 Delivering a real-time dashboard with Streaming Datasets

35 Custom visuals Developers can develop custom visuals for use in Power BI solutions which enable visualizing any data in any way

36 Custom visuals Core concepts Custom visuals can be added to: Power BI Desktop reports Power BI service reports, and then pinned to dashboards They behave just like the native Power BI visuals, and can: Have formatting properties Support filtering, highlighting, and editing Display localized information (Power BI supports 42 languages) Optionally, they may be submitted to the Power BI Visual Gallery where they can become discoverable for public download and use

37 Custom visuals Development lifecycle Custom Visual Tool Creation Coding Testing Packaging Submission Developer End user PowerBI.com

38 Custom visuals Development Custom visuals can be developed on Windows, Linux or macos Developers will require skills with web development languages: JavaScript TypeScript (superset of JavaScript) HTML5 SVG CSS/Less Typically, web drawing libraries will be used, like D3, WebGL, etc. Any JavaScript module can be used

39 04 Developing a custom visual

40 Custom connectors Development Power BI Data connector extensibility is achieved by using the Power Query SDK to create: A data connector over an: ODBC driver OData service An M-based connector for any SaaS data source

41 Embedded Power BI analytics Power BI content can be embedded in any app iframe works in any modern browser Relies on web standards: HTML5, JavaScript Works in web applications, mobile applications, and even thick client applications Seamlessly embed content with the Power BI JavaScript API

42 Embedded Power BI analytics Embeddable content Reports View edit or create Fully interactive Dashboards View but no interaction Real-time dashboards Dashboard tiles View but no interaction No support for real-time tiles

43 Embedded Power BI analytics Scenarios Authenticate users using the app s identity store Limit data visibility to users, and by role membership External or internal apps

44 Embedded Power BI analytics Scenarios: Continued External app App authenticates users with its own identity store App users do not require a Power BI account Can control report data based on user name and/or role association Suitable for external customers and business partners Internal app Embed Power BI resources into a custom UX Supports single sign on (SSO) Can control report data based on data-driven role association

45 Embedded Power BI analytics Development features: Power BI JavaScript API Embed a specific report Enable/disable page navigation Load a default report page Navigate to report pages Enable/disable the filter pane Filter reports React to events, including print and reload Enable incontext analytics with filters Enter/Exit full screen mode

46 05 Exploring Power BI Embedded

47 Embedded Power BI analytics Licensing Embed Power BI content from dedicated capacity Power BI Premium license Azure Power BI Embedded

48 06 Publishing to Web

49 Summary Power BI overview Power BI benefits by role Key takeaways Develop opportunities Resources Signing up for Power BI

50 Developer opportunities Develop exactly what you need Use the Power BI REST API to: Enable real-time content management and monitoring Connect to data sources not yet integrated with Power BI Integrate dashboard tiles and reports into apps Integrate Power BI with Azure data services Delivering real-time dashboards from streaming data may require no code! Developers can develop custom visuals and connectors for use in Power BI solutions Embed Power BI seamlessly into applications

51 Resources Power BI site Power BI documentation Power BI community Power BI blog

52 Resources Power BI Developer Center Power BI REST API Console Test each of the REST API operations using the console interface Azure and Power BI knowledge base

53 Resources Extend Power BI with Custom Visuals Custom Visuals for Power BI (Office Store)

54 Resources Embedding samples App owns data User owns data Note: Does not currently work in Internet Explorer Microsoft Power BI Embedded Sample

55 Resources Power BI pricing Power BI Premium calculator Azure Power BI Embedded

56 Questions?

57 Thank you