Unable to export analytics tables in DHIS2 2.38.1 or 2.39.1

Hi, I am trying to export analytics tables in our DHIS2 implementation in Kilimanjaro. This is so I can start preparing some event reports. Unfortunately every attempt to export the tables results in an error.

I worked through the relevant Data Administration steps and attach a PDF containing the relevant Catalina logs and UI output. Everything seems fine until the analytics tables export. Specifically, the export process fails on creating the events analytics tables. The tail end of the (very large) generated error message says, 'ERROR: invalid input syntax for type bigint: β€œ2.6”; nested exception is
org.postgresql.util.PSQLException: ERROR: invalid input syntax for type bigint:
β€œ2.6” ’

I do not know where to look to try and localise this error. Any ideas?

Thanks!
Simon.

DHIS2 Catalina and UI logs.pdf (299.6 KB)

1 Like

Hi @swoodworth

Thank you for your patience! I triaged your post requesting more info about whether this is an actual bug or a configuration issue.

Thank you!

1 Like

Hi @Gassim,

Many thanks. It would be a relief to find this to be a configuration issue but I am at a loss to figure out what it may be!

Thanks.
Simon.

1 Like

Hi @swoodworth,

It seems like DHIS2 is trying to convert a decimal number β€œ2.6” to PostgreSQL bigint type. Probably this conversion is failing, as β€œ2.6” is not an integer.

Are you able to identify where this value β€œ2.6” is coming from? It’s probably a value comming from a Tracker Entiry Attribute. If not, a Data Element.

If you can identify it, try to change this number to an integer value, like β€œ2”, or β€œ3”, then try to run again the analytics export.

Thanks,
Maikel

2 Likes

Hi @maikel,

This is exactly the solution, thanks. Inspecting the SQL error output revealed which table update failed. Looking at the table description in PostGRES revealed that two columns were of tpye biging and were likely to be the source of the problem. A metadata dump from DHIS2 further allowed me to see which attributes or data elements were being identified. One of these contained decimal value and in fact its type was incorrectly set to zero or whole positive number. Changing the element type made the problem go away.

Thanks!
Simon.

1 Like

Sounds great @swoodworth! Glad to see you could fix the issue.

Thanks for your feedback.

Best regards,
Maikel

1 Like