Topic 1: Replacing data on the server
We are moving into “production mode” with our data collection app (measuring trees and other attributes in permanent plots). Up to this point, we’ve been using a sample data set to test and troubleshoot issues with the app. Our next step is to completely replace the sample data that currently resides on the server and tablets with the data we need for the upcoming field season. My understanding is that we can do this in two ways:
Via the tablet (3 steps): (a) replace the sample data on the tablet with the new data (we use a csv file of the previous measurement data), (b) tap on the “Reset Server” box at the lower right-hand corner of the synchronization screen, and © synchronize with the server. Does this completely replace the data on the server, or does it just add the rows of new data to the old sample data? As a follow up to this, how do we prevent someone from inadvertently resetting the server?
Via ODK-X Suitcase: From the Suitcase documentation (ODK-X Suitcase — ODK-X Docs), this looks to be the way to do it (quoted from the documentation): “To update the data on the server you need a correctly formatted CSV – follow the instructions for Preparing your CSV for upload and use the following command to upload it to the server to table table_id of app default with username user and password pass from ~/Desktop/correctly_formatted.csv and save the log to ~/Desktop/log.txt
java -jar ‘path/to/jar.jar’ -update -cloudEndpointUrl ‘https://your-endpoint-server.com’ -appId ‘default’ -tableId ‘table_id’ -username ‘user’ -password ‘pass’ -path ‘~/Desktop/correctly_formatted.csv’ -updateLogPath ‘~/Desktop/log.txt’ -dataVersion 2
The second method seems more complicated, so I would prefer to keep things simpler and use the first method, if it’s a legitimate way of doing this. Looking forward to your input. Thank you,