In this article
Database
Select this option if the data source is a database. The Source tab layout is then as shown in the figure below - . Note that the option is only available for an On-Premise (server) installation, and is then set up in the System Configuration.
Figure 1 - The Source tab with Database selected as the Source Type
- Connection String – the connection string used to connect to the database.
- Table Name – to select entire table, write in the table name. Otherwise, define a Query String if you only want part of the table. Here you must use SQL syntax.
Panel Database
When you select Panel Database as the source type, the Source tab layout may be as shown below - . Note that the fields available can also depend on the target type selected.
Figure 2 - The Source tab with Panel Database selected as the Source Type
- Panel Variables - Search for and select the variables you wish to use.
- Variable Properties - Only available when the target is set to Delimited Text File. Select a variable in the Panel Variables > Selected field; the properties appropriate to the variable then appear in the Variable Properties field. Make the desired settings.
- Survey History Variables – click Select variables... to open a selection overlay, then select the Survey History variables you wish to use. On completion, click OK to close the overlay and add the variables to the field.
- Credit Transaction History Variables – click Select variables... to open a selection overlay, then select the Credit Transaction History variables you wish to use . On completion, click OK to close the overlay and add the variables to the field.
Note: When the Source Type is Panel Database and the Target is a File, you can format the values to be copied, for example the date format, field widths etc.
Survey Database
When you select Survey Database as the source type, the Source tab layout is as shown below - .
Figure 3 - The Source tab with Survey Database selected as the Source Type
- Project ID – you can select a project either by its Project ID or by keywords. To use Project IDs, click the radio button, click Projects, and select the required project(s) from the list (note that you can select more than one).
- Keyword Filter - click the radio button and type in the required keyword. The filter will then match any survey that is assigned the particular category or keyword in the Project Overview page.
- Use Test Database - check if you wish to test the rule using data from the Test database.
- Complete responses – selects only data from surveys with the status Complete.
- Incomplete responses – selects only data from surveys with the status Incomplete.
- Screened – selects only data from surveys with the status Screened.
- Quota full - selects only data from surveys with the status Quota Full.
- Error - selects only data from surveys with the status Error.
- Expression - here you can create an expression to filter the data that is to be manipulated by the rule. Click Edit to open the Expression Editor window. Refer to the Professional Authoring documentation for further details.
- Date Filter - if you wish to include only data from between particular dates, check the box and select the dates here.
- Data to be included - select All Data, which updates all data, or Data Changed Since Last Run, which updates only the data that has been changed since the previous update. Note that this setting only applies to recurring tasks. Refer to the Professional Authoring documentation for further details.
- Columns - you can select the columns you wish to include; all columns, selected, or as used in the selected template.
Go to the Target tab and click Map Fields to link source fields to target fields (go to Mapping Fields for more information). Key fields can also be specified. If no key fields are specified, all source fields must match the target fields by name, and the responseid and projectid on the source are used as the keys.
Survey Database - Synchronization
Important
This source type can only be used if the source survey has JobNumber, RunNumber and PanelistId as background fields in the survey. JobNumber should be an open question node with a suitable field width set, while RunNumber and PanelistId must be numerical open questions with a suitable number of digits.
If you attempt to use this source type and one or more of these required fields are missing, the rule will fail. Check the survey or use ‘Select columns’ from within the Source tab to ensure the fields are present.
Select this option if the data source is a survey database that is to be synchronized with the panel database. The Source tab layout is then as shown in the figure below - .
Note: When "Survey Synchronization" is enabled in Panel Management > Panel Settings > Features > Enable Survey Synchronization, the "Survey Database (Synchronization)" option will be available in the Source Type drop-down in the General tab (go to General for more information).
Figure 4 - The Source tab with Survey selected as the Source Type
Note: A synchronization rule does not have an Execute button; the rule must be run from Panel Utilities > Survey Synchronization.
When you select Source Type to be Survey Database (Synchronization), on the Target tab the Target Type parameter must be set to Panel Database and the Target Mode parameter must be set to Update Data .
The survey synchronization task will run for surveys that are connected to a data synchronization rule and have the status Production. If a data synchronization rule is to be run for all surveys that are used in the sampling, go to Sample Management > Sampling Settings > Survey Rule Templates(go to Survey Rule Templates for more information) and set up a new template rule (go to Creating a New Survey Rule Template for more information), and choose the data synchronization rule for Update Completes, Update Non Responder, or Survey Closing, then save your changes. Thereafter go to General and here select this rule to be the Default Survey Rule Template. Note that this will only function for sampling jobs that are executed after this setup has been created and saved.
To link a survey in to a Data Synchronization task that has already executed, go to Sample Management > Active Jobs List and select the rule for Update Completes, Update Non Responder, or Survey Closing as appropriate. Remember to check that the Sampling job is set to Production.
The fields and options on the tab are:
- Survey Status – select the required option. Additional fields will be activated depending on the selection. All options and fields are described below.
- Complete – selects only data from surveys with the status Complete.
- Incomplete – selects only data from surveys with the status Incomplete.
- Non-starters – selects only data from surveys that have not been started (respondent data).
- All Responses - selects all the response data.
- Additional Survey Variables – type in the names of the questions you wish to retrieve from the survey, separated by comma. These fields can be used in the action script. To access the field in the script, the variables must be prefixed with ‘Survey.’. I.e. If you have selected interview_start as an Additional Survey Variable, you must write Survey.interview_start in the script to get the value for the current panelist. Click the Validate Action Script button to check the script.
- Professional Panel Variables – fields selected here are retrieved and can then be updated. Any variables selected here will be listed in the Available Fields column on the Action tab (go to Actions for more information).
- Survey History Variables – the fields in the Survey History table.