Data not showing in Data Visualizer

For some weird reason, data I’ve entered into my tracker application is not showing up in the Data Visualizer. I’ve done the following and the issue persists (DHIS2 V2.39.2):

  1. Performed maintenance
  2. Run Analytics
  3. Cleared cache
  4. Ensured that access to the program is given to the user and right organisation unit.

I ended up trying an upgraded dhis2 version (v2.40.1) and nothing still works:

Server is deployed to AWS (Ubuntu 20.04.6 LTS), dhis2-tools-ng.
Here’s what I find in the logs:

 INFO  2023-08-04T23:00:14,893 Query failed, likely because the requested analytics table does not exist ( [tomcat-http-9])
org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [select count(pi) as value,'202308' as Monthly from analytics_enrollment_n300hlleuyw as ax where (enrollmentdate >= cast( '2023-08-01' as date ) and enrollmentdate < cast( '2023-09-01' as date ))and (ax."uidlevel1" = 'EHm944jZGKz' ) limit 100001]; nested exception is org.postgresql.util.PSQLException: ERROR: relation "analytics_enrollment_n300hlleuyw" does not exist
  Position: 52
	at ~[spring-jdbc-5.3.25.jar:5.3.25]

How can I have this resolved? I’ll appreciate any ideas or support. Thanks! @Gerald_Thomas @Gassim

Hi Clement,
Firstly, I noticed that `analytics_enrollment_n300hlleuyw" does not exist in your tables. To fix this issue, you need to ensure that the table “analytics_enrollment_n300hlleuyw” actually exists in the PostgreSQL database and that your application is connecting to the correct database instance.

Hi @Gerald_Thomas,
Its connected to the right database. I just found that “analytics_enrollment_n300hlleuyw” does not exit. Do I need to create this manually? with what columns?

Thank you for the assistance.

This situation is perplexing because if the mentioned table was included in the backup database, the process of running analytics should have automatically generated the required table. Could you kindly provide the log records from when you executed the analytics process? This information could help shed light on what might be causing the issue.

1 Like

@Gerald_Thomas Okay sure,
Please find the attached log file from the analytics table:

dhis-analytics-table.docx (56.3 KB)

Doing a grep of the errors shows this:

This is a fresh instance, and was not installed from a backup. Is it weird?