Introduction
There are various ways to load data into a QlikView application. These are explained below with suitable examples.
Types
- Loading data from Excel file
- Inline load
- Buffer load
- Incremental load
- Binary load
- Add load
- Resident load
- Loading data from database
- Loading data from QVD files
- Loading data from generated data
- Partial Reload
Loading data from file
This method is very simple. It is known as the normal method of loading data into a QlikView application. We load data from many files, like Excel, CSV, Text files and so on. It can be done by creating ODBC and OLEDB and also connecting your database directly.
Example
Load A, B
FROM
[C:\filename.xls] (biff, embedded labels, table is Data$);
Inline Load
The second method is inline load. This method can define its own data to be loaded within a QlikView edit script. The inline data can be defined in the inline data wizard.
Example
LOAD * INLINE [
A
B
C
D
];
Buffer load
The buffer load can be used to create the QVD files automatically. The QVD files are always maintained in a user prefence location.
Example
Buffer select * FROM Filename. CSV;
Incremental load
The incremental load can be used to load only the new data. It also consists of changed records. It is very useful for a large database. It loads old data from QVD files and new records from databases and combine them into a single QVD.
Example
SQL SELECT PrimaryKey, X, Y FROM DB_TABLE
WHERE ModificationTime >= #$(LastExecTime)#
AND ModificationTime < #$(BeginningThisExecTime)#;
Concatenate LOAD PrimaryKey, X, Y FROM File.QVD;
STORE QV_Table INTO File.QVD;
Binary load
In a QlikView application, when data is loaded from one line then it is called a binary load. In a binary load the data model of the QVW file is copied into another QVW file.
Example
Binary (filepath:\file name.qvw);
Add load
Add load is used to concatenate the data from one table to another table.
Example
LOAD field name from filename.csv;
ADD LOAD field name from file name1.csv Where Not Exists(fieldname);
Resident load
In a resident load all the calculation and transformation can be done. In a resident load, data is loaded from an already loaded QlikView table.
Example
Table name:
Select field
From table;
Load field,
Resident table name;
Loading data from databaseThis method simply makes connectivity with ODBC and OLEDB and loads data from the database.
Example
Load Data from Database.
load * from sql statement;
Loading data from QVD files
The method is just the same as a load of data from an Excel file.
Example
Load A, B
FROM
[C:\filename.QVD] (biff, embedded labels, table is Data$);
Loading data from generated data
In this method we load data from generated data.
Example
Load
Recno() as Number,
Rand() as No
AutoGenerate(10);
Partial Reload
In a partial reload, I discussed how to load data in a QlikView application.
It loads only new data.
I discussed in my article
, How to load data from partial reload
Summary
So in this article there are multiple ways to load data in a QlikView application.