Bulk removing DEs and Orgunits

Hello all.

I’m trying to bulk remove all existing Orgunits from my database and I found this CLI API https://github.com/baosystems/dish2 that allows to exactly do that. However, it hasn’t worked for me, perhaps due to my current system infrastructure. Is there another way to bulk remove metadata from the DHIS2 database?

I should note that I’m trying to accomplish this using the Docker version of the DHIS2 distribution (I realize it’s not official, but it’s extremely convenient). https://github.com/pgracio/dhis2-docker

Thank you.

Antonio.

Hi there,

Here is a sql function for deleting the whole or parts of your orgunit tree:

https://github.com/dhis2/dhis2-utils/blob/master/resources/sql/delete_orgunittree_with_data.sql

If you create this function, you can invoke it with

select delete_orgunittree_with_data(‘’);

Best regards,

Markus

···
  1. jul. 2017 kl. 15.41 skrev Jesus Solano-Roman asolano@broadinstitute.org:

Hello all.

I’m trying to bulk remove all existing Orgunits from my database and I found this CLI API https://github.com/baosystems/dish2 that allows to exactly do that. However, it hasn’t worked for me, perhaps due to my current system infrastructure. Is there another way to bulk remove metadata from the DHIS2 database?

I should note that I’m trying to accomplish this using the Docker version of the DHIS2 distribution (I realize it’s not official, but it’s extremely convenient). https://github.com/pgracio/dhis2-docker

Thank you.

Antonio.


Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help : https://help.launchpad.net/ListHelp

Thanks Markus, this will be helpful.

Best regards,

Antonio.

···

On Wed, Jul 12, 2017 at 2:16 AM, Markus Bekken markus@dhis2.org wrote:

Hi there,

Here is a sql function for deleting the whole or parts of your orgunit tree:

https://github.com/dhis2/dhis2-utils/blob/master/resources/sql/delete_orgunittree_with_data.sql

If you create this function, you can invoke it with

select delete_orgunittree_with_data(‘’);

Best regards,

Markus

  1. jul. 2017 kl. 15.41 skrev Jesus Solano-Roman asolano@broadinstitute.org:

Hello all.

I’m trying to bulk remove all existing Orgunits from my database and I found this CLI API https://github.com/baosystems/dish2 that allows to exactly do that. However, it hasn’t worked for me, perhaps due to my current system infrastructure. Is there another way to bulk remove metadata from the DHIS2 database?

I should note that I’m trying to accomplish this using the Docker version of the DHIS2 distribution (I realize it’s not official, but it’s extremely convenient). https://github.com/pgracio/dhis2-docker

Thank you.

Antonio.


Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help : https://help.launchpad.net/ListHelp