AnsweredAssumed Answered

RDBMS interface using both Tag Group strategy and Stored Procedure

Question asked by BSomers on Sep 30, 2019
Latest reply on Sep 30, 2019 by cramsey

Hi

 

RDBMS interface, using both Tag Group strategy and Stored Procedure. Is it possible to use Tag Group (with arbitrary position of fields, and multiple timestamps), in combination with a stored procedure?

 

I currently have the tags getting data using the tag group strategy and different timestamp for each value. That is working ok. Data I am retrieving:

PI_TIMESTAMP1, PIVALUE1, PI_STATUS1, PI_TIMESTAMP2, PI_VALUE2, PI_STATUS2, etc ....

 

However I have some specific t-sql that rdbms interface does not seem to like (ISNULL, etc) I would like to put in there, so wanted to use a stored procedure instead of query file to ensure no issues there. But this is where I do not quite understand the configuration required. The documentation (currently using pi rdbms 3.21.4) states that in order to use tag group, location 3 is set to positive number, and the query to be used is stored in InstrumentTag of each group member tag also. But in order to use stored procedure it says set location 3 to zero. Do I use a combination of both configurations, or can anyone point to the correct configuration needed for the master and group tags in order to call a stored procedure please while still maintaining tag group strategy?

 

Note: At the moment while testing I am only checking latest value, so not passing any parameters such as P1=TS etc.

 

Current Tag Configs using Tag Group:

TagInstrumentExDescLoc1Loc2Loc3Loc4
Tag1 (master tag)myquery.sql1111
Tag2myquery.sql1121
Tag3myquery.sql1131

 

Tag Configs using Tag Group and Stored Procedure??? :

TagInstrumentExDescLoc1Loc2Loc3Loc4
Tag1 (master tag)/SQL="{CALL MY_SP()};"1101
Tag2?11?1
Tag3?11?1

Outcomes