Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
ananyaghosh
Creator III
Creator III

What is preceding load in qlikview?

Hi, Please give me an example.

4 Replies
maxgro
MVP
MVP

here you can find a detailed answer

Preceding Load

MK_QSL
MVP
MVP

Preceding Load

1) a Load which is followed by another load

2) absence of From or Resident keywords

3) If a result of any load being used in another load without From or Resident keywords is called as a preceding load

4) benefit is you can directly do some aggregation ....

Anonymous
Not applicable

Hi Sandip,

Preceding Load is a very powerful functionality in QlikView in transforming the data.

Preceding load can be a useful tool to simplify your data transformations.

Another Advantage of Preceding Load is that it allows you to use QlikView functions in the Load script.It allows you to define multiple transformations and calculations within one load script which would otherwise will need to be created using separate load and resident load statements.It takes input from the previous Select statement.

In normal load for some aggregation function like min, max, sum we can't use this function directly in load, so use of preceding load to calculate some field for max and min with group by we use preceding load .

Preceding Load is invoked by checking the “preceding load “while selecting the tables or written manually in script above Select statement.

Let us see how the script will look when  the “preceding Load” check box is not checked while selecting the table.

WithoutPreceding.png

Preceding Load not checked

Load Statement without Preceding Load

Customer:
SQL
SELECT [Customer Number]
    
Country,
    
City,
    
[Post Code]
    
[2-char code]
FROM Customer ;

You don't set a LOAD statement but you do a SQL SELECT statement, you are doing an implicit load, meaning you are pulling data from your datasource and pushing into memory.

Loading table without preceding load will not allow you to use QlikView functions.

Now let us check “Preceding load” and see how the load script changes and what advantages it brings.

Preceding.png

Load statement after checking “preceding load” check box

CustomerLocation:
LOAD
Country,
    
City,
    
text([Customer Number]) as [Customer Number],
    
[2-char code] & '_' & [Post Code] as GeoCodeKey;
SQL
SELECT [Customer Number]
    
Country,
    
City,
    
[Post Code]
    
[2-char code]
FROM Customer ;

In this script you can see that preceding load takes the input from the previous Select Statement. You can select all the columns in the Select statement but in Load statement you can select the ones you need. 

The LOAD statement is used in QlikView to do everything you need to do in order to extract, transform and load the data and build your data model at the same time. There are dozens of functions you can use that there are not allowed in SQL.

There can be multiple preceding loads stacked one on the top of other.

CustomerLocation:
LOAD
Country,
    
City,
    
text([Customer Number]) as [Customer Number],
    
[2-char code] & '_' & [Post Code] as GeoCodeKey;
LOAD
[Customer Number],
    
Country,
    
City,
    
[Post Code],
    
[2-char code];
SQL
SELECT [Customer Number],
    
Country,
    
City,
    
[Post Code],
    
[2-char code]
FROM Customer ;

http://community.qlik.com/blogs/qlikviewdesignblog/2013/03/04/preceding-load

http://qlikviewnotes.blogspot.co.at/2009/12/simplify-with-preceeding-load.html

http://www.quickintelligence.co.uk/preceding-load-qlikview/

Regards

Neetha