Local instance of aggregate

Does anyone know of any easy way to upload a lot of instances to odk
aggregate without having to do it one at a time? The data is all within one
parent directory but each instance has it's own directory.

Seems like there should be but I am unaware of any. The easiest way is to
probably write a simple program/script. The upload is simply a post request
to Aggregate. This link contains some sample code to post the instance
http://bitbucket.org/javarosa/javarosa/wiki/FormListAPI?rev=f02ddae1088d

··· On Sat, Aug 7, 2010 at 8:23 AM, Andrew Azman wrote:

Does anyone know of any easy way to upload a lot of instances to odk
aggregate without having to do it one at a time? The data is all within one
parent directory but each instance has it's own directory.

Thanks! I ended up just using curl with the following:

find . | grep .xml | while read line; do curl -d @$line " http://localhost:8080/submission"; done

Aggregate seems to be dropping all fields that do not have their type
specified in the xform. It seems to assign them type = 0. Is there any way
around this short of making sure there is a type statement for each node?

Thanks again,

andrew

··· On Sat, Aug 7, 2010 at 6:13 PM, W. Brunette wrote:

Seems like there should be but I am unaware of any. The easiest way is to
probably write a simple program/script. The upload is simply a post request
to Aggregate. This link contains some sample code to post the instance
http://bitbucket.org/javarosa/javarosa/wiki/FormListAPI?rev=f02ddae1088d

On Sat, Aug 7, 2010 at 8:23 AM, Andrew Azman andrewazman@gmail.comwrote:

Does anyone know of any easy way to upload a lot of instances to odk
aggregate without having to do it one at a time? The data is all within one
parent directory but each instance has it's own directory.

--
andrew azman
+1.202.258.3951

Hi Andrew,

For now, defining a type for a field is the only way to avoid it being
flattened away.

This was done, in part, to support nested elements and repeated groups. If
the element does not have a type, its child elements are processed and it,
itself, is "flattened" away unless it denotes a repeated group, in which
case its name is used in forming the sub-table for holding those results.

Assuming leaf elements are always strings unless explicitly typed might
work, but will need further research. One downside of relaxing this
requirement is that it could allow type-constraint omissions to slip through
during the form definition process.

Mitch

··· On Wed, Aug 11, 2010 at 12:50 AM, Andrew Azman wrote:

Thanks! I ended up just using curl with the following:

find . | grep .xml | while read line; do curl -d @$line " http://localhost:8080/submission"; done

Aggregate seems to be dropping all fields that do not have their type
specified in the xform. It seems to assign them type = 0. Is there any way
around this short of making sure there is a type statement for each node?

Thanks again,

andrew

On Sat, Aug 7, 2010 at 6:13 PM, W. Brunette wbrunette@gmail.com wrote:

Seems like there should be but I am unaware of any. The easiest way is to
probably write a simple program/script. The upload is simply a post request
to Aggregate. This link contains some sample code to post the instance
http://bitbucket.org/javarosa/javarosa/wiki/FormListAPI?rev=f02ddae1088d

On Sat, Aug 7, 2010 at 8:23 AM, Andrew Azman andrewazman@gmail.comwrote:

Does anyone know of any easy way to upload a lot of instances to odk
aggregate without having to do it one at a time? The data is all within one
parent directory but each instance has it's own directory.

--
andrew azman
+1.202.258.3951