Has anyone developed a python script to extract the feature class data from the sqlite database? We had a schema change in a survey which overwrote the data on the hosted layer in ArcGIS Online and we would like to recover the data from the device and append this to the new survey layer.
Thanks for any help,
try using the tool within desktop named "Copy Runtime Geodatabase to File Geodatabase" and this should do the trick for you.
Here is the online help page - Copy Runtime Geodatabase To File Geodatabase—Help | ArcGIS for Desktop
Hopefully that works well for you.
Thanks for that. The ‘copy runtime to file geodatabase’ doesn’t run on .sqlite database – the tool fails. I changed the extension to .geodatabase and the tool ran but the result is a table – the same table that you can view directly as a .sqlite database in ArcCatalogue.
When I used this tool on a .geodatabase file from Collector for ArcGIS – the output is a feature class with the relationship class and attachment table (if attachments are enabled).
Therefore, this isn’t really working for me.
Any other tips?
Bay of Plenty Regional Council Toi Moana
Interesting to know as so far we have not had to recover surveys from the devices as of yet. I thought that this tool would possibly work on the data set in the same manner as we have for this same issue with Collector.
There are these two posting from other users asking a similar question that could be of use.
We ended up downloading the Desktop App of Survey123, loading the survey, and pasting the .sqLite database in the parent directory for the database of that survey. We then clicked on the 'Fix Database' button and that seemed to reconcile the database changes and we able to ship on those surveys that were stored on the device to AGOL.
I tried to use this script (via a toolbox, added new script and pointed to the .py fle) and it runs in less than 1 second with no output. Any ideas on how to figure out what's going on? I also tried pasting the code directly into the python window in catalog and running it that way (both times I updated the scrip to hard code the path to sqlite db and the out folder ) wit no luck.
I created a script to allow importation of a Survey123 SQLite database downloaded from a device into a geodatabase: