2.37.2 Error on analytics run

I upgraded to 2.37.2, however I could not view any data on analytics reports. After running the analytics manually, it stops at the end without success with the following error.

Process failed: StatementCallback; SQL [ alter table analytics_event_ywhgjzui7r5 detach partition analytics_event_ywhgjzui7r5_1900; drop table analytics_event_ywhgjzui7r5_1900 cascade; alter table analytics_event_temp_ywhgjzui7r5_1900 rename to analytics_event_ywhgjzui7r5_1900; alter table analytics_event_ywhgjzui7r5 attach partition analytics_event_ywhgjzui7r5_1900 for values in (1900);]; ERROR: partition constraint of relation “analytics_event_ywhgjzui7r5_1900” is violated by some row; nested exception is org.postgresql.util.PSQLException: ERROR: partition constraint of relation “analytics_event_ywhgjzui7r5_1900” is violated by some row

I trust you followed the instructions in the docs:

If it’s be possible to reproduce this issue in a Sierra Leone DB (such as the one used in play.dhis2.org) or if you could send a copy of the DB you are using, it will be possible for one of the core team developers to investigate the issue causing this.

Please PM me if it’s possible, and I’d advice you to send the Catalina.out log (without including sensitive info)


Got sorted, i have historical data which did not have any dates and imported with the year 1900. Somehow on the 2.36 this error was not being picked when I run the analytics but coming up in 2.37. Temproray solution was to run analytics for last 5 years and ignore “All” option in the analytics. I will get back to check on what data quality issues are on the historical data imported as 1900 and hopefully will resolve my issue.

1 Like