OpenDataCapture icon indicating copy to clipboard operation
OpenDataCapture copied to clipboard

Expanding zod array data into entries with datahub export

Open david-roper opened this issue 9 months ago • 1 comments

Current Implementation and Limitations

Current behaviour of the datahub export has the zod array data all in one entry in its json object like form. It looks out of place compared to the other long data format entries

Associated Application Components

Client

Proposed Solution

when zod array like data is found within the entry. iterate through each part and make it a standalone entry in the datahub's long format data export

Estimated Difficulty

Low

Priority

Medium

david-roper avatar May 16 '25 17:05 david-roper

Should this be the responsibility of ODC, or of the wrapper that is written in the instrument? Thoughts @joshunrau ?

gdevenyi avatar May 16 '25 19:05 gdevenyi

If we go with the former (ODC itself), we could detect it in the type of data sent over and expand it when its a zod array object. Would have to look at other options in the case of the wrapper doing it.

david-roper avatar May 20 '25 15:05 david-roper

To make it clear, my preference is that the author of the instrument should fully define the data it returns in a way that its useful downstream, i.e. the unpacking happens in the instrument definition. The author of this should know best compared to a "generic" ODC unpacker.

gdevenyi avatar May 20 '25 16:05 gdevenyi