2 Replies Latest reply on Jun 8, 2016 12:53 PM by pthivierge

    PI OLEDB Event Frame Attributes - DeltaV


      I am trying to write a query to retrieve the value of the recipe name and the product name which are stored as attributes attached to the procedure level event frame by the DeltaV batch interface.  I am able to join the event frame attributes and can pull back the appropriate rows for recipe name and product name, but I do not see where the values are stored.  I thought it might be valueType, as that is a large string field, but all I see is the string "string", in that field.  All of the other string fields seem to be either blank or have some kind of UNC path in it.  There does not seem to be any archive join information here either. 


      What am I missing?  The source automation system is DeltaV.





        • Re: PI OLEDB Event Frame Attributes - DeltaV

          Understanding that within your event frame, your data is usually presented as desired, you can simply access it via the Data.EventFrameSnapshot table. here is a gross example:


          SELECT efa.Name, efs.Value

          FROM [YourAFDatabase].EventFrame.EventFrameTemplate eft

          INNER JOIN [YourAFDatabase].EventFrame.EventFrameHierarchy efh ON efh.EventFrameTemplateID =eft.id

          INNER JOIN [YourAFDatabase].EventFrame.EventFrameReferencedElement efre ON efre.EventFrameID = efh.ID

          INNER JOIN [YourAFDatabase].EventFrame.EventFrameAttribute efa ON efa.EventFrameID = efh.ID

          INNER JOIN [YourAFDatabase].Data.EventFrameSnapshot efs ON efs.EventFrameAttributeID = efa.ID

          WHERE efa.Name='Recipe Name Attribute' or efa.Name='Product Name Attribute'



          1 of 1 people found this helpful
          • Re: PI OLEDB Event Frame Attributes - DeltaV

            Hello Tom,


            Did Alexandre comment helped you?


            As an alternative, if your event frame creation is based on a template ( recommended) , you may want to create a transpose function that will expose all the Event Frame template attribute as collumns.  And this will avoid having to create all those joins.


            You may look into the documentation to see how transpose function works, manual is available here: