Hi all,
I am working on improving an element data table shown in LCA, by including the average trend data value (for custom time range), instead of current value, for trended columns.
So far, I was able to get the results in an ad hoc data source, but for 18 trended columns and ~100 rows, it takes ~1minute to get the data to the LCA.
Is there a way to request something like bulk parameters statistics in an ad hoc data source/automation script, as done by GetTrendStatisticsForParameter | DataMiner Docs, or any other idea that could make this work faster?
Hi Miguel, the intention is to have a single average value for a parameter, index pair for a selected time range.
Hi Alija,
Calculating an average value for a parameter over a custom timespan at runtime will not be performant. For this type of use cases you could use DataAggregator.
DataAggregator allows you to schedule the execution of GQI queries. For example, running a GQI a query once a day to calculate the average value of a parameter for the previous day and storing the result in a CSV file.
You could then create an adhoc data source that reads the CSV files and compute the required average based on the selected timespan in the LCA.
Hope it helps.
Thanks for sharing this, Miguel.
The main concern for me is indeed performance. I believe that database-level aggregations are already efficient enough, so additional in‑code aggregation wouldn’t be necessary if a database aggregation approach existed, similar to how GetTrendStatisticsForParameter appears to work.
In any case, besides GetTrendStatisticsForParameter, I would also need an implementation that supports fetching data for multiple parameters in a single call, avoiding multiple round trips. Since it seems I might be the only one needing this functionality, I’ll most likely proceed with the Data Aggregator solution you shared.
Hi Alija,
Please could you provide us more details about the use case?
Is the intention to display all average trend data in a table component?
Or do you plan to aggregate and calculate the average value from a specific time range?