Import a delimited text file

Import a delimited text file to Analytics for analysis using a variety of different tools.

How it works

You use the Data Definition Wizard to select one or more delimited text files and import the data to Analytics. The imported data creates one or more new Analytics tables and associated data files (.fil). Each imported delimited text file creates a separate Analytics table.

The Analytics data file contains a copy of the delimited data that is completely separate from the original delimited text file.

You can import delimited text files located on your local computer or on a network drive. Users of Analytics Exchange can also access delimited text files located on an Analytics Server.

Import a single file or multiple files

You have the option of importing a single delimited text file or multiple files in a single operation. The import process differs somewhat, depending on which option you use:

  • single file you have the option of manually defining both file-level and field-level properties during the import process
  • multiple files you can manually define only file-level properties during the import process. Analytics automatically defines field-level properties and no manual definition is possible during the import

    For example, during the import of multiple files, you cannot:

    • specify the data type of fields
    • selectively exclude fields from the import

    Once the data is in Analytics, you can make any necessary adjustments to the data definition in the Table Layout dialog box.

Combine multiple files

After you import multiple delimited text files into individual Analytics tables you might want to combine them into a single Analytics table. For example, you could combine the data from twelve monthly tables into a single annual table containing all the data. You can combine the files only after you have imported them into individual Analytics tables.

For information about combining multiple Analytics tables, see Appending tables.

Tip

To reduce labor, try combining the multiple tables first before making any required adjustments to the data definition in the new combined table.

The structure of delimited text files

Delimited text files typically have a .txt or .csv file extension, although other file extensions are possible. Delimited text files are often used to import data from spreadsheet or database applications into Analytics. Each spreadsheet or database row becomes a row in the delimited text file, with each row or record separated by a line separator. The valid line separators are:

  • CR carriage-return
  • LF line-feed
  • CRLF carriage-return line-feed (the standard DOS/Windows character sequence)

Field separator character

Fields in each record in the delimited text file are separated by a field separator character. There are three main types of delimited text file, based on the field separator character they use:

  • Comma separated values (.csv) – Commas are used to delimit the fields in each record.
  • Tab separated values – Tabs are used to delimit the fields in each record.
  • Text files (.txt) – Commas, tabs, or another field separator character are used to delimit the fields in each record. Other common field separator characters are spaces, pipes ( | ), and semicolons ( ; ).

Text qualifier character

If a field separator character is used, a text qualifier character is also used to enclose character field values and isolate them from field separators. Common text qualifier characters are double (" ") or single (' ') quotation marks.

For example, if a comma is the field separator character, enclosing the value $1,000 in text qualifiers ("$1,000") ensures that the value is interpreted as a single value and not as two values ($1 and 000).

Example of a delimited text file

The example below shows the first four rows in a delimited text file.

  • The first row contains the field names.
  • The field separator is a comma. Each row includes seven fields separated by commas.
  • The text qualifiers are double quotation marks. The last field includes a text qualifier, so that the comma in the dollar value is not interpreted as a field separator.
First_Name,Last_Name,CardNum,EmpNo,HireDate,Salary,Bonus_2011
Lila,Remlawi,8590122497663807,000008,12/28/2007,52750,"$1,405.40"
Vladimir,Alexov,8590122281964011,000060,10/5/2007,41250,"$4,557.43"
Alex,Williams,8590124253621744,000104,8/12/2010,40175,"$7,460.02"

How overwriting works

If you import delimited data and create a new Analytics table that has the same name as an existing table in the Analytics project you overwrite the existing table.

Import a single delimited text file

Import a single delimited text file to create a new Analytics table. You have the option of manually defining both file-level and field-level properties during the import process.

Import multiple delimited text files

In a single operation, import multiple delimited text files. Once imported to an Analytics project, each delimited file becomes a separate Analytics table.

You can manually define only file-level properties during the import process. Analytics automatically defines field-level properties and no manual definition is possible during the import.

Once the data is in Analytics, you can make any necessary adjustments to the data definition in the Table Layout dialog box.