Solutions
...
Interacting with Litmus Produc...
Reading Production Record Event Data with Local timestamp
8 min
use cases returning event data recorded by litmus production record database through the use of these select statements can be used for example by any visualization platform which allows to integrate with mssql like; grafana powerbi tableau further can these queries be used by any other application which allows for an odbc connection such as excel c# net python r they can also be part of a larger stored procedure developed by users with t sql method run s elect query with function prorec prorec getprorecdatalocaltime as from clause input variables 166,114,239,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 false unhandled content type false unhandled content type false unhandled content type false unhandled content type 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 false unhandled content type unhandled content type unhandled content type 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 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 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 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 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 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 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 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 false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type how to use to query production record event data, execute a select statement from the function prorec prorec getprorecdatautc providing all the required inputs below is an example using t sql in sql server management studio select from \[le productionrecord] \[dbo] \[prorec prorec getprorecdatalocaltime] ( default ,'asset \ l2 machine1 1 mb ,start time 1678295211950' ,default ,default ,default ,default ,default ,default ,default ,default ,default ,default ,default ,default ,default ,default ,default ,default ,default ,default ,default ,1) order by prorecid desc; result the function returns a table as result additional options it is possible to reduce the number of columns returned by the select statement below is an example using t sql in sql server management studio select itemname, itemvalue, recordtime from \[le productionrecord] \[dbo] \[prorec prorec getprorecdata localtime ] ( default ,'asset \ l2 machine1 1 mb ,start time 1678295211950' ,default ,default ,default ,default ,default ,default ,default ,default ,default ,default ,default ,default ,default ,default ,default ,default ,default ,default ,default ,1); this will reduce the number of columns returned to only the three selected it is possible to sort data based on users requirements returned by the select statement below is an example using t sql in sql server management studio select itemname, itemvalue, recordtime from \[le productionrecord] \[dbo] \[prorec prorec getprorecdatalocaltime] ( default ,'asset \ l2 machine1 1 mb ,start time 1678295211950' ,default ,default ,default ,default ,default ,default ,default ,default ,default ,default ,default ,default ,default ,default ,default ,default ,default ,default ,default ,1) order by recordtime desc, itemname; the result will be a table, where all rows are first sorted by their recordtime in descending order and then by their itemname in ascending alphabetical order it is possible to filter data based on the value of a different specific item, which is not to be part of the result list in this example, we want the values of all part numbers when the value of the item asset is "machine1" select from \[dbo] \[prorec prorec getprorecdatalocaltime] ( default ,default ,'production' ,default ,default ,default ,default ,default ,'partno' ,default ,default ,default ,'2023 07 03t11 29 04z' ,'2023 07 10t11 29 04z' ,default ,default ,n'production,asset,asset\ machine1' ,default ,default ,default ,default ,1) the result will be a table, with the filtered data