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. 串流資料的裝置和來源可以是 Factory 感應器、社交媒體來源、服務使用計量,以及可從中收集或傳送即時資料的任何其他項目。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 建立資料集時,<預設模式> 旗標會指定資料集是推送還是或串流。When you create a dataset using Power BI REST APIs, the defaultMode flag specifies whether the dataset is push or streaming. 如果未設定 <預設模式> 旗標,資料集預設為推送資料集。If no defaultMode flag is set, the dataset defaults to a push dataset.

如果 <預設模式> 值設為 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 建立資料集的文章示範如何建立串流資料集,並動態顯示 <預設模式> 旗標。The REST API article for Create dataset demonstrates creating a streaming dataset, and shows the defaultMode flag in action.

注意

使用資料集並將 <預設模式> 旗標設為 pushStreaming 時,如果要求超過串流資料集 15 KB 的大小限制,但小於推送資料集 16 MB 的大小限制,要求將會成功,而且會在推送資料集中更新資料。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.

會使用 Azure AD OAuth 保護 REST API 的所有要求。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 來建立資料集,並將其 <預設模式> 設為 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,它授權要求者將資料推送到資料集,而不必使用 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

您可以新增 Power BI 作為 Azure 串流分析 (ASA) 內的輸出,然後即時在 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 的輸出資料流,並將 <預設模式> 設為 pushStreaming (請參閱本文稍早的章節,以取得 <預設模式> 的資訊),這會導致資料集可以利用推送串流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. 您也可以深入了解此 APIYou 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

透過 PubNub 串流與 Power BI 的整合,您可以使用低度延遲的 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 存取管理員 (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. 如果您還沒有串流資料來源,請選取 [管理資料] 連結 ([下一步] 按鈕的正上方),然後從視窗右上方的連結選取 [+ Add streaming data] (+ 新增串流資料)。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.

在使用毫秒有效位數來套用篩選,並推送含 DateTime 欄位的資料集時,不支援「等價」運算子。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: