AnsweredAssumed Answered

Backfilling with AF Analyses and PI to PI Interfaces

Question asked by zburke on Aug 6, 2018
Latest reply on Aug 7, 2018 by Dan Fishman

Hi all! I'm working with several PI Systems scattered across different sites. The intent is to send calculated KPI's from each of these sites to a "central" PI System that will allow for high-level comparisons between them. However, there seems to be a catch here, and I'm wondering if a best practice exists for a case like this or if anyone else has run into anything similar. Under a "steady state" condition, the system works great. The KPI's are calculated at each of the sites using AF Analyses and this data is pushed up to the central Data Archive via PI to PI Interfaces. There is a problem, however, when a change is needed for any of these analyses at the site level. We have management of change procedures that have shown to be effective for ensuring that the analysis each site uses to calculate a KPI closely matches all the others. The problem arises when we change one of these analyses and then backfill it. The PI to PI interface only sends new data through, so the central Data Archive has no way of knowing that such a recalculation was performed and we then have two records of the same data that don't match up.


We really have two point sources for each PI to PI interface. One is for sending only new data, and the other is used for backfilling. So far, the best strategy I've found is to - upon backfilling in AF - temporarily change the point source for the point in the central Data Archive to the backfilling interface. But this has shown to be susceptible to human error. Either we forget to backfill or we accidentally leave the point source as the backfilling interface. I'm also worried about what ends up happening to data that was sent over by the old analysis. Recent versions of AF Analyses can wipe out all old values and recalculate an analysis from the beginning. But to my knowledge, if a PI to PI Interface is set to use history recovery and replace existing data, it will only do so if their timestamps match up. Is this true? Otherwise, we don't want to have two versions of the truth superimposed on each other in the same tag.


At this point, I'm leaning towards using PowerShell scripts and AFSDK to regularly audit data at each of the sites and at the central Data Archive to check if there is a mismatch. If there is, I'll have the script perform its own version of a backfill operation by deleting the old values in the central location and replacing them with the new data. But I feel like this is something someone else has likely run into before. Is there a better option on the table I'm missing? Is my understanding of PI to PI Interfaces' behavior off? Is this a task that's better suited for a PI System Connector? Interested in hearing what anyone else thinks!