Most Azure users deploy Azure Data Explorer (ADX) for storing and analyzing OPC UA PubSub telemetry data sent from industrial sites via a cloud broker. For the last several years, customers have also added OPC UA PubSub metadata to ADX as documented here (https://www.linkedin.com/pulse/using-azure-data-explorer-opc-ua-erich-barnstedt).
However, many customers are unaware that they can store entire OPC UA Information Models in ADX, imported from the UA Cloud Library (https://uacloudlibrary.opcfoundation.org).
This has several advantages:
To get started with importing OPC UA Information Models into ADX, you first need an instance of ADX in your Azure subscription as well as a login to the UA Cloud Library, hosted by the OPC Foundation. You can get registered for accessing the UA Cloud Library for free from here: https://uacloudlibrary.opcfoundation.org/Identity/Account/Register
Once you have registered, you can browse the OPC UA Information Models you are interested in via the built-in browser accessible from here: https://uacloudlibrary.opcfoundation.org/Explorer
To get the unique ID of the OPC UA Information Models you are interested in, you can simply execute the “namespaces” REST API from here: https://uacloudlibrary.opcfoundation.org/infomodel/namespaces. For example, the “Robotics” Information Model has the unique ID 4172981173.
Configure an Azure Data Explorer callout policy for the UA Cloud Library by running the following query on your ADX cluster (make sure you are an ADX cluster administrator, configurable under Permissions in the ADX tab in the Azure Portal):
.alter cluster policy callout @'[{"CalloutType": "webapi","CalloutUriRegex": "uacloudlibrary.opcfoundation.org","CanCall": true}]'
Then, from the Azure Portal UI of your ADX instance, simply run the following query to import the OPC UA Information Model into ADX:
let uri='https://uacloudlibrary.opcfoundation.org/infomodel/download/<insert information model identifier from cloud library here>';
let headers=dynamic({'accept':'text/plain'});
let options=dynamic({'Authorization':'Basic <insert your cloud library credentials hash here>'});
evaluate http_request(uri, headers, options)
| project title = tostring(ResponseBody.['title']), contributor = tostring(ResponseBody.contributor.name), nodeset = parse_xml(tostring(ResponseBody.nodeset.nodesetXml))
| mv-expand UAVariable=nodeset.UANodeSet.UAVariable
| project-away nodeset
| extend NodeId = UAVariable.['@NodeId'], DisplayName = tostring(UAVariable.DisplayName.['#text']), BrowseName = tostring(UAVariable.['@BrowseName']), DataType = tostring(UAVariable.['@DataType'])
| project-away UAVariable
| take 10000
You need to provide two things in the query above:
And voila! You have just imported an entire OPC UA Information Model into a temporary table in Azure Data Explorer which you can then use in your queries!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.