Skip to content

Some quick ideas on survey migrations

amarder edited this page May 27, 2011 · 1 revision

Goal: Migrate data collected using one XForm to match data collected using another XForm.

First, let's talk about what data looks like. A survey instance is a dict. Keys in the dict are strings representing the name of the question or the name of the group of questions. Values are either strings, dicts (groups of questions), or lists (repeated questions or groups of questions).

A migration needs to be able to translate keys from one version of the survey to another, and potentially translate data as well. The easiest way to translate a key is with a pair:

xpath1 : xpath2

This should be a one to at most one mapping. Translating the values from multiple choice questions can be represented in the same way. More general value migrations are not as easy, and probably not as important.

Clone this wiki locally