Solutions
...
Litmus Production Record Datab...
Interacting with Litmus Produc...
Adding or Modifying a Data Model Item(s) via JSON
7 min
note this requires litmus production record database v 1 4 0 0 or higher use cases litmus production record database makes use of data models based on isa 88 to store and publish event data to be able to store event data, such a data model has to be configured first user can do this either by using applications such as microsoft sql server management studio mssql cli this can also be used for building custom solutions based on applications which allow for an odbc connection such as excel c# net python method execute stored procedure prorec prorec processconfiguration using a json object as input note do learn more about the data model concept and how to define it, please read the document core concept behind recording production record data via data model docid\ ffsctesqgb9gj7wy5kymo input variables 128,141,170,219,133,114 false true false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type for a more detailed explanation of the content to be provided by each key, please read the document adding or modifying a data model item docid\ qyze9xsk0xr evob1iukx how to use to insert a data model item(s), call the stored procedure prorec prorec processconfiguration using the t sql exec or execute keyword and provide the input variables below is an example using t sql in sql server management studio execute \[le productionrecord] \[dbo] \[prorec prorec processconfiguration] @jsoninput= n' \[{"node" "energymonitoringdevice dtdl","item" "asset","istime"\ false,"isnumeric"\ false,"isstring"\ true,"isboolean"\ false,"isid"\ true},{"node" "energymonitoringdevice dtdl","item" "dt instance","istime"\ false,"isnumeric"\ false,"isstring"\ true,"isboolean"\ false,"isid"\ true},{"node" "energymonitoringdevice dtdl","level1" "metadata","level2" "meta\[0]","item" "tag","istime"\ false,"isnumeric"\ false,"isstring"\ true,"isboolean"\ false,"isid"\ false},{"node" "energymonitoringdevice dtdl","level1" "metadata","level2" "meta\[1]","item" "instance","istime"\ false,"isnumeric"\ false,"isstring"\ true,"isboolean"\ false,"isid"\ false},{"node" "energymonitoringdevice dtdl","level1" "metadata","level2" "meta\[1]","item" "model","istime"\ false,"isnumeric"\ false,"isstring"\ true,"isboolean"\ false,"isid"\ false},{"node" "energymonitoringdevice dtdl","level1" "metadata","level2" "rawmetadata","item" "line tag","istime"\ false,"isnumeric"\ false,"isstring"\ true,"isboolean"\ false,"isid"\ false},{"node" "energymonitoringdevice dtdl","level1" "metadata","level2" "rawmetadata","item" "name tag","istime"\ false,"isnumeric"\ false,"isstring"\ true,"isboolean"\ false,"isid"\ false},{"node" "energymonitoringdevice dtdl","level1" "metadata","level2" "rawmetadata","item" "plant","istime"\ false,"isnumeric"\ false,"isstring"\ true,"isboolean"\ false,"isid"\ false}] ' ; result the stored procedure will verify that the provided values are correctly formatted and then create any new node, levels and items or modify existing items the result can be read back from the log table prorec misc log below is an example using t sql in sql server management studio select top (100) \[logid] ,\[logtype] ,\[logprocedure] ,\[logentry] ,\[logtime] from \[le productionrecord] \[dbo] \[prorec misc log] where \[logprocedure] = 'prorec prorec processconfiguration' order by logid desc; with the result returned