Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Insight

Processing Event data from an Event Hub/IoT Hub data source

Processing Event data from an Event Hub/IoT Hub data source

  • Last UpdatedJul 24, 2022
  • 3 minute read

To process events data from an Azure Event Hub or IoT Hub data source and link imported data to the appropriate data type, messages from the data source must contain the key "IsEvent":"True". Additionally, Insight requires a JSON mapping file to be configured and uploaded via the properties dialog of the data source. Steps to prepare and upload the mapping file are below:

Generating the Mapping File

During the creation or editing of an Azure Event Hub or IoT Hub data source, toggle the Events checkbox under Options. A file upload field will appear.

The Upload File field

Select from one of the following options:

  • Download Sample Mapping File - Appears only when creating a new data source. Select to download a mapping file template.

  • Download Mapping File - Appears only when editing an existing data source. Select to download the latest valid mapping file that was uploaded by the user and accepted by Insight

Configuring properties in the mapping file

The mapping file links event properties used in the data source to the corresponding properties in Insight. Some properties must be present in the mapping file to process events. These required properties are configured under the "requiredMapping" node of the JSON file.

For each property, provide the property equivalent from your data source in the "mappedProp" field.

Note: If your data source does not generate IDs for events, AVEVA Insight will generate one for each event upon import.

{

"docType": "EventMapping",

"version": "1.0",

"requiredMapping": {

"id": {

"type": "Guid",

"mappedProp": "eventId"

},

"type": {

"type": "string",

"mappedProp": "Quality"

},

"eventtime": {

"type": "datetimeoffset",

"mappedProp": "EventTime"

}

},

Configuring additional properties in the mapping file

If your data source uses additional properties, these can be configured under the "additionalMapping" node of the JSON file.

"additionalMapping": {

"comment": {

"type": "string",

"mappedProp": "ExternalPropComment"

},

"source_processvariable": {

"type": "string",

"mappedProp": "TagName"

},

"valuestring": {

"type": "string",

"mappedProp": "ExternalPropTagValue"

},

"source_area": {

"type": "string",

"mappedProp": "ExternalPropSource"

},

"priority": {

"type": "Int32",

"mappedProp": "Value"

},

"source_hierarchicalobject": {

"type": "string",

"mappedProp": "ExternalPropSourceHierarchicalObject"

}

}

}

Each additional property must have a valid data type. Insight will not accept uploads containing invalid data types and will display an error if you attempt to upload such a file.

Uploading a mapping file

Once configured, upload your mapping file via the file upload field

The file upload field

A message indicating a successful upload will be displayed when the upload is completed. Note that event data is not processed in real-time and it may take several minutes before the event data appears in Insight.

Editing a mapping file after upload

To make changes to your mapping file after uploading to Insight, edit the data source by navigating to the Data Sources administration page, selecting next to the data source, and then selecting Edit Properties. Under the file upload field, select Download Mapping File to save the file to your local machine.

Once changes are completed and saved, re-upload the file.

TitleResults for “How to create a CRG?”Also Available in