Power BI Integration
How to integrate Microsoft Power BI with Connectware, including creating a streaming semantic model, pushing live shop floor data to the REST API, and building a real-time dashboard.
This guide describes how to integrate Microsoft Power BI with Connectware. You configure a service commissioning file that pushes live shop floor data into a Power BI streaming semantic model, so dashboard tiles update within seconds of a machine publishing a value. A complete example file is available at the end of this guide.
Objectives
Creating a streaming semantic model in the Power BI service.
Establishing a connection between Connectware and the Power BI REST API.
Pushing shop floor data from MQTT topics into the streaming semantic model.
Visualizing the live data on a Power BI dashboard.
Prerequisites
To follow this guide, you will need the following:
A running instance of Cybus Connectware.
A Power BI account with permission to create dashboards and semantic models in a workspace of the Power BI service. Power BI Desktop is not required.
Access to the Admin UI with sufficient user permissions.
Basic knowledge of MQTT and the Connectware services concept (for example, service commissioning files, connections, and endpoints).
Connectware and Power BI Integration
Power BI accepts real-time data through streaming semantic models, formerly known as streaming datasets. When you create a streaming semantic model in the Power BI service, Power BI generates a push URL on api.powerbi.com. The URL contains a resource key that authenticates the request, so no OAuth configuration is required. Connectware sends rows to this URL through the HTTP/REST connector, one POST request per MQTT message.
Retirement of Real-Time Streaming in Power BI
Microsoft is retiring real-time streaming in Power BI. You can create new streaming semantic models until October 31, 2027. Existing streaming semantic models continue to work after that date. For new projects, Microsoft recommends Real-Time Intelligence in Microsoft Fabric, where an Eventstream ingests the data instead. Eventstream custom endpoints accept data through the Kafka protocol, which you can address with the Connectware Kafka connector. For more information, see Real-time streaming in Power BI in the Microsoft documentation.
The MQTT topics in this guide follow an ISA-95-style equipment hierarchy (<enterprise>/<site>/<area>/<line>/<cell>). The mapping subscribes with wildcards across all levels, so any machine in the hierarchy is picked up without changing the integration.
Creating a Streaming Semantic Model in Power BI
You create the streaming semantic model in the Power BI service and define its row schema there. The field names and types must match the data that Connectware sends later.
In the Power BI service, open an existing dashboard or create a new one.
Select Edit > Add a tile.
Select Custom Streaming Data and select Next.
Select Add streaming semantic model.
Select API and select Next.
Enter a name for the semantic model and define the values from the stream. This guide uses the fields
timestamp(DateTime),line(Text), andtemperature(Number).Enable Historic data analysis if you want to build reports on the collected data. Without it, Power BI keeps the data only in a temporary cache for streaming tiles and discards it after about one hour.
Select Create.
Power BI now shows the push URL of the semantic model. It has the following form:
The resource key authorizes anyone to push data into the semantic model, without any further authentication. Treat the push URL like a credential.
Power BI Connection Properties
The connection to Power BI requires the parts of the push URL. We add them as parameters to the service commissioning file, so you can set them when you install the service.
Do not worry about copying the service commissioning file snippets together into one, the complete example file is available at the end of this guide.
tenantId: The first identifier in the push URL, after/beta/.datasetId: The identifier in the push URL, after/datasets/.pushKey: The resource key, the value of thekeyquery parameter. Copy it exactly as it appears in the push URL, it is already URL-encoded.topicRoot: The root of the MQTT topic hierarchy. Defaults toenterprise.
Power BI Connection
To connect to the Power BI REST API, we set up a Cybus::Connection resource that uses the HTTP/REST connector. The connection only defines the host, because the resource key in the endpoint path handles the authentication.
Pushing Shop Floor Data to Power BI
The rows endpoint of the streaming semantic model expects a POST request with a JSON array of rows as the body. Each row is an object whose property names match the fields that you defined in the schema.
We define a write endpoint for the rows path and a mapping that feeds it from the MQTT topic hierarchy. The HTTP/REST connector expects the request body in the body property of the message (see Publishing Data to REST Servers). The transform rule wraps the incoming payload into the rows array and adds the current time as the timestamp field, so machines can publish their data without knowing about these conventions.
Any message published to a matching topic, for example enterprise/hamburg/assembly/line-1/press-01/telemetry, now becomes one row in the semantic model. The property names in the payload must match the schema fields:
The transform rule turns this payload into the rows array that Power BI expects as the request body:
If your machines already publish a timestamp, remove the $merge call and use { "body": [ $ ] } instead. Power BI accepts DateTime values in ISO 8601 format.
Ingestion Limits
Power BI limits how fast you can push data. A streaming semantic model accepts up to five requests per second with up to 15 KB per request. With Historic data analysis enabled, the model is also a push semantic model, which accepts one request per second with up to 16 MB per request and up to one million rows per hour. A request that exceeds the streaming limit but stays within the push limit still stores the data, but streaming tiles temporarily fail. For details, see Real-time streaming in Power BI in the Microsoft documentation.
Connectware sends one request per MQTT message. If your machines publish faster than the limits allow, reduce the message rate before it reaches the endpoint, for example with Rule Engine rules that filter or aggregate the data.
Visualizing the Data in Power BI
To display the live data, add a streaming tile to a dashboard:
On the dashboard, select Edit > Add a tile.
Select Custom Streaming Data and select Next.
Select your streaming semantic model and select Next.
Choose a visualization type, for example a line chart with
timestampas the axis andtemperatureas the value.
If you enabled Historic data analysis, you can additionally build regular Power BI reports on the semantic model, with the full set of report features such as filtering and data alerts.
Verifying the Integration
Install the service and set the parameters to the values from your push URL.
Check that the connection is in the Connected state on the service details page in the Admin UI.
Publish a test message with the schema fields to
enterprise/hamburg/assembly/line-1/press-01/telemetry, for example with an MQTT client or the Admin UI.Check that the streaming tile on your dashboard updates within a few seconds.
The result of every HTTP request is published to the
/restopic of the endpoint. Use the Data Explorer to inspect it. If Power BI rejects a request, the message on the/restopic contains anerrorproperty with the HTTP status. A404 Not Foundstatus usually means that the dataset ID or the resource key is wrong, and a400 Bad Requeststatus usually means that the rows do not match the schema.
Service Commissioning File Example
Last updated
Was this helpful?

