Add metadata to tags via the Collector or the Historian
Fields (Collector)
Fields are metadata key/value pairs applied to all tags in this subscription. You can add fields by pausing the desired collector logging session and editing the JSON object "Fields". Defining these key/value pairs will add Fields
to tags in the dataset, allowing metadata to be extracted directly from your source systems where available. Fields
are useful to classify, group, and filter tags based on attributes like enterprise, site, area, machine or device associated to the tag.
Static Fields
Fields can be defined a static text:
"Fields": {
"Enterprise": "ACME",
"Site": "Austin",
"Area": "Packaging"
}
Topic Fields
Together with the TopicDefinition
configuration above, fields can be defined to extract values from the topic structure:
"Fields": {
"Enterprise": "[Topic:enterprise]",
"Site": "[Topic:site]",
"Area": "[Topic:area]",
"Machine": "[Topic:Machine]"
}
Payload Fields
Fields can be defined to extract values from the payload:
"Fields": {
"Device": "[Payload:topic.deviceId]"
}
Combinations of field definition types can be used to create valuable tag metadata:
"Fields": {
"Id": "Id-[Topic:area][Topic:machine][Payload:topic.deviceId]"
}
Fields (Historian)
You can also add Fields or metadata from the historian browser page by selecting the name of the datasets, selecting the desired tags, and then either the pencil icon or the blue Edit _ tags button. Don't forget to save your changes.