← Back to team overview

dhis2-devs team mailing list archive

Re: Puzzling problem with datamart

 

OK, so let me get this straight. Lets say I have a data element which
belongs to a weekly and to a monthly dataset. Some orgunits report it
weekly, others monthly. This is what is happening here in Zambia.

Which one wins? The weekly or the monthly?

It would seem that we would need to aggregate all of the data which was
reported with a weekly period, to weekly, and to monthly, and all of the
data which was reported monthly to monthly?

I will need to confirm whether or not this data element is part of another
dataset.

What happens if the data element is not part of a data set at all?

Regards,
Jason



On Sat, May 11, 2013 at 9:17 AM, Ola Hodne Titlestad <olati@xxxxxxxxxx>wrote:

> Just to clarify:
> You'll get many aggregated period types in the datamart of course, but
> only one period type per data element can be used when looking/searching
> for raw data values to put into aggregation calculations during datamart
> export.
>
> So your monthly data values might be ignored in the datamart export
> process if quarterly data values exist for the same data elements. And we
> use the dataset period type to know what data values to look for. At least
> that's how I've understood this.
>
> Lars, correct me if this is wrong.
>
> Ola
> ------
> On 11 May 2013 09:10, "Ola Hodne Titlestad" <olati@xxxxxxxxxx> wrote:
>
>> Hi Jason,
>>
>> Are these data elements (with missing monthly vslues in datamart) also
>> part of another dataset with e.g. quarterly collection frequency (period
>> type)?
>>
>> Only one period type per data element is supported in datamart and this
>> is derived from the dataset's period type. So if the data element is member
>> of two data sets with different period types you will only get one of these
>> period types in the datamart.
>>
>> Ola
>> ------
>> On 9 May 2013 18:02, "Jason Pickering" <jason.p.pickering@xxxxxxxxx>
>> wrote:
>>
>>> Hi devs,
>>> I am having some issues with some data elements not appearing in the
>>> data visualizer (and other modules which depend on datamart). Using the
>>> latest 2.11 file.
>>>
>>> I get expected results from the analytics pivot tables, but nothing for
>>> the "Past twelve months" as a relative period in the DV.
>>>
>>> Looked at the aggregateddata value table where this should appear, and
>>> see a some periods, but no monthly values (this is how the data is
>>> collected, by month).
>>>
>>> SELECT startdate from period where periodid in (SELECT DISTINCT periodid
>>> from aggregateddatavalue where dataelementid = 80);
>>>  startdate  |  enddate
>>> ------------+------------
>>>  2012-01-01 | 2012-12-31
>>>  2012-01-01 | 2012-03-31
>>>  2012-01-01 | 2012-06-30
>>>  2012-04-01 | 2012-06-30
>>>  2012-07-01 | 2012-09-30
>>>  2012-07-01 | 2012-12-31
>>>  2012-10-01 | 2012-12-31
>>>  2013-01-01 | 2013-06-30
>>>  2013-01-01 | 2013-03-31
>>>  2013-01-01 | 2013-12-31
>>> (10 rows)
>>>
>>> Looking at the data values table, just to be sure.
>>>
>>> SELECT startdate,enddate from period where periodid in (SELECT DISTINCT
>>> periodid from datavalue where dataelementid = 80) ORDER BY startdate DESC;
>>>
>>> startdate  |  enddate
>>> ------------+------------
>>>  2013-03-01 | 2013-03-31
>>>  2013-02-01 | 2013-02-28
>>>  2013-01-01 | 2013-01-31
>>>  2012-12-01 | 2012-12-31
>>>  2012-11-01 | 2012-11-30
>>>  2012-10-01 | 2012-10-31
>>>  2012-09-01 | 2012-09-30
>>>  2012-08-01 | 2012-08-31
>>>  2012-07-01 | 2012-07-31
>>>  2012-06-01 | 2012-06-30
>>>  2012-05-01 | 2012-05-31
>>>  2012-04-01 | 2012-04-30
>>>  2012-03-01 | 2012-03-31
>>>  2012-02-01 | 2012-02-29
>>>  2012-01-01 | 2012-01-31
>>>  2011-12-01 | 2011-12-31
>>>  2011-11-01 | 2011-11-30
>>> :
>>> So, the raw data appears to be there.
>>>
>>> I see no obvious errors in the logs. I did check the "Monthly" option
>>> for the data mart.
>>>
>>> I find this really strange. Any ideas what may be going on? For other
>>> data elements collected in the same form, I do get monthly values.
>>>
>>> Regards,
>>> Jason
>>>
>>>
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~dhis2-devs
>>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>

Follow ups

References