5.
Resident Load
vs
Preceding Load
5.0 Chapter Goals
Understanding Resident Load
Understanding Preceding Load
5.0 Chapter Goals Where vs. Having Clause
Having Clause in QlikView
Challenge
Solution
5.1: Understanding Script Execution
• T-Shape Execution:
Left-to-Right
Top-to-Bottom
• Statement execution and not line-by-line execution
• No logical division for tabs
• Preceding Load: Breaks the Top-to-Bottom rule
5.2: Understanding Resident Load
Script
Functionality
Drop Table
Previously
and/or
Loaded Table
NoConcatenate
Resident Load
Used Case:
Order By Each Resident
Load creates a
Crosstable new Instance
Joins
Persistent
Table
5.2: Understanding Resident Load
Demo – Resident Load table
• Order Table has incorrect Courier Website format
• Shipped field has {-1, 0} but users need to have {Yes, No} to filter & search
5.3: Understanding Preceding Load
Script
Functionality
Doesn’t
support Loads data
CrossTable from the
and Joins Cache
etc.
Preceding Input can be
Calculation
Select and
in one place Load Load
Field No From
Hoisting and Qualifier
compact and Table
Expressions Name
Less
memory
5.5: Difference between WHERE and HAVING clause
Demo – WHERE vs. HAVING clause
• A WHERE clause is used is filter records from a result. The filter occurs before any
groupings are made
SELECT COUNT(SalesOrderID)
FROM Sales.SalesOrderDetail
WHERE UnitPrice > 200
• A HAVING clause is used to filter values from a group
SELECT SalesOrderID,
SUM(UnitPrice * OrderQty) AS TotalPrice
FROM Sales.SalesOrderDetail
GROUP BY SalesOrderID
HAVING SalesOrderID > 50000
5.6: How to implement HAVING clause in QlikView
Demo – HAVING clause in QlikView
• There is NO HAVING clause in QlikView
• Preceding Load with WHERE clause can be used as HAVING clause
5.7: Challenge
Challenge:
5.7: You have been provided with five QVD files (Orders_YYYYMMDD), QVW file and the script. After
reloading the script we see Synthetic Table with Synthetic Keys instead we wanted to perform auto
concatenation of all the Order Tables. Please go ahead and correct the script which generates one Order
table after reloading. Also, add a new field which shows the file name for each of the QVD files loaded.
Rules:
• You MUST use the wildcard load as shown in the script [Orders_2017*]
• You can’t use forced concatenation on individual table
• You MUST create the %Key_RequireDate either in Preceding Load or Resident Load ONLY
5.8: Solution – Resident Load vs Preceding Load
Solution: