1 Reply Latest reply on Apr 15, 2019 4:38 AM by John Messinger

    AFListData.UpdateValues

    ovenyg

      Hi,

       

      New to the PI system and AF but coming from the RDBMS world!

       

      We are currently investigating the feasability to rewrite an old SQL-based system (where times series data resides in Oracle), to a system where times series data will reside in PI (customer is moving to PI).

      Metadata and other data will reside in an RDBMS.

       

      Currently I'm testing to insert/update/delete values in bulk or one by one  AFListData.UpdateValues. I have figured out how to do that and it seems to work ok.

      Now, I just wonder if there is a way to define a transaction scope enclosing the AFListData.UpdateValues statements?

      The data will be uncompressed (mostly) lab values that must be possible to load in bulk but also be changeable from a user interface.

      I have looked at the IAFTransactable interface but I'm not sure that's the way to go.

      Is there any other way to preserve data integrity.

      And how does the AFBufferOption affect data integrity?

       

      Thanks!

        • Re: AFListData.UpdateValues
          John Messinger

          Hi Ove,

           

          Apologies that it has taken so long for someone to respond to your question.

           

          The IAFTransactable interface is probably not what you are looking for in the case you have described, as it is used for making changes to system objects that can be checked in and out (Elements, Templates etc) and provides the 'sandbox' functionality. Changes to actual time series are not transactable in this sense.

           

          When you mention preserving data integrity, can I assume that you are referring to data compression, ie you don't want compression to occur on these values? If this is the case, that is managed by configuring the appropriate point attributes on the receiving PI points (such as compdev and compressing). For lab data it's pretty standard to turn off compression for these tags, and is also common to turn the step attribute on to prevent data interpolation by clients. I would refer you to the documentation at PI Server Compression Testing for more information.

           

          Whether you use single or bulk AF SDK calls to write data to the PI Data Archive, the compression settings on the receiving PI points will control the data compression.

          Lastly, the AFBufferOption should have no impact here - this is more for data buffering when your client application is running on a client machine. Unless you need to rely on buffering for handling connectivity issues between your client and the server, or need to use N-way buffering to multiple servers then you can use the AFListData.UpdateValues overload without the AFBufferOption parameter.

           

          John

          2 of 2 people found this helpful