Professional > Data management scripting > Working with UNICOM Intelligence Interviewer - Server data > Understanding versions
 
Understanding versions
As an UNICOM Intelligence Interviewer - Server survey progresses, changes are sometimes made to the questionnaire definition. For example, questions and categories may be added and deleted. Typically a new version is created in the .mdd file each time a change is made to the questionnaire definition and each version corresponds to a variation of the questionnaire definition used for some of the interviews. When the responses are stored in the RDB database, the name of the version of the questionnaire definition used for the interview is also stored (in the DataCollection.MetadataVersionNumber system variable).
When you export the data using a DMS file, unless you specify a particular version or versions, the most recent version of the questionnaire is automatically used and only the variables that are in that version will be available for exporting. You can optionally select a previous version of the metadata to use for the export. You can also select multiple versions to use for the export. If you do this, only the variables that are in the selected version or versions will be available for that export.
However, it is important to understand that the version or versions of the metadata used for the export do not affect which case data records are included in the export (although you can set up a filter to restrict the export to data collected using one or more specific versions).
Suppose you are using a single version for the export. When categories have been deleted in that version and you are exporting case data collected using a version in which those categories were present, you may get validation errors if any of the responses contain the deleted category, because the metadata for those categories does not exist in the version of the metadata being used.
To illustrate this, look at what happens when you run an export from the Short Drinks sample. First, you need to understand the versions in the Short Drinks sample. The following table gives details of the important differences in each of the six versions in the Short Drinks sample .mdd file.
Version name
Description
1
This version was created when the UNICOM Intelligence Interviewer - Server project was activated in test mode and was used for collecting test data. 5 cases were collected using this version.
2
This version was created when the UNICOM Intelligence Interviewer - Server project was first activated in live mode. 45 cases were collected using this version. There were no significant changes in this version.
3
In this version a new category (Fulltime parent) was added to the sclass question. 24 cases were collected using this version.
4
In this version the 7 or more people category was deleted from the hhsize question and the text on the 6 people category was changed to 6 or more people. 20 cases were collected using this version.
5
In this version the text of the Fruit drinks category in the numdrksz question was changed to Fruit and vegetable drinks and the sclass categorical question was deleted and replaced with an open-ended question called occup. 27 cases were collected using this version.
6
System variables were added to support 5.6 features.
When you run an export from the Short Drinks sample without specifying the version to use, version 6 is automatically used because it is the most recent version and only the variables that are in that version are exported. This means that the sclass variable that was deleted in version 5 is not exported. However, if the export includes case data records that were collected using version 3 or earlier, we would expect to get a validation error on any records for which the category deleted in version 4 was selected. (However, the behavior depends on the validation options you have chosen. For more information, see Validation options when transferring data.)
The occup variable that was added in version 5 will have a NULL value in case data records that were collected using any of the earlier versions, because this variable did not exist in those versions. A NULL value in the case data generally means that the question that corresponds to the variable was not asked.
If you run the export again, but this time select version 3 of the metadata and include all of the case data records, you might expect the export to run without any validation errors because version 3 contains all of the categories. This time the export includes the sclass variable deleted in version 5, but excludes the occup variable that replaced it. This would mean that the sclass variable would have a NULL value for all respondents who took the survey using version 5.
See also
Working with UNICOM Intelligence Interviewer - Server data