power bi 实时

The concept of the IOT (Internet of Things) is that every object that you might think of is somehow accessed and connected to other devices on the internet. Nowadays every electronic device is now becoming smart and these devices are now able to communicate with each other. Many ideas and technology on IOT are being developed and are even being used today.

IOT(物联网)的概念是,您可能想到的每个对象都以某种方式访问​​并连接到Internet上的其他设备。 如今,每个电子设备都变得越来越智能,这些设备现在能够相互通信。 关于物联网的许多想法和技术正在开发中,甚至在今天都在使用。

With the help of IOT, it is possible to collect and analyze automatically which part of a city is concentrated, where people spend more time and in which area, how much time a person spends on average in a shopping mall and so on. In this way, a statistical institution can now obtain any statistical information about larger masses more easily without conducting a survey.

借助物联网,可以自动收集和分析城市的哪个部分集中,人们在哪里花费更多的时间,在哪个区域花费,一个人平均在购物中心花费多少时间,等等。 这样,统计机构现在无需进行调查就可以更轻松地获取有关更大质量的任何统计信息。

With the improvement of IOT apps and sensors, real-time data visualization is the main requirement for a lot of scenarios. Assume that you are working for a production company and you want to track production line speed or you want to track quality ratio on time. Because, if some problem occurs in the production line, you have to handle this issue immediately. For this reason, we need to real-time data visualization.

随着物联网应用程序和传感器的改进,实时数据可视化是许多情况下的主要要求。 假设您正在一家生产公司工作,并且想要跟踪生产线速度或想要按时跟踪质量比率。 因为,如果生产线出现问题,则必须立即处理此问题。 因此,我们需要实时数据可视化。

Power BI has a real-time data visualization capability. In other words, we push streaming dataset to Power BI and Power BI updates dashboards in real time. Primarily, we will examine what is streaming dataset.

Power BI具有实时数据可视化功能。 换句话说,我们将流数据集实时推送到Power BI和Power BI更新仪表板。 首先,我们将检查什么是流数据集。

流数据集 (Streaming dataset)

We can define streaming dataset as it is continuously and real-time data which transport to Power BI. Power BI stores this data in temporary cache for a little time. The streaming dataset can visualize data in dashboard tiles (A tile is a snapshot of your data, pinned to the dashboard).

我们可以将流数据集定义为连续的实时数据,并将其传输到Power BI。 Power BI将这些数据存储在临时缓存中一会儿。 流数据集可以可视化仪表板图块中的数据( 图块是固定在仪表板上的数据快照 )。

Now, we will create a demonstration of real-time data visualization in Power BI. The below architecture diagram can describe the main framework of our demonstration. According to this the diagram as you can see data flow is only one way. Sensor App pushes data to Power BI over an end-point. This end-point define as Push URL by Power BI.

现在,我们将在Power BI中创建实时数据可视化的演示。 下面的架构图可以描述我们演示的主要框架。 根据该图,您可以看到数据流只是一种方式。 Sensor App通过端点将数据推送到Power BI。 该端点定义为Power BI的Push URL。

When we analyze the architecture diagram, it includes 3 steps;

当我们分析架构图时,它包括3个步骤:

  • Sensor collects the data 传感器收集数据
  • Sensor App captures sensor data and pushes this data to Power BI Sensor App捕获传感器数据并将其推送到Power BI
  • Power BI handle this data create and update the dashboard information Power BI处理此数据以创建和更新仪表板信息

演示: (Demo:)

创建一个新的流数据集 (Creating a new streaming dataset)

We will sign into Power BI portal and then select a workspace and click (+) create a link. We will select Streaming dataset.

我们将登录Power BI门户,然后选择一个工作区,然后单击(+)创建链接。 我们将选择流数据集

On this page, we will select API and then click Next.

在此页面上,我们将选择API ,然后单击Next

In this page, we will make some definition about our stream dataset. We will describe the structure of stream dataset and will define the data type of fields, which will be in JSON format. We will define a very simple dataset. This stream dataset only includes speed and date.

在此页面中,我们将对流数据集进行一些定义。 我们将描述流数据集的结构,并定义字段的数据类型,该数据类型将为JSON格式。 我们将定义一个非常简单的数据集。 此流数据集仅包含速度和日期。

At the bottom of the page, you will see a Historic Data Analysis option. When this option is disabled it means streaming dataset stores in a temporary cache for a little time. But when we enable this option this data will start to store. But it has some limitations to post rows, including:

在页面底部,您将看到“ 历史数据分析”选项。 如果禁用此选项,则意味着流数据集存储在临时缓存中的时间较短。 但是,当我们启用此选项时,该数据将开始存储。 但是发布行有一些限制 ,包括:

  • 75 max columns can post 最多可发布75列
  • 75 max tables can post 最多可张贴75张桌子
  • 200,000 max rows stored per table 每个表最多可存储200,000行
  • 1,000,000 rows added per hour per dataset 每个数据集每小时添加1,000,000行
  • And 4,000 characters per value for string column 以及每个值4,000个字符的字符串列

When we click Create button, Power BI generates Push URL. We will use this URL to push stream dataset.

当我们单击“ 创建”按钮时,Power BI会生成“ 推送URL”。 我们将使用此URL推送流数据集。

At this point, we will look again at the architecture diagram and explain details of Sensor app functions.

此时,我们将再次查看架构图并解释Sensor应用程序功能的详细信息。

  • Sensor app will convert sensor data to JSON format 传感器应用程序会将传感器数据转换为JSON格式
  • Sensor app will send data to Power BI over push data URL 传感器应用程序将通过推送数据URL将数据发送到Power BI
  • Now, we will create a synthetic sensor app with VB.net.This app creates random speed values and sends to Power BI push data URL. 现在,我们将使用VB.net创建一个合成传感器应用程序,该应用程序将创建随机速度值并将其发送到Power BI推送数据URL。
  • Open console application in Visual Studio

    在Visual Studio中打开控制台应用程序

  • Add Json.NET and System.Net.Http references.

    添加Json.NET和System.Net.Http引用。

  • Paste this small dummy code to visual studio code pane

    将此小的虚拟代码粘贴到Visual Studio代码窗格中

    Imports Newtonsoft.Json
    Imports System.Net.Http
    Module Module1Public client As HttpClient = New HttpClient()Sub Main()Dim JsonDt As StringDim timeFormat As String = "yyyy-MM-ddTHH:mm:ss.fffZ"Do While 1 = 1Dim RandomSpeed As IntegerDim Generator As System.Random = New System.Random()RandomSpeed = Generator.Next(10, 50)JsonDt = "[{""Speed"":" & RandomSpeed.ToStringJsonDt = JsonDt + ",""Date"":""" & Date.UtcNow().ToString(timeFormat)JsonDt = JsonDt & """}]"Dim content As HttpContent = New StringContent(JsonDt)Dim url As New Uri("https://api.powerbi.com/beta/f6a89ff9-3073-4e72-a603-d9456ebee844/datasets/9d8b59be-0c77-4486-aed3-xxxxx/rows?key=xxxxx_yourkey_xxxx ")Dim response As HttpResponseMessageresponse = client.PostAsync(url, content).ResultSystem.Threading.Thread.Sleep(1000)Console.WriteLine(JsonDt.ToString)LoopEnd Sub
    End Module
    
  • Run console application

    运行控制台应用程序

This code generates random speed data and pushes to Power BI over push URL. If you look at the structure of data which created by console application is the same as the Power BI JSON template.

此代码生成随机速度数据,并通过推送URL推送到Power BI。 如果您查看由控制台应用程序创建的数据结构与Power BI JSON模板相同。

[
{
"Speed":18,
"Date":"2018-05-17T09:15:02.565Z"
}
]

创建仪表板 (Create dashboard)

After completing these steps, we can start to develop the dashboard. In this dashboard, we will create gauge which shows to speed and will create line chart which visualizes speed and date interaction.

完成这些步骤后,我们可以开始开发仪表板。 在此仪表板中,我们将创建显示速度的仪表,并创建可视化速度和日期交互的折线图。

We will click (+) Create and chose dashboard.

我们将单击(+) 创建并选择仪表板。

We will define dashboard name and click Create

我们将定义仪表板名称,然后单击创建

We will click + Add tile and then select REAL-TIME DATA (Custom Streaming Data), click Next

我们将单击+添加磁贴 ,然后选择实时数据(自定义流数据),单击下一步

In this Add a custom streaming data tile page, we will choose our streaming dataset which we created at the beginning of demo and then click Next.

在此“添加自定义流数据切片”页面中,我们将选择在演示开始时创建的流数据集,然后单击“ 下一步”。

In this page, we will choose our dashboard component. In the first step, we will add Gauge. We will set speed value to value field. We will click Next.

在此页面中,我们将选择仪表板组件。 在第一步中,我们将添加仪表。 我们将速度值设置为字段。 我们将单击下一步。

In Tile details page we will set the gauge Title and Subtitle. At the same time, we can enable Set Custom Link. This option is offered when we click gauge so it can redirect any link. We will click Apply.

图块详细信息页面中,我们将设置“ 标题”和“ 副标题 ”量规。 同时,我们可以启用Set Custom Link 。 单击“量规”时会提供此选项,以便可以重定向任何链接。 我们将点击Apply

Finally, our gauge is ready.

最后,我们的量规已准备就绪。

Now, we will add line chart. In Add a custom streaming data tile page chose Line chart. In the Axis field select Date field and in the Values field select speed.

现在,我们将添加折线图。 在“ 添加自定义流数据图块”页面中,选择“ 折线图” 。 在“ 轴”字段中选择“日期”字段,在“ 值”字段中选择速度。

In this step, we will select Phone view and we can see the suitable phone view.

在此步骤中,我们将选择“电话”视图,然后可以看到合适的电话视图。

结论 (Conclusions )

In this article, we discussed real-time data virtualization in Power BI. In fact, this feature is very powerful feature for Power BI because it allows us to connect and track IOT sensors values in web or mobile, especially to visualize sensor data in real-time via mobile devices.. In short, real-time streaming in Power BI is very useful and productive for users and this feature, combined with a cloud-based architecture, allows us unlimited accessibility.

在本文中,我们讨论了Power BI中的实时数据虚拟化。 实际上,此功能对于Power BI是非常强大的功能,因为它使我们能够连接和跟踪Web或移动设备中的IOT传感器值,尤其是通过移动设备实时可视化传感器数据。简而言之, Power BI对用户而言非常有用且高效,该功能与基于云的体系结构相结合,使我们能够无限访问。

参考资料 (References)

  • Power BI RESET API limitations Power BI RESET API限制
  • Push data to Power BI streaming datasets without writing any code using Microsoft Flow 将数据推送到Power BI流数据集,而无需使用Microsoft Flow编写任何代码
  • Push data into a Power BI dataset 将数据推送到Power BI数据集中
  • Real – time streaming in Power BI Power BI中的实时流

翻译自: https://www.sqlshack.com/real-time-streaming-in-power-bi/

power bi 实时

power bi 实时_Power BI中的实时流相关推荐

  1. power bi图表_Power BI中的图表类型概述

    power bi图表 In this article, I am going to give an overview of the most widely used chart types in Po ...

  2. power bi数据分析_Power BI数据模型:使用关系

    power bi数据分析 In this article, we look at how to create different types of relationships between two ...

  3. linux什么是实时调度,Linux中的实时调度

    svenfx.. 17 在实时调度中,FIFO和RR与非实时调度具有完全相同的含义.始终以FIFO方式选择过程,然而,与SCHED_RR的时间量不同,SCHED_FIFO的时间量不受限制. SCHED ...

  4. Power BI+Forms+Flow 实现问卷结果实时呈现

    最近好几位朋友都问到我关于在PowerBI 中实时显示问卷调查结果的方法,今天跟大家分享如何通过微软Office 365 里的组件** Forms .Flow 和 PowerBI**实现调查问卷的实时 ...

  5. 155_模型_Power BI Power Pivot 进销存之安全库存

    155_模型_Power BI & Power Pivot 进销存之安全库存 一.背景 谈进销存的概念时,我们也需要提及另外一个概念:安全库存. 库存周转在理想的状态下是做到零库存,但是在内部 ...

  6. sql power bi_在SQL,Power BI和MS Excel中计算移动平均值

    sql power bi In this article, I'm going to talk in detail about the moving average in SQL and how to ...

  7. # 160_技巧_Power BI 新函数-计算工作日天数

    160_技巧_Power BI 新函数-计算工作日天数 一.背景 Power BI 2022 年 7 月 14 日更新了最新版本的,版本号为:2.107.683.0 . 更多更新内容可以查看官方博客: ...

  8. 158_模型_Power BI 使用 DAX + SVG 打通制作商业图表几乎所有可能

    158_模型_Power BI 使用 DAX + SVG 打通制作商业图表几乎所有可能 一.背景 最近对 Power BI 中使用 SVG 比较感兴趣,今天我们使用 DAX + SVG 复刻一下 Ze ...

  9. 178_技巧_Power BI 动态排名多项展示

    178_技巧_Power BI 动态排名多项展示 一.背景 在 Power BI 中做排名矩阵时,我们经常遇到同一维度下,多项展示排名的问题.类似这样的排名矩阵,排名的名次不会太多,但是同一维度下会有 ...

最新文章

  1. 世界首条柔性人造触觉神经诞生,有望应用于义肢感触等领域
  2. SQL优化--inner、left join替换in、not in、except
  3. 【C++ 语言】面向对象 ( 成员函数 | 常量函数 | 友元函数 | 友元类 | 单例类 )
  4. hihocoder #1078 : 线段树的区间修改
  5. Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks(更快的RCNN:通过区域提议网络实现实时)
  6. 15个Google面试题以及答案~~~~你会几个?
  7. java 错误输入异常_在Java中进行输入验证期间用错误通知替换异常
  8. lisp修改界址线属性_地籍与房产测量 A卷答案
  9. Web安全-之文件上传漏洞场景
  10. 洛谷——P1075 [NOIP2012 普及组] 质因数分解
  11. 前端布局面典型案例 面试题
  12. LCA的 Trajan 算法
  13. Xilinx FPGA 初探内部时钟管理
  14. MAVEN-POM.XML配置解读
  15. outlook 签名_如何在Outlook 2013中创建新签名
  16. 深度学习提高模型准确率方法
  17. spotify歌曲下载_如何像真正的DJ一样让Spotify在歌曲之间进行淡入淡出
  18. ndarray数组的操作和运算
  19. Harvard Dataverse 数据批量下载
  20. 正极前驱体生产废水除磷

热门文章

  1. 惩罚函数外点matlab,禁忌搜索算法求解带时间窗的车辆路径问题(惩罚函数版 附MATLAB代码)...
  2. java 初始化duration_JAVA 8 DURATION 详解
  3. bzoj3456:城市规划
  4. 在debug模式下引入一些性能检测工具
  5. Selenium 调用IEDriverServer打开IE浏览器
  6. 为什么要使用getter/setter
  7. 【log4net】配置文件
  8. MyEclipse6.5设置
  9. git commit报错(husky > commit-msg hook failed)
  10. 计算机网络学习笔记(0. 引言)