1. Senior Technical Architect
Yugo Shimizu / 2ndFACTORY Co., Ltd.
@yugoes1021
yugoes1021 Microsoft MVP
for Data Platform - Power BI
(2017.02 -)
Let’s add Power BI
to your IT-Systems or Apps…
~How to use Real-time streaming in Power BI~
2017-09-19
Tokyo .NET Developers Meetup #25
https://www.slideshare.net/yugoes1021/lets-add-power-bi-to-your-itsystems-or-apps
http://bit.ly/0919-Meetup-pbi
2. Today’s goal
You usually use Cloud services, right?
It’s just now the “cloud era”.
If it is not possible to see the data until
tomorrow, it can not be in this cloud
era?
2017/09/19 Tokyo .NET Developers Meetup #25 2
3. Today’s goal
It’s “now” that we want that.
“current” sales.
“current” data that is sent by sensors.
“current” situations of our business.
“current” status of our services.
For our decision making.
2017/09/19 Tokyo .NET Developers Meetup #25 3
4. Today’s goal
So, my session’s goal is
We all here understand how to show
current data on real-time with Power
BI Service.
OK, let’s get started!!2017/09/19 Tokyo .NET Developers Meetup #25 4
5. Self introduce:
Yugo Shimizu (清水 優吾) ♂
2ndFACTORY Co., Ltd.
Senior technical architect
• Former developer of Financial systems, my first career.
• Now tech architect.
• Sometimes write a source code, C# with .NET.
Specialty:
Power BI, Web API, “Not to build, but to connect.”
Twitter: @yugoes1021
Facebook: https://www.facebook.com/yugoes1021
Power BI Study: https://powerbi.connpass.com
Japan Web API Community: https://jwacom.connpass.com
2017/09/19 Tokyo .NET Developers Meetup #25
Microsoft MVP
for Data Platform -
Power BI
(2017.02 - )
5
6. [reference] if you have an MSDN account…
If you have a Visual Studio with MSDN subscription,
you have a benefit of using a Power BI Pro for free for one
year.
https://my.visualstudio.com/
2017/09/19 Tokyo .NET Developers Meetup #25 6
7. How to build a real-time streaming dashboard
■What to decide
1. Which data to get on real time.
2. How to connect the data to Power BI Service.
I mean...
1. =Data source
2. =Architecture
2017/09/19 Tokyo .NET Developers Meetup #25 7
8. Power BI
What is Real-time streaming?
2017/09/19 Tokyo .NET Developers Meetup #25 8
10. Real-time streaming
According to an official page,
With Power BI real-time streaming, you can stream data and update dashboards in
real-time. Any visual or dashboard that can be created in Power BI can also be
created to display and update real-time data and visuals. 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.
Azure
Web Apps
Power BI ServiceClient
Application
Azure
Stream Analytics
Clouds、SaaS、SNS, and so on.
Azure
Logic Apps
2017/09/19 Tokyo .NET Developers Meetup #25 10
11. (参考)PubNub streaming dataset
You can easily try it now just by making the following settings.
[Real-time streaming in Power BI]
https://powerbi.microsoft.com/en-us/documentation/powerbi-service-real-time-streaming/
2017/09/19 Tokyo .NET Developers Meetup #25 11
14. Creating Streaming Dataset
[Two kinds of Real-time datasets]
When visualizing Real-time data with using Power BI, there are two kinds of Real-
time datasets.
You can push your data with JSON format to both datasets by REST API.
• Push dataset
There are an internal database.
Pushed Data is saved.
You can create not only dashboards, but reports.
You can analyze the data later in Power BI Service.
• Streaming dataset
There are no internal database. Data is temporarily chached.
For example, it’s useful to check data for the past hour.
Optimized for real-time data.
You cannot create reports from this dataset. You can visualize on only dashboard.
2017/09/19 Tokyo .NET Developers Meetup #25 14
16. Creating Streaming Dataset
1. Click [Datasets] in [My Workspace]
Click here
2017/09/19 Tokyo .NET Developers Meetup #25 16
17. Creating Streaming Dataset
2. Click [+ Create], and then [Streaming dataset].
Click here
2017/09/19 Tokyo .NET Developers Meetup #25
Click here
17
18. Creating Streaming Dataset
3. Select [API] in [New streaming dataset], [Next].
4. Input [Dataset name] and [Values from stream].
[Values from stream] defines JSON data format and types.
2017/09/19 Tokyo .NET Developers Meetup #25 18
19. Creating Streaming Dataset
※You can choose three types of values by dropdown – DateTime, Number, Text.
2017/09/19 Tokyo .NET Developers Meetup #25
[DateTime] and [Number] is required for streaming
timeline on dashboard.
No DateTime, no visualization of timeline.
No Number, no values for timeline.
[Text] is for an optional value.
If IoT solution, names of edge devices, places.
If Sales analytics, customer name, age, Email address.
[Historic data analysis] is recommended to be turned on.
On: in case you need to analyze the data later.
(Creates both streaming dataset and push dataset)
Off: in case you don’t need to analyze the data later.
(Creates only streaming dataset)
19
21. Add real-time tiles to Dashboard
7. If you have not created dashboard yet, please create dashboard as the following.
Click here
2017/09/19 Tokyo .NET Developers Meetup #25
Click here
21
22. Add real-time tiles to Dashboard
7. If you have not created dashboard yet, please create dashboard as the following.
2017/09/19 Tokyo .NET Developers Meetup #25
Click here
22
23. Add real-time tiles to Dashboard
8. Add real-time tiles to dashboard.
Click
2017/09/19 Tokyo .NET Developers Meetup #25
• Shows streaming
dataset list.
• Select your target
dataset.
23
24. Demo 2 – Push by HttpClient
2017/09/19 Tokyo .NET Developers Meetup #25 24
26. Three examples to try real-time streaming
1. The easiest way to use real-time streaming
Get and Visualize Temperature & Humidity in your room.
• Sony MESH Temperature & Humidity Tag
• iPad MESH App
• IFTTT(MESH ⇒ Maker Webhooks)
• Power BI Service
2017/09/19 Tokyo .NET Developers Meetup #25 26
27. Demo 3 – write no code.
2017/09/19 Tokyo .NET Developers Meetup #25 27
28. 1. The easiest way to use real-time streaming
2017/09/19
Sony MESH
Temperature
&
Humidity
Sensor
IFTTT
App
MESH
App
Power BI Service
Web API
notification
JSON
JSON
Tokyo .NET Developers Meetup #25 28
29. (Reference)What is IFTTT ~from Wikipedia~
IFTTT is a free web-based service that people use to create chains of simple
conditional statements, called applets. An applet is triggered by changes that occur
within other web services such as Gmail, Facebook, Instagram, or Pinterest.
For example, an applet may send an e-mail message if the user tweets using a
hashtag, or copy a photo on Facebook to a user's archive if someone tags a user in
a photo. IFTTT is an initialism for If This Then That.
https://en.wikipedia.org/wiki/IFTTT
https://ifttt.com/2017/09/19 Tokyo .NET Developers Meetup #25 29
30. 2. One-step advanced way
Sony MESH
Temperature
&
Humidity
Sensor
IFTTT
App
MESH
App
JSON
Azure
Logic Apps
JSON
Power BI Service
Web API
JSON
notification
2017/09/19 Tokyo .NET Developers Meetup #25 30
31. 2. One-step advanced way
Sony MESH
Temperature
&
Humidity
Sensor
IFTTT
App
MESH
App
JSON
Azure
Logic Apps
JSON
JSON
Power BI Service
Web API
notification
Microsoft Flow
2017/09/19 Tokyo .NET Developers Meetup #25 31
32. 3. An actual case
2017/09/19
Azure
SQL Database
Visualization
Self-service BI
Situation prediction
Azure
Machine Learning
Environment sensor
Bluetooth
Wi-SUN
IoT Hub
Stream
Analytics
App
Servicer AdminShops
Chat Bot
Azure
Web Apps
Sensors
Sensor
CC2650STK
Other sensors
Tokyo .NET Developers Meetup #25 32
33. 3. An advanced actual case
2017/09/19
Azure
SQL Database
Visualization
Self-service BI
Situation prediction
Azure
Machine Learning
Stream
Analytics
管理者
Web AppsClients
Mobile
Apps
API
Management
Web
Apps
Azure
SQL Database Azure
Functions
IoT Hub
Management
Tokyo .NET Developers Meetup #25 33
34. Summary
1. Real-time streaming is easy.
To try it is possible without coding.
(Money is a little needed)
2. Make a fascinating dashboard.
3. Suitable for a demo / a presentation.
4. Attention required for data life cycle.
5. Anyway try it!!
2017/09/19 Tokyo .NET Developers Meetup #25 34
35. (Reference)URLs
[MESH Temperature & Humidity Tag]
http://meshprj.com/en/
http://meshprj.com/en/tag/MESH-100TH-TemperatureAndHumidity.html
[SimpleLink Bluetooth low energy/Multi-standard SensorTag]
http://www.ti.com/tool/cc2650stk
2017/09/19 Tokyo .NET Developers Meetup #25 35
36. Thank you once again
for taking the time
to join today’s presentation.
If you have any question, please ask me anything
2017/09/19 Tokyo .NET Developers Meetup #25 36
Editor's Notes
Thank you for attending this presentation.
My name is Yugo Shimizu and I am a Microsoft MVP for Power BI.
Today, I would like to talk about Power BI for you Developers.
This presentation will take about 50 minutes.
If you have questions, please do not hesitate to ask me.
At first, I have a few questions for you.
How many people are the developers?
Developers should raise your hands.
People who have used Power BI?
Have you used Power BI?
というわけで、
本セッションのゴールは
Power BI にリアルタイムに
データを表示する方法を
ここにいるすべての人が理解すること
です。
Let me introduce myself.
Visual Studio with MSDN を会社や個人でお持ちの場合
Power BI Pro が 1 年間 無料で使用できる 特典 があります。
https://my.visualstudio.com/
こちらにアクセスしてご自身のアカウントでログイン
■前提
リアルタイムに取得するデータを決める
Power BI へのつなぎ方を決める
つまり…
=データソース
=アーキテクチャ
ということですね。
Power BIリアルタイム ストリーミングとは?
公式ページによると…
Power BI のリアルタイム ストリーミングでは、データをストリームし、リアルタイムでダッシュボードを更新できます。 Power BI で作成可能なビジュアルやダッシュボードは、リアルタイムのデータやビジュアルを表示し、更新するためにも作成できます。 工場のセンサー、ソーシャル メディア ソース、サービス利用指標、および時間依存データの回収元または転送元となるあらゆるものがストリーミング データのデバイスとソースになります。
以下の設定をするだけで誰でも簡単に今すぐ試すことができます。
ストリーミング データセット の作成
ストリーミング データセット の作成
[リアルタイム データセットの種類]
Power BI でリアルタイムの可視化を行う場合、対応しているデータセットが2種類あります。
両方とも REST API で JSON を POST することでデータを追加可能です。
プッシュ データセット内部に DB あり。データも普通に保存される。ダッシュボードだけでなく、レポート作成可能データ分析可能
ストリーミング データセット内部に DB なし。データは一時的なキャッシュ過去 1 時間分のデータのみ見れればよいといった場合に有効リアルタイムデータに最適化レポート作成ができない。ダッシュボードでのみ視覚化
I will show you a demo using HTTPClient.
Let's send data from HTTPClient to the created dataset.