Skip to main content Skip to complementary content

Selecting data from a fixed record table file

You can select data from fixed record data files where each record (row of data) contains a number of columns with a fixed field size, usually padded with spaces or tab characters.

Example: Fixed record table file

Item      Id         Price        
Watch     001        2.75   
Ball      002        3.25

To select data from a fixed record file, do the following:

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

    Select data from is displayed with Fields updated with preview data.

  3. Set File format to Fixed record.

    The preview data will adapt to the fixed record format.

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:

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

Header size

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

Character set

Set to the character set used in the table file.

Tab size Set to the number of spaces that one Tab character represents in the table file.
Record line size

Set to the number of lines that one record spans in the table file. Default is 1.

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

Setting field break positions

You can set the field break positions in two different ways:

  • Enter the field break positions separated by commas manually in Field break positions. Each position marks the start of a field.

    Example: 1,12,24

  • Enable Field breaks to edit field break positions interactively in the field data preview. Field break positions is updated with the selected positions. You can:
    • Click in the field data preview to insert a field break.

    • Click on a field break to delete it.
    • Drag a field break to move it.

Selecting fields

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

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

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 LOADS 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 – please let us know!