← Back to team overview

dhis2-devs team mailing list archive

Re: [Dhis2-users] Analytics history

 

Hi Alvin,

its a good point and something we have been thinking about for a while.
This is something that we definitely need to act on soon.

The challenge is to find a sensible level of detail for what to store, as
there are costs in terms of i) system complexity and ii) aggregation
performance degradation involved here. For example, if facilities are moved
around in administrative boundaries every month, how do you calculate the
yearly total for the whole province?

My suggestion, as a reasonable trade-off, would be to create snapshots of
the organisation unit hierarchy at the end of each year. These snapshots
are then used for analytics queries for past data. So for instance if you
query today for "last 12 months", it would use the current "live"
organisation unit hierarchy for months Jan-Sept 2013, then the "2012
snapshot" hierarchy for months Oct-Dec 2012.

On an implementation note, this will fit well the analytics solution where
data is partitioned across years - each data partition will have a
corresponding org unit hierarchy, making aggregation simple.

Lars

Follow ups

References