CSV to CaseXML

Hello everyone,

Are there tools in commcare that can export data from mysql db or CSV
file and generate a CaseXML based on particular Commcare Module Form.
I should be able to submit this CaseXML to commcare using the
submission API.

So far I have just created a CaseXML template using django Templating
Language. Am then populating the variables and pushing the it to
commcare using the submission API. So far this seems to work for me,
but I would like to get a more concrete solution that I can use in
long run instead of creating django templates.

Hi Moses,

··· On Mon, Jun 11, 2012 at 2:00 PM, Moses Katembu wrote:

Hello everyone,

Are there tools in commcare that can export data from mysql db or CSV
file and generate a CaseXML based on particular Commcare Module Form.
I should be able to submit this CaseXML to commcare using the
submission API.

So far I have just created a CaseXML template using django Templating
Language. Am then populating the variables and pushing the it to
commcare using the submission API. So far this seems to work for me,
but I would like to get a more concrete solution that I can use in
long run instead of creating django templates.

We have a couple different libraries to do this, but they rely on including
many of commcare-hq’s shared codebase.

Since you’re working in python, a good place to look/start would be our
test-case-xml generator class[1].

Actually this thing is mostly standalone, so could easily be pulled out and
used.

To get an example of its use you could look through some of our unit tests.
Here is one example[2].

Note: in the future probably good to use the commcare-developers[3] google
group for questions like this, over the user group.

cheers,
Cory

[1]

[2]


[3] https://groups.google.com/forum/?fromgroups#!forum/commcare-developers