Have you ever had an application that takes a long time to reload and you dread making changes to the script because that would require you to wait until the reload is complete to make sure your changes are working correctly?  Well QlikView and Qlik Sense both provide options that allow you to test your script without waiting for the entire reload to complete – Limited Load and the First prefix.

 

QlikView and Qlik Sense have Debug capabilities that allow you to do a Limited Load.  With each product, you can enter the maximum number of records that each Load and Select statement can load.  This reduces the execution time of the reload but still lets you to test that the script runs properly.  Limited load can be very useful when the data sources are large or when you are testing with live data and want to keep the execution time low.

 

In QlikView and Qlik Sense, you can access the Debug window from the script editor.  In QlikView, you can find it in the File menu or on the toolbar.

 

QV toolbar.png

 

QV menu.png

 

The Debug window looks like the image below.  You can check the Limited Load checkbox and enter the maximum number of records you want loaded with each Load and Select statement.

 

QV debug windoe.png

 

In Qlik Sense, you can also access the Debug panel from the Data Load Editor.

 

QS toolbar.png

 

Clicking on the Debug icon opens the Debug panel at the bottom of the page.  You can check the Limited Load checkbox and then enter the maximum number of records you want loaded with each Load and Select statement.

 

QS debug window.png

 

Another option that can be used to reduce the number of records loaded is the First prefix.  This can also be used with a Load or Select statement to set the maximum number of records that are loaded.  The difference between the Limited Load and the First prefix is that the Limited Load will apply to all Load and Select statements in the script whereas the First prefix is manually added to each Load or Select statement that it should apply to.  For example, I could run the script below to load only 10 customers from the Customers QVD.

 

script.png

 

The First prefix can be written as it is above or with parenthesis like this: First (10) LOAD.  If there are many Load and Select statements in the script, a Limited Load may be easier to use but if there are only a few Load/Select statements or if there is one data source in particular that has a lot of records, then the FIRST prefix may work best.

 

Keep in mind when using Limited Load or the First prefix that all the data may not be loaded and you may find that visualizations are not showing data or that selections are not providing the expected result.  This is really noticeable if you do a Limited Load with only a few records like 5 or 10.  When using Limited Load or First, the data that is loaded may not be associated so you may end up with tables in the data model with disconnected data.  That is ok, once you do a full reload, everything will look as you expect.

 

Limited Load and the First prefix both can reduce the execution time of the reload script which can be helpful when you want to just test a script or when you are testing with a live data source.  There are times when you need to load all the data in order to ensure that the script logic is working – it all depends on the specific application - but it is good to know when working with large data sources that there are options that can reduce the reload time.

 

Thanks,

Jennell