Power BI 中的实时流式处理Real-time streaming in Power BI

通过 Power BI 实时流式处理,可以流式处理数据并实时更新仪表板。With Power BI real-time streaming, you can stream data and update dashboards in real-time. 可以在 Power BI 中创建的任何视觉对象或仪表板也可以创建为显示和更新实时数据和视觉对象。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.

本文介绍如何在 Power BI 中设置实时流式处理数据集。This article shows you how to set up real-time streaming dataset in Power BI. 但在我们开始之前,务必了解设计为在磁贴(和仪表板)中显示的实时数据集的类型以及这些数据集的不同之处。But before we get to that, it's important to understand the types of real-time datasets that are designed to display in tiles (and dashboards), and how those datasets differ.

实时数据集的类型Types of real-time datasets

有三种类型的实时数据集设计用于在实时仪表板上显示:There are three types of real-time datasets which are designed for display on real-time dashboards:

  • 推送数据集Push dataset
  • 流式处理数据集Streaming dataset
  • PubNub 流式处理数据集PubNub streaming dataset

首先让我们来了解这些数据集之间的区别(本节),然后讨论如何将数据推送到各个数据集中。First let's understand how these datasets differ from one another (this section), then we discuss how to push data into those each of these datasets.

推送数据集Push dataset

使用推送数据集,数据将推送到 Power BI 服务中。With a push dataset, data is pushed into the Power BI service. 创建数据集后,Power BI 服务会在服务中自动创建一个新数据库以存储数据。When the dataset is created, the Power BI service automatically creates a new database in the service to store the data. 由于有一个基础数据库在不断存储传入的数据,因此可以使用数据创建报表。Since there is an underlying database that continues to store the data as it comes in, reports can be created with the data. 这些报表及其视觉对象就像任何其他报表视觉对象一样,这意味着你可以使用 Power BI 的所有报表生成功能来创建视觉对象,包括自定义视觉对象、数据警报、固定的仪表板磁贴等。These reports and their visuals are just like any other report visuals, which means you can use all of Power BI’s report building features to create visuals, including custom visuals, data alerts, pinned dashboard tiles, and more.

使用推送数据集创建报表后,其任何视觉对象都可以固定到仪表板。Once a report is creating using the push dataset, any of its visuals can be pinned to a dashboard. 在该仪表板上,每当数据更新时,视觉对象就会实时更新。On that dashboard, visuals update in real-time whenever the data is updated. 在服务中,仪表板每次接收新数据时都会触发磁贴刷新。Within the service, the dashboard is triggering a tile refresh every time new data is received.

关于推送数据集中的固定磁贴,有以下两点注意事项:There are two considerations to note about pinned tiles from a push dataset:

  • 使用“固定活动页”选项固定整个报表不会导致数据自动更新。Pinning an entire report using the pin live page option will not result in the data automatically being updated.
  • 将视觉对象固定到仪表板后,你可以使用问答以自然语言询问推送数据集的问题。Once a visual is pinned to a dashboard, you can use Q&A to ask questions of the push dataset in natural language. 在进行问答查询后,你可以将生成的视觉对象再次固定到仪表板,并且该仪表板还会实时更新。Once you make a Q&A query, you can pin the resulting visual back to the dashboard, and that dashboard will also update in real-time.

流式处理数据集Streaming dataset

使用流式处理数据集,数据也会推送到 Power BI 服务中,但有一个重要区别:Power BI 仅将数据存储到临时缓存中,该缓存很快就会过期。With a streaming dataset, data is also pushed into the Power BI service, with an important difference: Power BI only stores the data into a temporary cache, which quickly expires. 临时缓存仅用于显示具有一些暂时性历史感的视觉对象,例如具有一小时的时间窗口的折线图。The temporary cache is only used to display visuals which have some transient sense of history, such as a line chart that has a time window of one hour.

使用流式处理数据集时,没有基础数据库,因此不能使用从流中流入的数据生成报表视觉对象。With a streaming dataset, there is no underlying database, so you cannot build report visuals using the data that flows in from the stream. 因此,你不能使用报表功能,例如筛选、自定义视觉对象和其他报表功能。As such, you cannot make use of report functionality such as filtering, custom visuals, and other report functions.

可视化流式处理数据集的唯一方法是添加磁贴,并将流式处理数据集用作自定义流式处理数据的数据源。The only way to visualize a streaming dataset is to add a tile and use the streaming dataset as a custom streaming data data source. 基于流式处理数据集的自定义流式处理磁贴被优化用于快速显示实时数据。The custom streaming tiles that are based on a streaming dataset are optimized for quickly displaying real-time data. 在将数据推送到 Power BI 服务中时和更新视觉对象时,两者之间存在非常小的延迟,因为不需要将数据输入到数据库中或从数据库中读取数据。There is very little latency between when the data is pushed into the Power BI service and when the visual is updated, since there’s no need for the data to be entered into or read from a database.

在实践中,流式处理数据集及其伴随的流式处理视觉对象最适用于最小化数据推送和可视化之间的延迟的关键情况。In practice, streaming datasets and their accompanying streaming visuals are best used in situations when it is critical to minimize the latency between when data is pushed and when it is visualized. 此外,最佳做法是以可以直观显示的格式推送数据,而无需任何其他聚合。In addition, it's best practice to have the data pushed in a format that can be visualized as-is, without any additional aggregations. 准备好的数据的示例包括温度和预计算的平均值。Examples of data that's ready as-is include temperatures, and pre-calculated averages.

PubNub 流式处理数据集PubNub streaming dataset

使用 PubNub 流式处理数据集,Power BI Web 客户端使用 PubNub SDK 读取现有的 PubNub 数据流,Power BI 服务不存储任何数据。With a PubNub streaming dataset, the Power BI web client uses the PubNub SDK to read an existing PubNub data stream, and no data is stored by the Power BI service.

与使用流式处理数据集一样,使用 PubNub 流式处理数据集时,Power BI 中没有基础数据库,因此你无法针对流入的数据生成报表视觉对象,也无法利用报表功能,如筛选、自定义视觉对象等。As with the streaming dataset, with the PubNub streaming dataset there is no underlying database in Power BI, so you cannot build report visuals against the data that flows in, and cannot take advantage of report functionality such as filtering, custom visuals, and so on. 因此,PubNub 流式处理数据集也只能通过向仪表板添加磁贴并将 PubNub 数据流配置为源来进行可视化。As such, the PubNub streaming dataset can also only be visualized by adding a tile to the dashboard, and configuring a PubNub data stream as the source.

对基于 PubNub 流式处理数据集的磁贴进行优化,用于快速显示实时数据。Tiles based on a PubNub streaming dataset are optimized for quickly displaying real-time data. 由于 Power BI 直接连接到 PubNub 数据流,因此在将数据推送到 Power BI 服务和更新视觉对象之间只有很少的延迟。Since Power BI is directly connected to the PubNub data stream, there is very little latency between when the data is pushed into the Power BI service and when the visual is updated.

流式处理数据集矩阵Streaming dataset matrix

下表(或者你喜欢称之为矩阵)描述了用于实时流式处理的三种类型的数据集,并列出了每种数据集的能力和限制。The following table (or matrix, if you like) describes the three types of datasets for real-time streaming, and lists capabilities and limitations of each.

备注

有关推送限制可推入数据量的信息,请参阅此 MSDN 文章See this MSDN article for information on Push limits on how much data can be pushed in.

将数据推送到数据集Pushing data to datasets

上一节描述了可以在实时流式处理中使用的三种主要类型的实时数据集,以及它们之间的区别。The previous section described the three primary types of real-time datasets you can use in real-time streaming, and how they differ. 本节介绍如何创建数据并将数据推送到这些数据集。This section describes how to create and push data into those datasets.

将数据推送到数据集主要有三种方法:There are three primary ways you can push data into a dataset:

  • 使用 Power BI REST APIUsing the Power BI REST APIs
  • 使用流式处理数据集 UIUsing the Streaming Dataset UI
  • 使用 Azure 流分析Using Azure Stream Analytics

让我们依次来看看这些方法。Let's take a look at each of those approaches in turn.

使用 Power BI REST API 推送数据Using Power BI REST APIs to push data

Power BI REST API 可用于创建数据并将数据发送到推送数据集和流式处理数据集。Power BI REST APIs can be used to create and send data to push datasets and to and streaming datasets. 使用 Power BI REST API 创建数据集时,defaultMode 标志指定是推送还是流式处理数据集。When you create a dataset using Power BI REST APIs, the defaultMode flag specifies whether the dataset is push or streaming. 如果未设置 defaultMode 标志,则数据集默认为推送数据集。If no defaultMode flag is set, the dataset defaults to a push dataset.

如果 defaultMode 值设置为 pushStreaming,则数据集为推送流式处理数据集,从而提供这两种数据集类型的优势。If the defaultMode value is set to pushStreaming, the dataset is both a push and streaming dataset, providing the benefits of both dataset types. 用于创建数据集的 REST API文章演示了如何创建流式处理数据集,并在操作中显示 defaultMode 标志。The REST API article for Create dataset demonstrates creating a streaming dataset, and shows the defaultMode flag in action.

备注

使用 defaultMode 标志设置为 pushStreaming 的数据集时,如果请求超过流式处理数据集的 15Kb 大小限制,但是小于推送数据集的 16MB 大小限制,则该请求将成功,并且数据将在推送数据集中更新。When using datasets with the defaultMode flag set to pushStreaming, if a request exceeds the 15Kb size restriction for a streaming dataset, but is less than the 16MB size restriction of a push dataset, the request will succeed and the data will be updated in the push dataset. 但是,任何流式处理磁贴都会暂时失败。However, any streaming tiles will temporarily fail.

创建数据集后,使用 REST API 通过添加行 API推送数据(如本文中所示)。Once a dataset is created, use the REST APIs to push data using the Add rows API, as demonstrated in this article.

所有 REST API 请求都使用 Azure AD OAuth 加以保护。All requests to REST APIs are secured using Azure AD OAuth.

使用流式处理数据集 UI 推送数据Using the Streaming Dataset UI to push data

在 Power BI 服务中,你可以通过选择 API 方法创建数据集,如下图所示。In the Power BI service, you can create a dataset by selecting the API approach as shown in the following image.

在创建新的流式处理数据集时,你可以选择启用历史数据分析(如下所示),这将产生重大影响。When creating the new streaming dataset, you can select to enable Historic data analysis as shown below, which has a significant impact.

禁用历史数据分析时(默认情况下禁用),你将创建一个流式处理数据集,如本文前面所述。When Historic data analysis is disabled (it is disabled by default), you create a streaming dataset as described earlier in this article. 启用历史数据分析时,创建的数据集将成为流式处理数据集推送数据集When Historic data analysis is enabled, the dataset created becomes both a streaming dataset and a push dataset. 这相当于使用 Power BI REST API 创建其 defaultMode 设置为 pushStreaming 的数据集,如本文前面所述。This is equivalent to using the Power BI REST APIs to create a dataset with its defaultMode set to pushStreaming, as described earlier in this article.

备注

对于使用 Power BI 服务 UI 创建的流式处理数据集(如上一段所述),不需要 Azure AD 身份验证。For streaming datasets created using the Power BI service UI, as described in the previous paragraph, Azure AD authentication is not required. 在此类数据集中,数据集所有者接收具有 rowkey 的 URL,该 rowkey 授权请求者无需使用 Azure AD OAuth 持有者令牌即可将数据推送到数据集中。In such datasets, the dataset owner receives a URL with a rowkey, which authorizes the requestor to push data into the dataset with out using an Azure AD OAuth bearer token. 不过,现在采用 Azure AD (AAD) 方法仍可将数据推送到数据集中。Take now, however, that the Azure AD (AAD) approach still works to push data into the dataset.

使用 Azure 流分析推送数据Using Azure Stream Analytics to push data

你可以在 Azure 流分析 (ASA) 中将 Power BI 添加为输出,然后实时可视化 Power BI 服务中的这些数据流。You can add Power BI as an output within Azure Stream Analytics (ASA), and then visualize those data streams in the Power BI service in real time. 本节介绍有关此过程发生的技术详细信息。This section describes technical details about how that process occurs.

Azure 流分析使用 Power BI REST API 创建其到 Power BI 的输出数据流,且 defaultMode 设置为 pushStreaming (有关 defaultMode 的信息,请参阅本文前面的部分),这会导致产生可以利用推送流式处理的数据集。Azure Stream Analytics uses the Power BI REST APIs to create its output data stream to Power BI, with defaultMode set to pushStreaming (see earlier sections in this article for information on defaultMode), which results in a dataset that can take advantage of both push and streaming. 在数据集创建期间,Azure 流分析还会将“retentionPolicy”*标志设为“basicFIFO”;这样设置后,支持其推送数据集的数据库可存储 200,000 行,并且在达到上限后,按照先进先出 (FIFO) 的方式删除行。During creation of the dataset, Azure Stream Analytics also sets the *retentionPolicy flag to basicFIFO; with that setting, the database supporting its push dataset stores 200,000 rows, and after that limit is reached, rows are dropped in a first-in first-out (FIFO) fashion.

小心

如果 Azure 流分析查询对 Power BI 产生非常快速的输出(例如,每秒一次或两次),则 Azure 流分析会开始将这些输出批处理到单个请求中。If your Azure Stream Analytics query results in very rapid output to Power BI (for example, once or twice per second), Azure Stream Analytics will begin batching those outputs into a single request. 这可能会导致请求大小超过流式处理磁贴限制。This may cause the request size to exceed the streaming tile limit. 在这种情况下,如前面各部分所述,流式处理磁贴将无法呈现。In that case, as mentioned in previous sections, streaming tiles will fail to render. 在此类情况下,最佳做法是减慢数据输出到 Power BI 的速率;例如将其设置为超过 10 秒的最大值,而不是每秒的最大值。In such cases, the best practice is to slow the rate of data output to Power BI; for example, instead of a maximum value every second, set it to a maximum over 10 seconds.

在Power BI 中设置实时流式处理数据集Set up your real-time streaming dataset in Power BI

现在我们已经介绍了用于实时流式处理的三种主要类型的数据集,以及可以将数据推送到数据集的三种主要方式,使你的实时流式处理数据集在 Power BI 中正常工作。Now that we've covered the three primary types of datasets for real-time streaming, and the three primary ways you can push data into a dataset, let's get your real-time streaming dataset working in Power BI.

若要开始使用实时流式处理,需要选择可以在 Power BI 中使用流式处理数据的两种方法中的一种:To get started with real-time streaming, you need to choose one of the two ways that streaming data can be consumed in Power BI:

  • 附带流式处理数据中的视觉对象的磁贴tiles with visuals from streaming data
  • 从 Power BI 中持续存在的流式处理数据中创建的数据集datasets created from streaming data that persist in Power BI

无论采用哪个选项,都需要在 Power BI 中设置流式处理数据With either option, you'll need to set up Streaming data in Power BI. 若要执行此操作,请在仪表板(现有仪表板或新仪表板)中选择“添加磁贴”,然后选择“自定义流式处理数据”。To do this, in your dashboard (either an existing dashboard, or a new one) select Add a tile and then select Custom streaming data.

如果尚未设置流式处理数据,别担心 - 可以从选择“管理数据”开始使用。If you don't have streaming data set up yet, don't worry - you can select manage data to get started.

如果已经创建了流式处理数据集,可以在此页(文本框中)输入流式处理数据集的终结点。On this page, you can input the endpoint of your streaming dataset if you already have one created (into the text box). 如果还没有流式处理数据集,请选择右上角的加号图标 (+) 查看创建流式处理数据集的可用选项。If you don't have a streaming dataset yet, select the plus icon ( + ) in the upper right corner to see the available options to create a streaming dataset.

单击 + 图标时,将看到两个选项:When you click on the + icon, you see two options:

下一节介绍了这些选项,并更为详细地介绍了如何创建流式处理磁贴或如何从流式处理数据源创建数据集,以便用于以后生成报表。The next section describes these options, and goes into more detail about how to create a streaming tile or how to create a dataset from the streaming data source, which you can then use later to build reports.

用最喜欢的选项创建流式处理数据集Create your streaming dataset with the option you like best

有两种方法可以创建 Power BI 可使用和可视化的实时流式处理数据馈送:There are two ways to create a real-time streaming data feed that can be consumed and visualized by Power BI:

  • 使用实时流式处理终结点的 Power BI REST APIPower BI REST API using a real-time streaming endpoint
  • PubNubPubNub

以下各节依次说明各选项。The next sections look at each option in turn.

使用 POWER BI REST APIUsing the POWER BI REST API

Power BI REST API - Power BI REST API 的最新改进旨在使开发人员更容易使用实时流式处理。Power BI REST API - Recent improvements to the Power BI REST API are designed to make real-time streaming easier for developers. 当你从“新建流式处理数据集”窗口选择“API”时,将看到 Power BI 要连接到和使用终结点的项:When you select API from the New streaming dataset window, you're presented with entries to provide that enable Power BI to connect to and use your endpoint:

如果希望 Power BI 存储通过此数据流发送的数据,请启用“历史数据分析”,然后你可以对收集的数据流进行报告和分析。If you want Power BI to store the data that's sent through this data stream, enable Historic data analysis and you'll be able to do reporting and analysis on the collected data stream. 也可以了解有关 API 的详细信息You can also learn more about the API.

成功创建数据流后,将为你提供 REST API URL 终结点,应用程序可以通过使用 POST 请求调用该终结点,将数据推送到你创建的 Power BI 流式处理数据数据集中。Once you successfully create your data stream, you're provided with a REST API URL endpoint, which you application can call using POST requests to push your data to Power BI streaming data dataset you created.

发出 POST 请求时,应确保请求正文与 Power BI 用户界面提供的示例 JSON 相匹配。When making POST requests, you should ensure the request body matches the sample JSON provided by the Power BI user interface. 例如,将 JSON 对象包装在一个数组中。For example, wrap your JSON objects in an array.

使用 PubNubUsing PubNub

通过 Power BI 进行 PubNub 流式处理集成,可以使用低延迟 PubNub 数据流(或创建新的数据流)并在 Power BI 中使用它们。With the integration of PubNub streaming with Power BI, you can use your low-latency PubNub data streams (or create new ones) and use them in Power BI. 选择“PubNub”后,选择“下一步”,你将看到以下窗口:When you select PubNub and then select Next, you see the following window:

警告

可以使用 PubNub Access Manager (PAM) 身份验证密钥保护 PubNub 通道。PubNub channels can be secured by using a PubNub Access Manager (PAM) authentication key. 将与有权访问仪表板的所有用户共享此密钥。This key will be shared with all users who have access to the dashboard. 可以详细了解 PubNub 访问控制You can learn more about PubNub access control.

PubNub 数据流通常数量很大,而且并不总是适合以其原始形式进行存储和历史分析。PubNub data streams are often high volume, and are not always suitable in their original form for storage and historical analysis. 若要使用 Power BI 对 PubNub 数据进行历史分析,必须聚合原始 PubNub 流,并将其发送到 Power BI。To use Power BI for historical analysis of PubNub data, you'll have to aggregate the raw PubNub stream and send it to Power BI. 实现此操作的方法之一是使用 Azure 流分析One way to do that is with Azure Stream Analytics.

在 Power BI 中使用实时流式处理的示例Example of using real time streaming in Power BI

以下是实时流式处理在 Power BI 中的工作原理的简单示例。Here's a quick example of how real time streaming in Power BI works. 你可以遵循此示例查看自己的实时流式处理的值。You can follow along with this sample to see for yourself the value of real time streaming.

在此示例中,我们使用 PubNub 中公开提供的流。In this sample, we use a publicly available stream from PubNub. 步骤如下:Here are the steps:

  1. 在“Power BI 服务”中选择仪表板(或创建新仪表板),然后选择“添加磁贴” > “自定义流式处理数据”,然后选择“下一步”按钮。In the Power BI service, select a dashboard (or create a new one) and select Add tile > Custom Streaming Data and then select the Next button.

  2. 如果没有流式处理数据源,请选择“管理数据”链接(位于“下一步”按钮上方),然后从窗口右上角中的链接中选择“+ 添加流式处理数据”。If you don't have and streaming data sources yet, select the manage data link (just above the Next button), then select + Add streaming data from the link in the upper-right of the window. 选择“PubNub”,然后选择“下一步”。Select PubNub and then select Next.
  3. 为数据集创建名称,然后将以下值粘贴到出现的窗口中,然后选择“下一步”:Create a name for your dataset, then paste in the following values into the window that appears, then select Next:

    订阅密钥:Subscribe key:

    sub-c-5f1b7c8e-fbee-11e3-aa40-02ee2ddab7fe
    

    通道:Channel:

    pubnub-sensor-network
    

  4. 在下面的窗口中,选择默认值(会自动填充),然后选择“创建”。In the following window, just select the defaults (which are automatically populated), then select Create.

  5. 返回 Power BI 工作区,新建仪表板,然后添加磁贴(如有需要,请参阅上述步骤)。Back in your Power BI workspace, create a new dashboard and then add a tile (see above for steps, if you need them). 这次在创建磁贴并选择“自定义流式处理数据”时,你将拥有可使用的流式处理数据集。This time when you create a tile and select Custom Streaming Data, you have a streaming data set to work with. 继续使用它。Go ahead and play around with it. 将“数字”字段添加到折线图中,然后添加其他磁贴,可以获得如下所示的实时仪表板:Adding the number fields to line charts, and then adding other tiles, you can get a real time dashboard that looks like the following:

请试尝试并使用示例数据集。Give it a try, and play around with the sample dataset. 然后创建你自己的数据集,并向 Power BI 流式传输活动数据。Then go create your own datasets, and stream live data to Power BI.

问题与解答Questions and answers

以下是关于 Power BI 中的实时流式处理的一些常见问题与解答。Here are some common questions about real-time streaming in Power BI, and answers.

我可以对推送数据集使用筛选器吗?Can I use filters on push dataset? 流式处理数据集呢?How about streaming dataset?

很遗憾,流式处理数据集不支持筛选。Unfortunately, streaming datasets do not support filtering. 对于推送数据集,你可以创建报表、筛选报表,然后将筛选的视觉对象固定到仪表板。For push datasets, you can create a report, filter the report, and then pin the filtered visuals to a dashboard. 然而,没有办法更改仪表板上视觉对象的筛选器。However, there is no way to change the filter on the visual once it's on the dashboard.

另外,你可以将活动报表磁贴固定到仪表板,在这种情况下,你可以更改筛选器。Separately, you can pin the live report tile to the dashboard, in which case you can change the filters. 但是,活动报表磁贴不会在数据推入时实时更新;你将需要使用“更多”菜单中的“刷新仪表板磁贴”选项手动更新视觉对象。However, live report tiles will not update in real-time as data is pushed in – you'll have to manually update the visual by using the refresh dashboard tiles option in the More menu.

当使用“日期/时间”字段以毫秒精度将筛选器应用到推送数据集时,不支持“等于”运算符。When applying filters to push datasets with DateTime fields with millisecond precision, equivalence operators are not supported. 但是,大于 (>) 或小于 (<) 等运算符可以正常运行。However, operators such as greater than (>) or less than (<) do operate properly.

如何查看推送数据集的最新值?How do I see the latest value on a push dataset? 流式处理数据集呢?How about streaming dataset?

流式处理数据集设计用于显示最新数据。Streaming datasets are designed for displaying the latest data. 你可以使用卡片图流式处理视觉对象,轻松查看最新的数值。You can use the Card streaming visual to easily see latest numeric values. 遗憾的是,该卡片图不支持日期时间或文本类型的数据。Unfortunately, the card does not support data of type DateTime or Text. 对于推送数据集,假设你在架构中有一个时间戳,则可以尝试使用最后一个 N 筛选器创建报表视觉对象。For push datasets, assuming you have a timestamp in the schema, you can try creating a report visual with the last N filter.

我可以连接到 Power BI Desktop 中的推送或流式处理数据集吗?Can I connect to push or streaming datasets in Power BI Desktop?

暂不提供此功能。Unfortunately, this is not available at this time.

鉴于上述问题,如何对实时数据集进行任何建模?Given the previous question, how can I do any modeling on real-time datasets?

由于数据不会永久存储,因此不能对流式处理数据集进行建模。Modeling is not possible on a streaming dataset, since the data is not stored permanently. 对于推送数据集,你可以使用更新数据集/表 REST API 添加度量值和关系。For a push dataset, you can use the update dataset/table REST APIs to add measures and relationships. 你可以从更新表架构文章数据集属性文章中获取更多信息。You can get more information from the Update Table Schema article, and the Dataset properties article.

如何清除推送数据集上的所有值?How can I clear all the values on a push dataset? 流式处理数据集呢?How about streaming dataset?

在推送数据集上,你可以使用删除行 REST API 调用。On a push dataset, you can use the delete rows REST API call. 另外,你还可以使用一个方便的工具,它是围绕 REST API 的包装器。Separately, you can also use this handy tool, which is a wrapper around the REST APIs. 目前没有办法从流式处理数据集中清除数据,但数据将在一个小时后自行清除。There is currently no way to clear data from a streaming dataset, though the data will clear itself after an hour.

我设置了到 Power BI 的 Azure 流分析输出,但没有看到它出现在 Power BI 中,这是怎么回事?I set up an Azure Stream Analytics output to Power BI, but I don’t see it appearing in Power BI – what’s wrong?

以下是你可以用于解决问题的清单:Here’s a checklist you can use to troubleshoot the issue:

  1. 重启 Azure 流分析作业(在流式处理 GA 版本之前创建的作业将需要重启)Restart the Azure Stream Analytics job (jobs created before the streaming GA release will require a restart)
  2. 尝试在 Azure 流分析中重新授权 Power BI 连接Try re-authorizing your Power BI connection in Azure Stream Analytics
  3. 你在 Azure 流分析输出中指定了哪个工作区?Which workspace did you specify in the Azure Stream Analytics output? 在 Power BI 服务中,你是否正在签入该(同一)工作区?In the Power BI service, are you checking in that (same) workspace?
  4. Azure 流分析查询是否显式输出到 Power BI 输出?Does the Azure Stream Analytics query explicitly output to the Power BI output? (使用 INTO 关键字)(using the INTO keyword)
  5. 是否有数据流流经 Azure 流分析作业?Does the Azure Stream Analytics job have data flowing through it? 只有在有数据传输时,才会创建数据集。The dataset will only get created when there is data being transmitted.
  6. 是否可以查看 Azure 流分析日志,以了解是否存在任何警告或错误?Can you look into the Azure Stream Analytics logs to see if there are any warnings or errors?

后续步骤Next steps

以下是在 Power BI 中使用实时流式处理时可能有用的几个链接:Here are a few links you might find useful when working with real-time streaming in Power BI: