Import Sample Overview

The import sample process allows a user to import an ascii fone file, comma or tab delimited file or a fixed width file to a fone file format.   It also allows a user to set up websurvent options and test sample options.

The import sample process is not necessary for your Open webSurvent projects since they do not require passwords and therefore no sample file is needed for import.

When importing a sample for your Closed webSurvent projects, the import sample process can generate usernames, passwords, phone numbers and test records if specified.

DNC Files

We allow for both study specific and shopwide DNC files. The file extensions allowed for upload are .DNC and .DNCPREFIX. The files must be ASCII files and not TR files. Once uploaded, the files are converted into TR files. If files are copied via command line, then the files must be TR files in the correct format.

Generating webSurvent Sample

When generating sample, a sample file is created with random phone numbers, passwords, and username set to Respondent or any combination of the three fields.  You can also generate test passwords that will begin with “TEST”. The length of the test passwords depends on how many records you generate. For example, if you generate 500 test passwords, it would generate test001-test500. If you generate 1000 test passwords, it would generate test0001-test1000.

If you use this method to generate passwords, when running in Test Mode, you will not be able to access the non-test passwords (passwords that do not begin with “Test”).  Test passwords can be accessed in both Test and Live mode surveys.  If you use a test password in a live study, the data will not be saved and no quotas will be updated.

Importing Excel Open XML Format Files

The import sample process supports Microsoft Excel Open XML format files.  The import sample process will create a variable for each cell defined from the first row of your sample file.  This is referred to as the map. The first row of your .xlsx sample file must contain a map. The column headers from the first line of the .xlsx file will be assigned during the sample handling process. If your .xlsx sample file does not contain a first row with headings, your import process will be flawed. To correct this problem, upload a new sample file with column headers in the first line of the file.

Importing Delimited Files

The import sample process supports importing both comma delimited (.CSV) and tab delimited (.TSV) file types. Comma delimited files must have a .CSV extension and tab delimited files must have a .TSV extension in order to be recognized when uploaded.

MS Excel™ exports tab-separated values as .TXT files. In order to use these tab delimited files in the Console, the extension must be changed from .TXT to .TSV.

The import sample process will create a variable for each delimited field defined from the first line of your sample file.  This is referred to as the map. The first line of your delimited sample file must contain a map with delimiters. The column headers from the first line of the delimited file will be assigned during the sample handling process. If your delimited sample file does not contain a first line with headings, your import process will be flawed. To correct this problem, upload a new sample file with column headers in the first line of the file.

The only allowable characters in the map are: Alphanumeric characters, underscores, dots and dollar signs. The variables cannot have quote marks around them.

Importing Fixed Width Files

The import sample process supports importing fixed width files. These files can be generated in the editor of your choice. Fixed width files must  have a .RAW extension in order to be recognized when uploaded.

Each fixed width file (.RAW) needs to be accompanied by a map file (.MAP) to indicate the position and length of each field in the sample file.  The name of the map file must match the name of the actual sample file; this is required.  For example, if your fixed width file is named SAMPLE.RAW, then your .MAP file needs to be named SAMPLE.MAP. If the .map file name doesn’t  match the base name of your sample file, you will receive an error message.

.Map Examples

In the map example below, the .map contains 6 variables defining their locations in the sample file: Phone, First_Name, Last_Name, City, State, and Zip. The syntax of the map file is variable name followed by location.width with each variable on its own line.  The .map file cannot have spaces in between each line, tabs or trailing spaces at the end of the file.

Phone 1.10
First_Name 11.6
Last_Name 17.8
City 25.15
State 40.2
Zip 42.5

Importing an ASCII Fone File

The import sample process supports importing a converted ASCII phone file.  This is useful for wave projects.  ASCII phone files must  have a .ASC extension in order to be recognized when uploaded.

Each ASCII file (.ASC)  needs to be accompanied by a header file (.HED, also known as a phone parameter file).  The name of the hed file must match the name of the actual ascii file; this is required.  For example, if your ASCII file is named SAMPLE.ASC, then your .HED file needs to be named SAMPLE.HED. If the .hed file name doesn’t  match the base name of your sample file, you will receive an error message.

Additionally you can include an existing FDF file as a map.  If one is uploaded, then the variables will be displayed on the screen.  The name of the fdf file must match the name of the actual file; this is required.  

NOTE: While the FDF file is optional, we recommend that you upload it for all ASCII file type imports.  This file is REQUIRED for all additional sample loads.  This is the original map of the sample variables and without, the fields of the additional sample could be put into the wrong locations.  Our best practice is to upload this file.

Additionally, if you are using markets, prior to uploading the HED file, modify the MARKET_LOCATION field to match the variable name of where the market is coming from in the sample.  If you use the data location, any additional sample loads will give you errors.

Example:

In the original HED file you may see MARKET_LOCATION = 201,20. 

Change this to: MARKET_LOCATION = <market variable name> where the name is the variable in the raw sample file.