Selectable Write Mode for Analyses
As an analysis user I would like to define what should happen if multiple triggers occur with the same timestamp.
Currently AF analysis are using "Replace" mode when writing to the archive (meaning if multiple triggers have the same timestamp, the last one will overwrite all previous ones). AF SDK supports using "Insert" mode (which allows for multiple values having the same timestamp). I would like to have an option to select the write mode for each analysis.
Steve, will it be possible to replace events instead of append? We are working with future data and we would like to replace events in the analysis.
Keith Pierce commented
i want to add a clarification to this. As noted previously, the default is "append" and not "replace". In case there's a difference from archive and future files, this should apply especially to future tag streams. It's very common to get multiple forecasts for the same measurement. For example, if we have a future tag for temperature forecast, we often get updates to this forecast frequently. But the value is often in the calculation (analysis) that uses the weather (or other) forecast for a more important business need, like power demand, or power generation forecast. We often see a 7 day window of 15 minute temperature forecasts that are updated daily (after the model runs). This means any given 15 minute period will get many updates. The analysis that runs to create the power demand or power generation forecast will be run many times. We only really want to persist the most recent one (in most cases). Currently, each analysis result is persisted so that when you trend it, there's a vertical trend representing the variability in the forecasts, not the last one. There does not appear to be a simple way to address this now. Thanks.
If there are multiple (input) triggers at the same time stamp for a given analysis, PI Analysis Service only acts on the first trigger. That is the first shortcoming that needs to be changed first. This is on our backlog, we just need to prioritize it with respect to all the other backlog items.
Arie van Boven commented
Just like Jason wrote; Analysis doesn't replace, but appends. And I would like to have the replace option added.
Jason Johl commented
To clarify, AF analyses actually use "Append" for real-time updates. The request is still valid though and would be super useful!