Update Odk table with new entries once they are into MySQL Database

Hello Community.

As a new comer developer on ODK, I've used Briefcase to push data into my
Aggregate Local instance (running on Tomcat with MySQL Database in
background).

Once I have all my data, I have a Table which contains a repeat part of my
survey, with different Number values per period, simply like this schema.
Table_Records(
_URI,
PARENT_AURI,
_CREATOR_URI_USER,
_CREATION_DATE,
_ORDINAL_NUMBER,
_TOP_LEVEL_AURI,
Period,
Number)

My question is that I want to manually update the related Table
"Table_Records" with new values by adding new entries. Which values should
I put in the update query for ODK Generated fiels
(_URI,
PARENT_AURI,
_CREATOR_URI_USER,
_CREATION_DATE,
_ORDINAL_NUMBER,
_TOP_LEVEL_AURI,) ?

I only know the ordinal number of the entry in the repeat, and the parent
key value "PARENT_AURI", and my values (Period,Number).

How can I get a generator which will provide a new " _URI" value for my
data?

Thanks.

I am not sure why you are doing this.

ODK Collect and ODK Aggregate are intended for a one-way, write-once,
flow of information.

Forms are filled-in on the device (ODK Collect), verified and
marked-as-complete.

They are then submitted to ODK Aggregate, where completed submissions
are *immutable
*(not-modifiable).

And then any of the data transfer mechanisms (
https://opendatakit.org/use/aggregate/data-transfer/ ) are used to send
your data through to downstream data processing systems.

Various extensions to this are provided by systems that extend the core ODK
technology (e.g., SurveyCTO).

But in the core mode of operation, you gain very little by attempting to
inject data records into the system.

ยทยทยท ==================== That said, to answer your question:

_URI is a random UUID. It uniquely identifies the new data record. It is
useful if there is a nested repeat group or multiple-select question within
this repeat group.

_PARENT_AURI refers to the _URI of the immediately-enclosing repeat group
(or top-level instance id, if none) that contains this repeat.

_TOP_LEVEL_AURI refers to the top-level instance id ( _URI ) that contains
this repeat.

_ORDINAL_NUMBER is the sequence number (1, 2, ... ) of the repeat.

the other fields ( _CREATOR_URI_USER, _CREATION_DATE,
_LAST_UPDATE_DATE, _LAST_UPDATE_URI_USER
) are audit fields tracking the identity of the user inserting or updating
the data record. Except for rare circumstances, there would be no updates
to a data record (they are immutable).

The database structure is briefly described here:

On Tue, Mar 1, 2016 at 5:30 AM, jannesquin royer jannesquin@gmail.com wrote:

Hello Community.

As a new comer developer on ODK, I've used Briefcase to push data into my
Aggregate Local instance (running on Tomcat with MySQL Database in
background).

Once I have all my data, I have a Table which contains a repeat part of my
survey, with different Number values per period, simply like this schema.
Table_Records(
_URI,
PARENT_AURI,
_CREATOR_URI_USER,
_CREATION_DATE,
_ORDINAL_NUMBER,
_TOP_LEVEL_AURI,
Period,
Number)

My question is that I want to manually update the related Table
"Table_Records" with new values by adding new entries. Which values should
I put in the update query for ODK Generated fiels
(_URI,
PARENT_AURI,
_CREATOR_URI_USER,
_CREATION_DATE,
_ORDINAL_NUMBER,
_TOP_LEVEL_AURI,) ?

I only know the ordinal number of the entry in the repeat, and the parent
key value "PARENT_AURI", and my values (Period,Number).

How can I get a generator which will provide a new " _URI" value for my
data?

Thanks.

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com