← Back to team overview

dhis2-devs team mailing list archive

Re: Bulk Deletion of Data

 

Just FYI, we have two blueprints related to this in 2.22, [1] is
implemented already and [2] will hopefully come (but we are still
discussing implementation details for that one)

[1]
https://blueprints.launchpad.net/dhis2/+spec/webapi-bulk-deletion-of-tracker-objects
[2] https://blueprints.launchpad.net/dhis2/+spec/soft-event-delete

--
Morten

On Tue, Oct 27, 2015 at 4:01 PM, Knut Staring <knutst@xxxxxxxxx> wrote:

> My interpretation was that they would like a flag on each datavalue to say
> whether it is still current - which I guess would require an extension of
> that table. However, we do have something akin to this, namely the audit
> functionality, which preserves the history of earlier (overwritten) values
> - perhaps that could be leveraged?
>
> Knut
>
> On Tue, Oct 27, 2015 at 5:50 AM, Jason Pickering <
> jason.p.pickering@xxxxxxxxx> wrote:
>
>> Hi Aaron,
>>
>> There is no "soft delete" function, if that is what you are after, but it
>> has been discussed.
>>
>> Although there is no direct way as Lars points out, if you know what you
>> wish to delete, it is still possible.  Namely, if you transmit a "" value
>> for the value which you wish to delete, it will be deleted. Thus, if you
>> wish to delete all values for a given dataset/OU/period, you can get all of
>> the values from the API, then set them all to "", and upload the data
>> again.  I think you can also use the DELETE verb as documented here (
>> https://www.dhis2.org/doc/snapshot/en/developer/html/ch01s12.html) to
>> delete a value.
>>
>>
>> Not sure if that is the functionality you are after though. Typically,
>> this would be a DB admin's role though and would be done with SQL, if you
>> are say, going to delete ALL values for a large part of the hierarchy. The
>> possibility for a whoopsie-moment could be large here.
>>
>> Regards,
>> Jason
>>
>>
>> On Mon, Oct 26, 2015 at 10:37 PM, Aaron Gladders <agladders@xxxxxxxxxx>
>> wrote:
>>
>>> Hi Lars - is there a recommended approach to "deactive" data without
>>> getting into the database itself?  If not is it worth setting up a
>>> blueprint for it?  We may have a group interested in funding that
>>> development.
>>>
>>> Thanks,
>>>
>>> Aaron
>>>
>>> On Thu, Sep 24, 2015 at 2:39 PM, Lars Helge Øverland <
>>> larshelge@xxxxxxxxx> wrote:
>>>
>>>> Hi Lorill,
>>>>
>>>> sorry but at the moment there is no such option. So far we have decided
>>>> not to open up for this to prevent mishaps.
>>>>
>>>> regards,
>>>>
>>>> Lars
>>>>
>>>>
>>>> On Thu, Sep 24, 2015 at 11:37 PM, Lorill Crees <lcrees@xxxxxxxxxx>
>>>> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> Just following up on this. Any ideas on the best way to
>>>>> programatically bulk delete data values?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Lorill
>>>>>
>>>>> On Tue, Sep 15, 2015 at 1:04 PM, Lorill Crees <lcrees@xxxxxxxxxx>
>>>>> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I seem to remember a prior thread on this but I can't seem to find
>>>>>> it. We want to be able to programatically bulk delete data values (both
>>>>>> aggregate and program/program stage data) via the Web API. Is there a way
>>>>>> to achieve this?
>>>>>>
>>>>>> We don't want to have to do this on a sql level directly via the
>>>>>> database, nor do we want to have to loop through individual data points in
>>>>>> order to delete them.
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Lorill
>>>>>>
>>>>>
>>>>>
>>>
>>> _______________________________________________
>>> 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
>>
>> _______________________________________________
>> 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
>>
>>
>
>
> --
> Knut Staring
> Dept. of Informatics, University of Oslo
> Norway: +4791880522
> Skype: knutstar
> http://dhis2.org
>
> _______________________________________________
> 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
>
>

Follow ups

References