Solutions
...
Litmus Production Record Datab...
Interacting with Litmus Produc...
Adding or Modifying a Data Model Item
7min
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 litmus does provide such as custom solution which can be downloaded from our central portal method execute stored procedure prorec prorec processconfiguration 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 variable name datatype description example @node varchar(50) the name of the root node and the name of the data model mandatory! can not be null or empty downtime @nodedesc varchar(256) an optional short description of the model can be used to share some information about the model with other users, can be set to null downtime recording for all assets @level1 varchar(50) the name of the first sub level in the isa 88 based data model hierarchy this is optional and can be set to null if the item is located under the @node main classification @level1desc varchar(256) an optional short description of level1 can be used to share some information about the purpose of set sub level, can be set to null 'holds information about the main classification of a downtime' @level2 varchar(50) the name of the second sub level in the isa 88 based data model hierarchy this is optional and can be set to null if the item is located under the @level1 sub classification @level2desc varchar(256) an optional short description of level2 can be used to share some information about the purpose of set sub level, can be set to null holds information about the sub classification of a downtime @level3 varchar(50) the name of the third sub level in the isa 88 based data model hierarchy this is optional and can be set to null if the item is located under the @level2 null @level3desc varchar(256) an optional short description of level3 can be used to share some information about the purpose of set sub level, can be set to null null @level4 varchar(50) the name of the fourth sub level in the isa 88 based data model hierarchy this is optional and can be set to null if the item is located under the @level3 null @level4desc varchar(256) varchar(256) an optional short description of level4 can be used to share some information about the purpose of set sub level, can be set to null null @level5 varchar(50) the name of the fifth sub level in the isa 88 based data model hierarchy this is optional and can be set to null if the item is located under the @level4 null @level5desc varchar(256) varchar(256) an optional short description of level5 can be used to share some information about the purpose of set sub level, can be set to null null @item varchar(50) the name of the item which represents the value mandatory! can not be null or empty faultcode @itemdesc varchar(256) an optional short description of the item can be used to share some information about the items purpose with other users, can be set to null the fault code returned by the asset @itemeng varchar(20) an optional engineering unit for items this can be used to provide some additional context for the value recorded null @istime bit is the value type of the item a time stamp? mandatory! can not be null or empty an item can only have one data type therefore only one of these 4 values can be 1, while the others are 0 @istime @isnumeric @isstring @isboolean 0 @isnumeric bit is the value type of the item a numeric value? this includes both integer and float values mandatory! can not be null or empty an item can only have one data type therefore only one of these 4 values can be 1, while the others are 0 @istime @isnumeric @isstring @isboolean 1 @isstring bit is the value type of the item a alphanumeric string? mandatory! can not be null or empty an item can only have one data type therefore only one of these 4 values can be 1, while the others are 0 @istime @isnumeric @isstring @isboolean 0 @isboolean bit is the value type of the item a boolean value? this includes combinations of true/false 1/0 mandatory! can not be null or empty an item can only have one data type therefore only one of these 4 values can be 1, while the others are 0 @istime @isnumeric @isstring @isboolean 0 @isid bit is this item an identifier? mandatory! can not be null or empty possible values 1 = yes 0 = no to learn more about identifiers, please read this document 0 how to use to insert a data model item, 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] @node = n' downtime ', @nodedesc = n'downtime recording for all assets ', @level1 = n'main classification', @level1desc = n'holds information about the main classification of a downtime', @level2 = n'sub classification', @level2desc = n'holds information about the sub classification of a downtime', @level3 = null, @level3desc = null, @level4 = null, @level4desc = null, @level5 = null, @level5desc = null, @item = n'faultcode', @itemdesc = n'the fault code returned by the asset', @itemeng = null, @istime = 0, @isnumeric = 1, @isstring = 0, @isboolean = 0, @isid = 0; 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