1.47 Generating resource and analytics tables

DHIS2 features a set of generated database tables which are used as basis for various system functionality. These tables can be executed immediately or scheduled to be executed at regular intervals through the user interface. They can also be generated through the Web API as explained in this section. This task is typically one for a system administrator and not consuming clients.

The resource tables are used internally by the DHIS2 application for various analysis functions. These tables are also valuable for users writing advanced SQL reports. They can be generated with a POST or PUT request to the following URL:


The analytics tables are optimized for data aggregation and used currently in DHIS2 for the pivot table module. The analytics tables can be generated with a POST or PUT request to:

Analytics tables optional query parameters
Query parameter Options Description
skipResourceTables false | true Skip generation of resource tables
skipAggregate false | true Skip generation of aggregate data and completeness data
skipEvents false | true Skip generation of event data
skipEnrollment false | true Skip generation of enrollment data
lastYears integer Number of last years of data to include

“Data Quality” and “Data Surveillance” can be run through the monitoring task, triggered with the following endpoint:


This task will analyse your validation rules, find any violations and persist them as validation results.

These requests will return immediately and initiate a server-side process.