Skip to main content Skip to complementary content

Selecting data from a delimited table file

You can load data from a delimited table file in formats such as CSV, TXT, TAB, PRN, MEM or SKV, or files with custom delimiter symbols. When you have selected fields, you can insert the script code required to load the fields into the script.

To start selecting data, do the following:

  1. Click ± on a folder data connection in the data load editor.
  2. Select file from the drop-down list of available files in the folder and click Select.

The selection dialog is displayed with Fields updated with preview data.

Setting file options

The preview data is formatted using settings derived from your file, but you may need to adjust the file options to suit your purpose:

File format

Set to Delimited or Fixed record.

When you make a selection, the select data dialog will adapt to the selected file format.

Field names Set to specify if the table contains Embedded field names or No field names.

Delimiter

Set the Delimiter character used in your table file.

Quoting

Set to specify how to handle quotes:

None = quote characters are not accepted

Standard = standard quoting (quotes can be used as first and last characters of a field value)

MSQ = modern style quoting (allowing multi-line content in fields)

Header size

Set to the number of lines to omit as table header.

Character set

Set to character set used in the table file.

Comment

Data files can contain comments between records, denoted by starting a line with one or more special characters, for example //.

Specify one or more characters to denote a comment line. Qlik Sense does not load lines starting with the character(s) specified here.

Ignore EOF Select Ignore EOF if your data contains EOF characters as part of field value.

Preview data is formatted according to the options you have set.

Selecting fields

Fields lists all fields available to select. You can do one of the following:

  • Select which fields to include using the checkbox next to each field name.
  • Select all fields by using the Select all fields checkbox.

Renaming fields

You can rename fields. This is particularly useful in the following two cases:

  • If you load two files containing a field with the same name, they will by default be linked and treated as one field in Qlik Sense. If you want to load them as separate fields, rename the fields so that they are different.
  • If you load two files containing a field that should be read as one field, but has different names in the respective files, you can rename them (in either file) to have identical names to load them as one field.

Do the following:

  • Click on the field header you want to rename, type the new name and press Enter.

The field is renamed, and the script preview is updated.

Information noteRenaming a field corresponds to using as in a field definition in a LOAD statement.

Previewing the script

The statements that will be inserted are displayed in the script preview, which you can choose to hide by clicking Preview script.

Inserting the script

When you have finished selecting fields and want to generate your LOAD/SELECT statements in the script, do the following:

  • Click Insert script.

The Select data from window is closed, and the LOAD statements are inserted in the script in accordance with your selections.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!