Skip to main content
InSource Solutions

TN - 1274 Leveraging Metadata in InSight

Description

 

This article from InSource shows how to add additional metadata (other than tagging content when you save it) in InSight.  This can be useful when you want to have additional information stored about an asset

  • Author: Lewis Talley
  • Published: 06/30/2022
  • Applies to: Historian & Cloud InSight 2020 +

Details

This process needs to be done from SSMS via stored proceedure calls in the Runtime database.

Let's assume you wanted to associate a vendor and model of a pump to make them searchable in InSight by those elements:

From the Runtime DB via SSMS

This first block will add the properties

declare @KeyOut int

declare @String int

set @String = (select top 1 AttributeTypeValue from AttributeType where AttributeTypeName='Unicode string')

exec aaAddTagExtendedPropertyName 'Vendor', @String, 0, 1, 1, @keyOut output

exec aaAddTagExtendedPropertyName 'Model', @String, 0, 1, 1, @keyOut

 

exec aaAddTagExtendedProperty 'Pump1.Temp.PV', 'Vendor', 'Suma'

exec aaAddTagExtendedProperty 'Pump1.Temp.PV', 'Model', 'Optimix 3G'

clipboard_ec49b8f490963ab97de6b47e5d687d0f4.png

The above calls with set the vendor information for those tags.  You can also add additional metadata you may find useful.  Location can be added by setting the latitude and longitude, and since InSight is location aware, simply selecting this asset will auto populate a map showing the temperature data.

clipboard_e2f8006c2ca3b7fcda1ff768296f2f6ff.png