← Back to team overview

dhis2-users team mailing list archive

Re: [Dhis2-devs] Tables for SQL queries -- indicators

 

Hi Tantley,
This is not really so straightforward with SQL as far as I know, as
indicators are calculated "on-the-fly" from the "analytics_***" tables.
They are never persisted in the database, so you would need a means to
parse the syntax of the indicator, and make the calculation from that. I
seem to recall that someone had done something a while back with
materializing indicators, so you might want to search through the email
archive of this list to see if you can find more information.

The easier way, by far however, would be the use the analytics API, and let
DHIS2 do the calculation for you.

Regards,
Jason


On Sun, Feb 5, 2017 at 9:34 AM, Raminosoa Rabemanantsoa, Tantely <
traminosoa@xxxxxxxxxx> wrote:

> Dear DHIS2 Users,
>
> I would like to run SQL to query indicators values through SQL View. On
> which tables should I query from if for the dataelements, the SQL queries
> are based on dataValues (dv) table?
>
> I am using DHIS2 2.24
>
> Thank you for your support!
>
> Kind Regards,
>
> Tantely.
>
> *This message and its attachments are confidential and solely for the
> intended recipients. If received in error, please delete them and notify
> the sender via reply e-mail immediately.*
> _______________________________________________
> 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
>
>


-- 
Jason P. Pickering
email: jason.p.pickering@xxxxxxxxx
tel:+46764147049

Follow ups

References