Solutions
...
Litmus Production Record Datab...
Interacting with Litmus Produc...
Inserting Production Record Item if not using Litmus Edge Integration via JSON
6 min
note this feature requires litmus production record database v 1 4 0 0 or higher use cases litmus production record database allows for several ways to insert data into its tables the recommended way when using litmus edge, is to make use of the mssql integrations to insert data directly into the table prorec misc transactions as it allows to make use of the integrated store and forward capability, preventing data loss on a connection interruption but for cases, where this is not an option, a stored procedure can be called by a program or code snippet to insert data data any application which provided the capability to use an odbc connection can be used like python c# net excel go java method execute stored procedure prorec misc writeintotransactiontables using a json object as input input variables 112,143,160,219,133,114 false true false unhandled content type unhandled content type unhandled content type unhandled content type false unhandled content type unhandled content type unhandled content type unhandled content type how to use to insert a value(s) for production record item(s) via json, call the stored procedure prorec misc writeintotransactiontables using the t sql exec or execute keyword and provide the input variable below is an example using t sql in sql server management studio exec \[le productionrecord] \[dbo] \[prorec misc writeintotransactiontables] @jsoninput = n' \[{"deviceid" "energymonitoringdevice dtdl","registerid" "dt instance,asset","tagname" "asset","datatype" "edm l3 machine1,123","value" "123","success"\ true},{"deviceid" "energymonitoringdevice dtdl","registerid" "dt instance,asset","tagname" "dt instance","datatype" "edm l3 machine1,123","value" "edm l3 machine1","success"\ true},,{"deviceid" "energymonitoringdevice dtdl,telemetry,power","registerid" "dt instance,asset","tagname" "value","datatype" "edm l3 machine1,123","value" "52 524841352846764","success"\ false},{"deviceid" "energymonitoringdevice dtdl,telemetry,power","registerid" "dt instance,asset","tagname" "timestamp","datatype" "edm l3 machine1,123","value" "1694688519848","success"\ false}] '; result the stored procedure will verify that the provided values are correctly formatted and then write them into the table prorec prorec transactions this will trigger their immediate processing the result can be read back from the log table prorec prorec 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 prorec log] order by logid desc; with the result returned for more detailed logging, enable the "debug log" option for verbose logging as described in reading out the application configuration of litmus production record database docid\ evlxiglsvxjkjcqsgf2pp and modify application configuration items docid\ nizz5qavwknlczz51008q