Skip to main content Skip to complementary content

Select data in the data load editor

You can select which fields to load from files or database tables and which views of the data source you want by using Select data in the data load editor. As well as selecting fields, you can also rename fields in the dialog. When you have finished selecting fields, you can insert the generated script code into your script.

Some data sources, such as a CSV file, contain a single table, while other data sources, such as Microsoft Excel spreadsheets or databases can contain several tables.

Warning note

Do not add a table in Data load editor that has already been added as a scripted table with the same name and same columns in Data manager.

You open Select data by clicking ± on a data connection in the data load editor.

Selecting data from a database

When selecting data from a database, the data source can contain several tables.

Do the following:

  1. Click ± on a database connection in the data load editor.

    The select data dialog is displayed.

  2. Select a Database from the drop-down list.

    Some selection dialogs do not have a Database drop-down list because the database name is entered when the connection is configured.

  3. Select Owner of the database.

    The list of Tables is populated with views and tables available in the selected database.

    Some databases do not require that owners be specified in the data selection process.

  4. Select a table.
  5. Select the fields you want to load by checking the box next to each field you want to load.

    You can select all fields in the table by checking the box next to the table name.

    Tip noteYou can edit the field name by clicking on the existing field name and typing a new name. This may affect how the table is linked to other tables, as they are joined on common fields by default.
  6. Select additional tables if you want to add data from them.

    Information noteYou cannot rename fields in the data selection wizard at the same time as you filter for fields by searching. You have to erase the search string in the text box first.
    Information noteIt is not possible to rename two fields in the same table so that they have identical names.
  7. When you have finished your data selection, do the following:

    • Click Insert script.

      The data selection window is closed, and the LOAD /SELECT statements are inserted in the script in accordance with your selections.

See: Loading data from databases

Selecting data from a Microsoft Excel spreadsheet

When you select data from a Microsoft Excel spreadsheet, the file can contain several sheets. Each sheet is loaded as a separate table. An exception is if the sheet has the same field/column structure as another sheet or loaded table, in which case, the tables are concatenated.

See: Loading data from Microsoft Excel spreadsheets

Do the following:

  1. Click ± on the appropriate folder connection in the data load editor.

    The select data dialog is displayed

  2. Select the first sheet to select data from. You can select all fields in a sheet by checking the box next to the sheet name.

  3. Make sure you have the appropriate settings for the sheet:

    Field names Set to specify if the table contains Embedded field names or No field names. Typically in an Excel spreadsheet, the first row contains the embedded field names. If you select No field names, fields will be named A,B,C...

    Header size

    Set to the number of rows to omit as table header, typically rows that contain general information that is not in a columnar format.

  4. Select the fields you want to load by checking the box next to each field you want to load.

    Tip noteYou can edit the field name by clicking on the existing field name and typing a new name. This may affect how the table is linked to other tables, as they are joined by common fields by default.
  5. When you are done with your data selection, do the following:

    • Click Insert script.

      The data selection window is closed, and the LOAD /SELECT statements are inserted in the script in accordance with your selections.

Tip noteYou can also use a Microsoft Excel file as data source using the ODBC interface. In that case you need to use an ODBC data connection instead of a Folder data connection.

Selecting data from a table file

You can select data from a large number of data files:

  • Text files, where data in fields is separated by delimiters such as commas, tabs or semicolons (comma-separated variable (CSV) files).
  • HTML tables.
  • XML files.
  • KML files.
  • Qlik native QVD and QVX files.
  • Fixed record length files.
  • DIF files (Data Interchange Format).

Do the following:

  1. Click ± on the appropriate folder connection in the data load editor.

    The select data dialog is displayed

  2. Make sure that the appropriate file type is selected in File format.
  3. Make sure you have the appropriate settings for the file. File settings are different for different file types.

    See: Choosing settings for file types

  4. Select the fields you want to load by checking the box next to each field you want to load. You can also select all fields in a file by checking the box next to the sheet name.

    Tip noteYou can edit the field name by clicking on the existing field name and typing a new name. This may affect how the table is linked to other tables, as they are joined by common fields by default.
  5. When you are done with your data selection, do the following:

    • Click Insert script.

      The data selection window is closed, and the LOAD /SELECT statements are inserted in the script in accordance with your selections.

Choosing settings for file types

Delimited table files

These settings are validated for delimited table files, containing a single table where each record is separated by a line feed, and each field is separated with a delimited character, for example a CSV file.

File format

Set to Delimited or Fixed record.

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

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 the number of lines to omit as table header.

Character set

Set 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 end-of-file characters as part of the field value.

Fixed record data files

Fixed record data files contain a single table in which each record (row of data) contains a number of columns with a fixed field size, usually padded with spaces or tab characters.

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

  • Manually, enter the field break positions separated by commas 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.
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.

HTML files

HTML files can contain several tables. Qlik Sense interprets all elements with a <TABLE> tag as a table.

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

Character set

Set the character set used in the table file.

XML files

You can load data that is stored in XML format.

There are no specific file format settings for XML files.

QVD files

You can load data that is stored in QVD format. QVD is a native Qlik format and can only be written to and read by Qlik Sense or QlikView. The file format is optimized for speed when reading data from a Qlik Sense script but it is still very compact.

There are no specific file format settings for QVD files.

See: Working with QVD files

QVX files

You can load data that is stored in Qlik data eXchange (QVX) format. QVX files are created by custom connectors developed with the Qlik QVX SDK.

There are no specific file format settings for QVX files.

KML files

You can load map files that are stored in KML format, to use in map visualizations.

There are no specific file format settings for KML files.

See: Loading map data

Previewing scripts

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

Including LOAD statements

If Include LOAD statement is selected, SELECT statements are generated with preceding LOAD statements using the SELECT statements as input.

Information noteIf you rename fields in a table, a LOAD statement will be inserted automatically regardless of this setting.

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!