Closed daissatou2 closed 3 years ago
@daissatou2 Issue is looking good, but going to dig more into the mappings. A couple of thoughts...
@lakhassane moving to the bottom of the backlog... let @daissatou2 know if you have any questions on the mappings!
@lakhassane you can link your jobs to the 5 jobs which are turned off here: https://www.openfn.org/projects/p5yaxp/jobs
@lakhassane how is this going? Do you have a rough estimate for when @daissatou2 can test later today? (fyi, she will have some info re: species mappings to add this afternoon)
@aleksa-krolls @daissatou2 either by end of the day or tomorrow morning should be safer. Extrapolating considering the backlog can change often.
@lakhassane moving back to backlog so you're clear on priority. Please leave @daissatou2 an update on how things went today, thanks!
@daissatou2 so far, I made the job that fetch kobo submissions and tested it. some submissions (3) are in the inbox.
You might not be done yet but I still have some troubles with the mappings. I finished the one for urban consumption but awaiting potential changes.
If you look at the column L
in that tab I added some questions for you.
@lakhassane I answered your questions in column L urban_consumption
tab, let me know if any more!
@daissatou2 all the jobs are mapped and pushed.
However, I left comment for some of the columns in the mapping specifications for job 2 and 3.
Background, context, and business value
WCS Wildmeat wants to automatically sync data from 8 new Kobo forms to a "Transitional Database", which they will later access to load data into an even more structured format. The destination database has a series of tables (i.e., tbl_site, swm_transction) that we will use as targets for the Kobo forms. Note:
There are four survey types and two of each type:
Survey list:
The specific request, in as few words as possible
Job 1: Get Kobo data Trigger: Timer Create a duplicate version of this job that can fetch data from all surveys: https://github.com/OpenFn/wcs-wildmeat/blob/master/jobs/fetch-rc-submissions.js
OpenFn will fetch new surveys from Kobo Toolbox (see list of surveys above). To do this, send a GET request to the Kobo API (see api docs) using the openfn_kobo account, and filter by end date to request only submissions modified since the last fetch.
Post every Kobo form submission received in step 1 response back to the OpenFn inbox as an individual Message.
4 Jobs: Map Kobo data to Postgres Trigger: Message filter
state.json
Kobo Credentials: See LP
OpenFn Kobo Toolbox
Postgres DB: See LPWildmeat Postgres Transitional DB (WCS)
Sample states for each form type... paths should be the same, but let's test with both states. Urban Consumption
Rural Consumption
Market
Offtake
adaptor
GET:
language-kobotoolbox
orlanguage-http
? LOAD:language-postgresql
output.json
This is the destination DB data model.