Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This article describes how to connect Microsoft Fabric to the OPC UA reference solution.
Fabric is an end-to-end analytics platform for data ingestion, transformation, real-time processing, analytics, and reporting. To use Fabric with this reference solution, you need an Azure subscription, the main industrial IoT solution deployed, and Fabric enabled for your tenant. For more information, see the prerequisites in the Automated deployment section.
Architecture
The following diagram illustrates the OPC UA solution. It shows Fabric as an analytics back end.
Download a PowerPoint file of this architecture.
Automated deployment
The reference solution's deployment script can automatically deploy and configure Fabric as a third analytics option alongside Azure Data Explorer and Azure Databricks.
Prerequisites
- Verify Fabric capacity quota: The deployment provisions an F2 capacity. Confirm that the subscription has sufficient Fabric quota in the target region. If this is the subscription's first Fabric capacity or its quota is zero, register the
Microsoft.Fabricresource provider. For more information, see Microsoft Fabric capacity quotas. - Deploy the main solution first: Fabric uses the managed identity (
<resourcesName>-Identity), the Azure Event Hubs namespace, the Azure Container Apps environment, and thefabriccapacity created by the Azure Data Explorer deployment. Deploy this main solution first. (See Connect Azure Data Explorer to the reference solution.) Be sure to set thedeployFabricCapacityparameter totrueduring that deployment. - Enable Fabric for the tenant: Deploying the F2 capacity in Azure doesn't turn on Fabric for your tenant. If
fabric.microsoft.comswitches to Power BI, a Fabric admin needs to enable Fabric. An admin can enable Fabric in the Fabric portal:- Select Settings (the gear icon) > Admin portal > Tenant settings > Microsoft Fabric > Users can create Fabric items.
- Enable Users can create Fabric items.
- Enable the Fabric API setting: The Fabric setup script calls the Fabric REST APIs as the solution's user-assigned managed identity (
<resourcesName>-Identity). Therefore, a Fabric tenant admin needs to enable Service principals can use Fabric APIs (or Service principals can call Fabric public APIs) in Fabric admin portal > Tenant settings > Developer settings. - Enable the service-principal workspace creation setting: The setup script creates a Fabric workspace, which is gated by a developer setting that's disabled by default. In Fabric admin portal > Tenant settings > Developer settings, enable Service principals can create workspaces, connections, and deployment pipelines.
Select the Deploy to Azure button. On the Custom deployment page, select the same resource group that you used for the main deployment.
Important
A Fabric administrator can grant users access to the workspace. In the Fabric portal, go to Admin portal > Workspaces. Find <resourcesName>-Fabric, and use Access > Add admins, members or contributors to add users as Admin.
i3X API
The reference solution deploys an i3X API container app named <resourcesName>-i3x4kusto-fabric. The app exposes an eventhouse through the i3X REST API. You can get its URL from the Azure portal. You can access the Swagger endpoint by adding /swagger to the URL.
The i3X API is protected with HTTP Basic authentication. All requests, including those from the Swagger Authorize dialog or an i3X client, must include the credentials you provided during deployment:
- Username: the
adminUsernameyou specified - Password: the
adminPasswordyou specified
The health and capabilities endpoint (GET /v1/info) and the Swagger UI itself can be accessed without credentials. All data endpoints require the Basic authorization header. For example, use curl -u <adminUsername>:<adminPassword> https://<i3x-url>/v1/namespaces.
Use the sample dashboard
The reference solution includes a sample Fabric RTI dashboard that mirrors the use cases of the Azure Data Explorer dashboard: condition monitoring, OEE calculation, energy consumption, production, and diagnostics for the Munich and Seattle production lines. The dashboard is already imported and published against the deployed eventhouse. Just open it from Dashboards in your workspace.
The dashboard also includes a Unified NameSpace (UNS) / ISA-95 Graph tile that renders the Unified Namespace / ISA-95 asset hierarchy as an interactive node-link graph.
Important
This tile renders only after you enable the Python plugin on the eventhouse. Go to Eventhouse > Plugins and enable Python language extension. Enabling the plugin consumes additional compute and can increase costs. The required cached-data refresh can take up to one hour.
Run a query
Open your KQL database and select its opcua_queryset. Because the telemetry Subject is the numeric DataSetWriterId, the station and production line match on the metadata DataSetName (built from the OPC UA server's ApplicationUri and NodeId) and then join to the telemetry on Subject. Delete the sample queries, enter the following query in the text box, and then select Run.
let _startTime = ago(1h);
let _endTime = now();
opcua_metadata_lkv
| where DataSetName contains "assembly"
| where DataSetName contains "munich"
| join kind=inner (
opcua_telemetry
| where Name == "Status"
| where Timestamp > _startTime and Timestamp < _endTime
) on Subject
| extend status = toint(Value)
| project Timestamp1, status
| sort by Timestamp1 desc
| render linechart