QlikView – Limiting Record Loads with the FIRST Prefix
Business Intelligence, QlikView
While developing a report, you may be loading thousands if not millions of records during the execution of your script. If you are making edits to your script, and require a reload of the data to test your script changes, you may find yourself spending more time waiting than actually developing.
If a sample of the data is sufficient for testing purposes, you can limit the number of records returned by using the FIRST prefix.
The FIRST prefix is placed directly before the LOAD statement in the script followed by the number of records you wish to load. For example:
[Main Table]: FIRST 10000 LOAD * FROM [1000000 Records.xlsx] ooxml, embedded labels, table is Sheet1);
In the above example, reloading the script will only load at most 10,000 records from any given table. If a table is encountered that has less than 10,000 records, then the full table will be loaded.
When your development period is complete, you can either comment out the FIRST prefix or remove it entirely from the script.