Clearing / deleting all existing records in an application

Hello folks. This question is probably one that comes up once a week:

Because I am in a development phase, I am doing a lot of testing of apps,
and of course I accumulate a lot of old garbage data. And some of that
old data is perhaps “tainted” by earlier, incorrect configurations… which
can’t help things either.

What is the best way for me to clear out / delete all the existing records
of a database? I seem to recall that there’s no simple command for it –
or am I wrong? Or maybe a workaround, like making a new clone of your app
(with no data) and then deleting the old, “full of garbage data” app?

Give your recommendations about clearing out the house… thanks much!

Eric

Hey Eric,

Generally we recommend you do all testing with a test user account. Then
when you want to clear the data you can just delete that account, which
will delete all the data as well. More information is available on our wiki
https://confluence.dimagi.com/display/commcarepublic/Create+and+Manage+CommCare+Mobile+Workers#CreateandManageCommCareMobileWorkers-D.Deactivate(Formerly"Archive")andDeleteMobileWorkers.
If you haven’t been using a test account, you can first reassign cases to a
test user and then delete that user, or you can close the cases manually or
(with a paid project) using the case importer.

If you have other ideas about how we can better support clearing data in
CommCare feel free to post them on our uservoice
http://dimagi.uservoice.com/.

Cory

··· On Fri, Sep 19, 2014 at 5:27 AM, Eric Stephan wrote:

Hello folks. This question is probably one that comes up once a week:

Because I am in a development phase, I am doing a lot of testing of apps,
and of course I accumulate a lot of old garbage data. And some of that
old data is perhaps “tainted” by earlier, incorrect configurations… which
can’t help things either.

What is the best way for me to clear out / delete all the existing records
of a database? I seem to recall that there’s no simple command for it –
or am I wrong? Or maybe a workaround, like making a new clone of your app
(with no data) and then deleting the old, “full of garbage data” app?

Give your recommendations about clearing out the house… thanks much!

Eric


You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hi Cory,

This is also a question that I have had!

If we reassign cases to a test user and then delete that user, does that
have the effect of actually deleting the cases and associated data from the
system?

thank you!
Julia

··· On Saturday, September 20, 2014 3:30:17 PM UTC+2, Cory Zue wrote: > > Hey Eric, > > Generally we recommend you do all testing with a test user account. Then > when you want to clear the data you can just delete that account, which > will delete all the data as well. More information is available on our > wiki > . > If you haven't been using a test account, you can first reassign cases to a > test user and then delete that user, or you can close the cases manually or > (with a paid project) using the case importer. > > If you have other ideas about how we can better support clearing data in > CommCare feel free to post them on our uservoice > . > > Cory > > On Fri, Sep 19, 2014 at 5:27 AM, Eric Stephan <este...@fhi360.org > wrote: > >> >> Hello folks. This question is probably one that comes up once a week: >> >> Because I am in a development phase, I am doing a lot of testing of apps, >> and of course I accumulate a lot of old garbage data. And some of that >> old data is perhaps "tainted" by earlier, incorrect configurations... which >> can't help things either. >> >> What is the best way for me to clear out / delete all the existing >> records of a database? I seem to recall that there's no simple command >> for it -- or am I wrong? Or maybe a workaround, like making a new clone >> of your app (with no data) and then deleting the old, "full of garbage >> data" app? >> >> Give your recommendations about clearing out the house... thanks much! >> >> Eric >> >> -- >> You received this message because you are subscribed to the Google Groups >> "commcare-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to commcare-user...@googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> > >

Hi Cory,

 I was wondering how would you go about doing this? Also, while on the 

subject of case closing. Is there a way to set cases to close after a
designated period of time? (i.e. 90 days)

or you can close the cases manually

··· > >

Hi Cory,

Just to add to this - I’ve tried this out and it has worked to delete all
data, with the exception of data in the message log. Is there a way to
clear out this old data from the message log?

thank you!

··· On Thursday, September 25, 2014 10:59:56 AM UTC+2, Julia de Kadt wrote: > > Hi Cory, > > This is also a question that I have had! > > If we reassign cases to a test user and then delete that user, does that > have the effect of actually deleting the cases and associated data from the > system? > > thank you! > Julia > > On Saturday, September 20, 2014 3:30:17 PM UTC+2, Cory Zue wrote: >> >> Hey Eric, >> >> Generally we recommend you do all testing with a test user account. Then >> when you want to clear the data you can just delete that account, which >> will delete all the data as well. More information is available on our >> wiki >> . >> If you haven't been using a test account, you can first reassign cases to a >> test user and then delete that user, or you can close the cases manually or >> (with a paid project) using the case importer. >> >> If you have other ideas about how we can better support clearing data in >> CommCare feel free to post them on our uservoice >> . >> >> Cory >> >> On Fri, Sep 19, 2014 at 5:27 AM, Eric Stephan wrote: >> >>> >>> Hello folks. This question is probably one that comes up once a week: >>> >>> Because I am in a development phase, I am doing a lot of testing of >>> apps, and of course I accumulate a lot of old garbage data. And some of >>> that old data is perhaps "tainted" by earlier, incorrect configurations... >>> which can't help things either. >>> >>> What is the best way for me to clear out / delete all the existing >>> records of a database? I seem to recall that there's no simple command >>> for it -- or am I wrong? Or maybe a workaround, like making a new clone >>> of your app (with no data) and then deleting the old, "full of garbage >>> data" app? >>> >>> Give your recommendations about clearing out the house... thanks much! >>> >>> Eric >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "commcare-users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to commcare-user...@googlegroups.com. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >>

Hi Irwin,

Unfortunately, cases cannot be set to close after a designated period.
Alternatively, here are a couple of ways to manually close cases in HQ if a
mobile worker does not close the cases in their app:

  1. The Excel Case Importer can be used to do a bulk case close. For more
    information see this link:
    https://help.commcarehq.org/display/commcarepublic/Closing+Cases
  2. The Reports -> Case List page can be used to generate a list of cases.
    Click the name of the case to pull up the case, then click “Close Case.”
    For more information, see “Manually Closing Cases” here:
    https://help.commcarehq.org/display/commcarepublic/Editing+Data+in+CommCare

Let me know if you have further questions,

Nate

··· On Thu, Sep 25, 2014 at 10:10 AM, Irwin wrote:

Hi Cory,

 I was wondering how would you go about doing this? Also, while on the

subject of case closing. Is there a way to set cases to close after a
designated period of time? (i.e. 90 days)

or you can close the cases manually


You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Nate Haduch

Technical Support Analyst
Dimagi, Inc | 585 Massachusetts Ave | Suite 3 | Cambridge, MA 02139
web: http://www.dimagi.com/

Hi Julia,

Hi Cory,

Just to add to this - I’ve tried this out and it has worked to delete all
data, with the exception of data in the message log. Is there a way to
clear out this old data from the message log?

Glad this worked for you. The fact that it doesn’t delete data in the
message log sounds like it could be a bug. I’ll file something in our
tracking system and report back when we know more.

Cory

··· > > thank you! > > > On Thursday, September 25, 2014 10:59:56 AM UTC+2, Julia de Kadt wrote: >> >> Hi Cory, >> >> This is also a question that I have had! >> >> If we reassign cases to a test user and then delete that user, does that >> have the effect of actually deleting the cases and associated data from the >> system? >> >> thank you! >> Julia >> >> On Saturday, September 20, 2014 3:30:17 PM UTC+2, Cory Zue wrote: >>> >>> Hey Eric, >>> >>> Generally we recommend you do all testing with a test user account. Then >>> when you want to clear the data you can just delete that account, which >>> will delete all the data as well. More information is available on our >>> wiki >>> . >>> If you haven't been using a test account, you can first reassign cases to a >>> test user and then delete that user, or you can close the cases manually or >>> (with a paid project) using the case importer. >>> >>> If you have other ideas about how we can better support clearing data in >>> CommCare feel free to post them on our uservoice >>> . >>> >>> Cory >>> >>> On Fri, Sep 19, 2014 at 5:27 AM, Eric Stephan wrote: >>> >>>> >>>> Hello folks. This question is probably one that comes up once a week: >>>> >>>> Because I am in a development phase, I am doing a lot of testing of >>>> apps, and of course I accumulate a lot of old garbage data. And some of >>>> that old data is perhaps "tainted" by earlier, incorrect configurations... >>>> which can't help things either. >>>> >>>> What is the best way for me to clear out / delete all the existing >>>> records of a database? I seem to recall that there's no simple command >>>> for it -- or am I wrong? Or maybe a workaround, like making a new clone >>>> of your app (with no data) and then deleting the old, "full of garbage >>>> data" app? >>>> >>>> Give your recommendations about clearing out the house... thanks much! >>>> >>>> Eric >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "commcare-users" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to commcare-user...@googlegroups.com. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> -- > You received this message because you are subscribed to the Google Groups > "commcare-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to commcare-users+unsubscribe@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. >

Thanks Cory! Please do let me know if you are able to figure this one out.
Later on, I also looked at the data from exporting the case list, and the
data for the deleted participants was also still there, although they no
longer had a participant ID assigned. Is this perhaps related?

··· On Thursday, September 25, 2014 2:31:41 PM UTC+2, Cory Zue wrote: > > Hi Julia, > > Hi Cory, >> >> Just to add to this - I've tried this out and it has worked to delete all >> data, with the exception of data in the message log. Is there a way to >> clear out this old data from the message log? >> > > Glad this worked for you. The fact that it doesn't delete data in the > message log sounds like it could be a bug. I'll file something in our > tracking system and report back when we know more. > > Cory > > >> >> thank you! >> >> >> On Thursday, September 25, 2014 10:59:56 AM UTC+2, Julia de Kadt wrote: >>> >>> Hi Cory, >>> >>> This is also a question that I have had! >>> >>> If we reassign cases to a test user and then delete that user, does that >>> have the effect of actually deleting the cases and associated data from the >>> system? >>> >>> thank you! >>> Julia >>> >>> On Saturday, September 20, 2014 3:30:17 PM UTC+2, Cory Zue wrote: >>>> >>>> Hey Eric, >>>> >>>> Generally we recommend you do all testing with a test user account. >>>> Then when you want to clear the data you can just delete that account, >>>> which will delete all the data as well. More information is available on >>>> our wiki >>>> . >>>> If you haven't been using a test account, you can first reassign cases to a >>>> test user and then delete that user, or you can close the cases manually or >>>> (with a paid project) using the case importer. >>>> >>>> If you have other ideas about how we can better support clearing data >>>> in CommCare feel free to post them on our uservoice >>>> . >>>> >>>> Cory >>>> >>>> On Fri, Sep 19, 2014 at 5:27 AM, Eric Stephan wrote: >>>> >>>>> >>>>> Hello folks. This question is probably one that comes up once a week: >>>>> >>>>> Because I am in a development phase, I am doing a lot of testing of >>>>> apps, and of course I accumulate a lot of old garbage data. And some of >>>>> that old data is perhaps "tainted" by earlier, incorrect configurations... >>>>> which can't help things either. >>>>> >>>>> What is the best way for me to clear out / delete all the existing >>>>> records of a database? I seem to recall that there's no simple command >>>>> for it -- or am I wrong? Or maybe a workaround, like making a new clone >>>>> of your app (with no data) and then deleting the old, "full of garbage >>>>> data" app? >>>>> >>>>> Give your recommendations about clearing out the house... thanks much! >>>>> >>>>> Eric >>>>> >>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "commcare-users" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send >>>>> an email to commcare-user...@googlegroups.com. >>>>> For more options, visit https://groups.google.com/d/optout. >>>>> >>>> >>>> -- >> You received this message because you are subscribed to the Google Groups >> "commcare-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to commcare-user...@googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> > >

Hi Julia,

I’ve followed up with you off this thread to continue looking into the data
issues that you’ve reported here.

Thanks,

··· -- Nate Haduch

Technical Support Analyst
Dimagi, Inc | 585 Massachusetts Ave | Suite 3 | Cambridge, MA 02139
web: http://www.dimagi.com/

On Mon, Sep 29, 2014 at 3:56 AM, Julia de Kadt jdekadt@gmail.com wrote:

Thanks Cory! Please do let me know if you are able to figure this one out.
Later on, I also looked at the data from exporting the case list, and the
data for the deleted participants was also still there, although they no
longer had a participant ID assigned. Is this perhaps related?

On Thursday, September 25, 2014 2:31:41 PM UTC+2, Cory Zue wrote:

Hi Julia,

Hi Cory,

Just to add to this - I’ve tried this out and it has worked to delete
all data, with the exception of data in the message log. Is there a way to
clear out this old data from the message log?

Glad this worked for you. The fact that it doesn’t delete data in the
message log sounds like it could be a bug. I’ll file something in our
tracking system and report back when we know more.

Cory

thank you!

On Thursday, September 25, 2014 10:59:56 AM UTC+2, Julia de Kadt wrote:

Hi Cory,

This is also a question that I have had!

If we reassign cases to a test user and then delete that user, does
that have the effect of actually deleting the cases and associated data
from the system?

thank you!
Julia

On Saturday, September 20, 2014 3:30:17 PM UTC+2, Cory Zue wrote:

Hey Eric,

Generally we recommend you do all testing with a test user account.
Then when you want to clear the data you can just delete that account,
which will delete all the data as well. More information is available on
our wiki
https://confluence.dimagi.com/display/commcarepublic/Create+and+Manage+CommCare+Mobile+Workers#CreateandManageCommCareMobileWorkers-D.Deactivate(Formerly"Archive")andDeleteMobileWorkers.
If you haven’t been using a test account, you can first reassign cases to a
test user and then delete that user, or you can close the cases manually or
(with a paid project) using the case importer.

If you have other ideas about how we can better support clearing data
in CommCare feel free to post them on our uservoice
http://dimagi.uservoice.com/.

Cory

On Fri, Sep 19, 2014 at 5:27 AM, Eric Stephan este...@fhi360.org wrote:

Hello folks. This question is probably one that comes up once a week:

Because I am in a development phase, I am doing a lot of testing of
apps, and of course I accumulate a lot of old garbage data. And some of
that old data is perhaps “tainted” by earlier, incorrect configurations…
which can’t help things either.

What is the best way for me to clear out / delete all the existing
records of a database? I seem to recall that there’s no simple command
for it – or am I wrong? Or maybe a workaround, like making a new clone
of your app (with no data) and then deleting the old, “full of garbage
data” app?

Give your recommendations about clearing out the house… thanks much!

Eric


You received this message because you are subscribed to the Google
Groups “commcare-users” group.
To unsubscribe from this group and stop receiving emails from it,
send an email to commcare-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google
Groups “commcare-users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to commcare-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.