← Back to team overview

dhis2-users team mailing list archive

Re: [Dhis2-devs] Resource table Erro after Manual Aggregation

 

Hi Adebusoye,

that sounds quite likely.

Tran can you please check that the aggregation queries produce valid
periods (start / end dates are in sync with the period type) ?



On Mon, Jun 16, 2014 at 5:00 PM, Adebusoye Anifalaje <busoye@xxxxxxxx>
wrote:

> Hi Sumudu,
>
> To get past this quickly, you need to check your period table and filter
> by Periodtypeid 3. Have a look at all any start date that does not begin on
> the 1st. Delete this from the table. Clear system cache and run analytics
> again. This should work.
>
> The Devs have to think of a more long-term solution though.
>
> Cheers.
>
> Busoye
>
>
> On 16 Jun 2014, at 15:39, Lars Helge Øverland <larshelge@xxxxxxxxx> wrote:
>
> Hi Sumudu,
>
> my guess is that someone has done manual inserts of periods in the period
> table, and that you have a mismatch between the period (start / end date)
> and the period type. E.g. you have periods which are days but has the
> monthly period type. Please investigate this. This SQL will give you the
> overview:
>
> select * from period p join periodtype pt on
> p.periodtypeid=pt.periodtypeid;
>
> This sql will set daily period type on day periods:
>
> update period set periodtypeid=1 where startdate=enddate;
>
>
> regards,
>
> Lars
>
>
>
>
>
>
>
>
>
>
>
>
> On Mon, Jun 9, 2014 at 4:30 AM, sumudu weerasinghe <sumuduw00@xxxxxxxxx>
> wrote:
>
>>  Dear all,
>> I have customized dhis2 for mental health requirement.
>> After data element ,org unit, attribute creation Resources table
>> generation work well and resource table generated at 2014-06-09 00:43:02
>> Then follow these steps to aggregate data  from tracke
>>
>>    1. Develop aggregate query builder
>>    2. enter one patient data for 2014 June
>>    3. Manual aggregate data - ( success and show data in database )
>>    4. Try to generate Resource table - fail and give erro massage at 2014-06-09
>>    00:47:49 as follow
>>    5. I try this in demo site but it is not authorize to generate
>>    resource table
>>
>> Process failed: PreparedStatementCallback; SQL [insert into
>> _periodstructure values (?,?,?,?,?,?,?,?,?,?,?,?,?,?)]; Duplicate entry
>> '201406' for key 'in_periodstructure_iso'; nested exception is
>> java.sql.BatchUpdateException: Duplicate entry '201406' for key
>> 'in_periodstructure_iso'
>>
>> I will attach my log file and screen shot.
>> I am using
>>   dhis 2.15
>> Build revision: 15123 Database type: Mysql
>> OS name:Windows 7OS architecture:x86
>>
>> Can any one help to come out from this?
>>
>>
>> _______________________________________________
>> 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
>>
>>
> _______________________________________________
> 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