Duplicates on exporting via Briefcase

What is the problem? Please be detailed.
Duplicates records when clicking multiple times export data on Briefcase

What ODK tool and version are you using? And on what device and operating system version?
ODK Briefcase 1.8. Windows 7

What steps can we take to reproduce the problem?
Pull a form and then click export. You get the records. If I re-click export the data is appended to the file and then you get duplicates.Any click is again appending the same data despite of same uuid

Hi aurdipas,

in fact briefcase dose not delete any data exist in your phone
in the same time briefcase doesn't decide if there is data already exist in your odkstorage folder

it just do what you tell here if you want want data click export one, twice make a copy of data.

Best Regards

Hi @aurdipas. This is expected behavior, but I'm not sure it's good behavior. Couple of questions for ya!

  1. Does the export also append the headers or does just append the data?
  2. What would you like to happen instead? That we continue to append, but de-dupe when we can?
  3. Would a reasonable alternative be that we give you the choice to append or overwrite or create a new export based on the name of the first export (e.g., my_export 2.csv)?

Yaw

1 Like

@ln Just answered Q1 for me. Yes, the export appends the data and not the headers.

I think the reason for appending is so you can build up a file over time (e.g., you export some combination of date ranges into the same file). We could still de-dupe, I guess, but that's a fair bit of new code.

What would you suggest we do to make this better, @aurdipas? Would giving you the option to overwrite solve the problem for you?

1 Like

Hi @yanokwa,
Thanks for looking into it.
Yes. Overwrite would definitively solve the issue.
We tried to instruct data managers to delete or move the file after download but sometime they forget and then they find duplicates.

You will not face this problem if you export data with auto download with help of briefcase.
Go through with this link might be your problem will solve.
https://opendatakit.org/use/aggregate/data-transfer/

1 Like

@Stalker is correct that there is an overwrite mode in the command line interface of Briefcase and we can certainly add that option to the graphical user interface.

2 Likes

@Stalker thanks a lot.
I see "-oc,--overwrite_csv_export Flag to overwrite CSV on export" would fix the issue when one use the CLI for exporting the data, but not everyone can deal with it. I'm in Geneva at a VA meeting at WHO and it seems that some countries would find easier to have that option on the GUI. @yanokwa it would be great if this could be added at one point in the GUI and in the meanwhile I can advice people to remove the generated file once they exported it if they are not familiar with the command line interface and the one that have a tech person on site to use the CLI. Thanks a lot both for your help

2 Likes

If you need code for CLI feel free to shot a message to me, i can share code with you.

1 Like

The issue has been filed at https://github.com/opendatakit/briefcase/issues/202 and we'll try to get this into the next release.

3 Likes