Loading your data

Once you have named and opened your app, you will get a screen where Qlik Sense asks you to load your data.

Loading your data

The getting started dialog

When you have this option before you, you can load data in several different ways. The easiest way is to drag and drop a spreadsheet or a file onto Qlik Sense, or to click on the Quick data load command and select the file in a file browser, as shown in the following screenshot:

Loading your data

Dropping a file onto an app

This will open a file wizard where you can tweak the details of how the file should be loaded so that you get the data you want, as shown in the following screenshot:

Loading your data

The file wizard

You can specify file type, whether the file contains empty lines at the top (before the data starts), whether the first line contains the field names or not, and so on. Make sure you get all the settings right before you click on Load data.

Clicking on Load data will store your settings and load the data; if everything goes well, you will get the following dialog:

Loading your data

The success message, which is shown once data is loaded

At this stage, you can either start to edit the sheet or you can load additional tables.

Loading additional tables

It is very common that the data you want to analyze is stored in several different tables, for example:

  • One table for the orders (one row per order)
  • One table for the customers who placed the orders (one row per customer)
  • One table for the order lines (one row per order line)
  • One table for the products (one row per product)

In a normal database, there are rules about where different entities are stored. For instance, everything about the customers should be stored in the Customers table. If you need some information about a customer in another table, a unique customer identifier is stored in this table, which means that all the necessary data can be retrieved by a simple lookup in the Customers table.

For the previously discussed case, the Order Lines table will contain both the order ID and the product ID, and the Orders table will contain the customer ID. This way, all four tables are linked logically, as shown in the following screenshot:

Loading additional tables

A simple data model made from four tables

To obtain this data model in your app, you need to repeat the procedure for loading data that we had discussed previously for each additional table. You can either drag and drop a file onto Qlik Sense, or you can use the Quick data load command in the toolbar menu.

In the Quick data load process, you need to make sure that the key fields are named the same in all tables and that no other fields have the same name.

Loading additional tables

The Quick data load command

Either way, you will get a dialog asking you whether you want to add or replace data. You almost always want to add data. In this context, Replace data means that you remove all previously loaded data and replace it with the table you are about to load. These options are shown in the following screenshot:

Loading additional tables

This will take you to the familiar file wizard shown in the previous section, where you can define the file properties of the additional table.

Using Data load editor

On the screen where Qlik Sense asked you to load your data, there was a second option: Data load editor. Clicking on this option will open a new tab with a script editor, as shown in the following screenshot:

Using Data load editor

The Qlik Sense Data load editor

This editor is very similar to the QlikView script editor. It allows you to make very complex data transformations and basically load anything. However, as with all powerful tools, it is also easy to make mistakes. Use it with caution.

When you define your data using drag and drop or the Quick data load command, the data load sequence will be stored in the load script as one or several Load statements. This means that these can be edited in Data load editor if you want to tweak them after they have been created.

You can also create your script from scratch using Data load editor. If so, you must first create your data connections. These can be file folders, connections to regular databases, or connections to other data sources using other connectors. This is how you do it:

  1. Open Data load editor from the initial dialog of the menu in the toolbar.
    Using Data load editor

    The Data load editor command

    Tip

    Clicking on the icon to the right in the menu will open Data load editor in a new tab.

  2. Now you will have Data load editor open. To the right, you have the Data connections panel. If you click on the Create new connection button, you will open a menu where you can choose the connection type and then specify the properties of the connection in the following dialog:
    Using Data load editor

    Adding a data connection

Creating a database connection

If you want to create a database connection using Open Database Connectivity (ODBC), you should choose ODBC. This opens the ODBC connection dialog, where you can choose which data source to use:

Creating a database connection

The ODBC connections dialog

The data sources that you see are the ones defined in the Windows operating system, which means that if you do the development on a server, the list is limited to those defined by the server administrator.

Once you have created these connections, you will have them displayed in a list of data connections, as shown in the following screenshot:

Creating a database connection

The list of data connections

Each data connection has several icons: an icon to create a Load or a Select statement and a second one to edit the connection itself. In addition, database connections have a third icon that is used to create a Connect statement.

Hence, to create a Load statement, you should click on Creating a database connection and find the file that contains the table. This way, you can create a script in very much the same way as you would in QlikView if you are familiar with it.

The goal is to create a script that defines a logical, coherent data model that corresponds to the business situation. When you have created the script, you need to run it to load the data. This is done by clicking on the Load data button in the toolbar of Data load editor.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset