In this article
- If you are importing a Triple-S file, when you click Next in the first stage of the procedure, the Import Properties dialog box opens as shown - .
- Data file encoding - to support the import of open text answers in surveys using Unicode (for example Chinese), you can choose the Character Encoding of the Import files. Choose between ANSI (default) and Unicode character encoding. This property defines the encoding for the data file.
- Uploaded schema - if a schema file is to be imported, browse for it and select it here.
- Schema file encoding - to support the export of open text answers in surveys using Unicode (for example Chinese), you can choose the Character Encoding of the Export files. Choose between ANSI (default) and Unicode character encoding. This property defines the encoding for the schema file.
- Execution mode - select how the data is to be added to the target database.
- Update data - any records in the source that already exist in the target survey database will be updated with values from the source. Any records in the source that do not already exist in the target survey database will be ignored.
- Append data - any records in the source that do not exist in the target survey database will be added to the target survey database. Any records in the source that already exist in the target survey database will be ignored.
- Merge data - all the data from the source will be added to the target survey database. Any records in the source that already exist in the target survey database will be updated, and any records in the source that do not currently exist in the target survey database will be added to the target survey database.
- Key field - the key field is used as a unique identifier to indicate which records are to be updated and which are to be appended. The key field is also used to map the responses in the top-level file with the responses in loop response files. The key field must exist in both the import file(s) and the database.
- Make the appropriate selections, then click Next .
Figure 1 - The options available in this dialog are as follows:
You can choose between three modes for importing the data, listed below. In all the modes the user will be asked to provide a key (see Key field below). The keys available are respid, responseid, and any field in the survey database that has an index (go to General for more information). To create an index on a field in a survey database, go to the question properties of the field and set the "Indexed" property (available on single and open text questions with a field width set), and then re-launch the survey. By employing this setting, you can then use for example email address, membership number etc. as a key. The rule executer reads the value of the selected key field in the incoming data file and checks to see if a row with the same key already exists in the target.
In these scenarios, when new records are added, the new records are inserted both in the response data and in the respondent table (respondent list).
System variables respid and responseid and all survey variables with the "Indexed" property set, will be displayed in the "Key field" drop-down. You may choose any survey variable that has a unique value for each respondent as key field. The key field should either be one of the system-provided ids (respid or responseid), or an open text question with a defined field width. Examples of key fields could be membership number, customer id or email address.
Important: The fields respid and responseid are system-provided ids in Authoring. When appending records (inserting records that are not already present) through data import with one of these fields as key field, the system will replace the ids you import with new system-generated ids.