Merges separate sqlite databases (that follows the AppDataCollect app's schema) into (1) master sqlite database file.
See /databases/appdatacollect.db for sample sqlite database that follows the format.
Exports the merged farmland data into a CSV file.
- PC using Windows OS
- For fast and optimal data processing, please run the windows batch scripts in an SSD.
- GitBash installed and available globally in your Windows PC.
- AppDataCollect.db's must be available in the /databases directory.
See the section Sqlite Database Files, or run externals.bat. - the files: commands.txt, commands_tables.txt and schema_sqlite.sql must be available in the /settings directory
- Run init.bat (1) time only, if there is no maindb.db file yet
- Grab a copy of any of the (5) CIAT devices' AppDataCollect.db.
See the section Sqlite Database Files, or run externals.bat. - Create sub directories inside /databases numbered 00, 01...0N. Put an AppDataCollect.db inside each. Sample directory and database file hierarchy:
/databases ->
00/AppDataCollect.db
01/AppDataCollect.db
...
05/AppDataCollect.db
(Skip this step if you are able to run externals.bat from Step no. #2.) - Run merge.bat.
- Run csv.bat to export consolidated farmland data from all sqlite databases.
Output: export_csv.csv
- Run import.bat. Enter the filename of the sqlite database that you've copied from any of the device.
- Run only import.bat for succeeding imports from other AppDataCollect.db's.
- Run csv.bat to export consolidated farmland data from all sqlite databases.
Output: export_csv.csv
You can request for access to the (5) CIAT devices' sqlite databases, which are regularly updated here: https://ciatph@bitbucket.org/ciatph/data.git
Date Created: 20180323
Date Modified: 20180731