← Back to team overview

dhis2-users team mailing list archive

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

 

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
> Develop aggregate query builder
> enter one patient data for 2014 June 
> Manual aggregate data - ( success and show data in database )
> Try to generate Resource table - fail and give erro massage at 2014-06-09 00:47:49 as follow
> 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 7
> OS 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