If you're using Vizlib Writeback Table or Vizlib Input Form you want your reloads to be optimized and as quick as possible.
If your app reloads time is longer than 30 seconds you might want to try working with binary loads to improve the reload time. For an overview of the Binary Load structure please see the Qlik Sense article here. You can find the full Qlik Sense reference article for binary statements here.
TABLE OF CONTENTS
- Binary Loads - Benefits
- How to create a secure Binary load
- How to convert a Writeback app to use Binary load
- Binary Load vs. Partial Reload - Comparison
Binary Loads - Benefits
Binary loads can improve speed and performance, which will help you work with your data more effectively. This is because every time you perform a writeback operation, a reload operation is also required. Binary loads will speed up the reload process, which is where the improvement in performance can be measured.
Note on Reload Errors: If you do encounter a Reload Error when using Vizlib Writeback Table, please check our Troubleshooting guide here.
How to create a secure Binary load
Simply by using a Folder Data Connection which points directly to one app. Creating a data connection to the working directory is not secure since it exposes all the apps in the environment.
Creating one Data Connection per Data Model, provides a granularity fine enough to easily manage who has access to which Data Model. The Data Model app can then be published in a stream that is only available to the Data Team and refreshed using the standard task management, and the Data Connection gives access to the Data Model app, without having to give access to the app itself.
Moreover, thanks to Qlik Sense Enterprise architecture, the app will be synced automatically to all nodes of the cluster.
- Create a folder Data Connection. It does not matter which folder is configured at first into the hub, it will be changed.
- In the QMC, edit the Data Connection just created and change the “folder” by the path to the app (inside the working directory. e.g. D:\Apps default working directory is C:\ProgramData\Qlik\Sense\Apps) Figure 1: Binary load data connection for the app with id 193dc96e-0f97-4184-aa76-1a2c08853f4f
- Using the security rules, give access to the Data Connection to the appropriate users.
- Use the following binary load in every app based on this Data Model. Important note there is no file specified, there is no need to as the Data Connection already contains it.
In Qlik Sense, the binary statement loads data from another Qlik Sense app, including section access data. It must be placed at the very beginning of the script, and only one binary statement per script is permitted.
Binary [lib://Data Model - Example];
How to convert a Writeback app to use Binary load
Converting a Writeback app to use Binary load is simple. What you need to do:
- Is duplicate the application (writeback app) and change the name to something with Binary.
- Remove all the script in the binary app that is related to loading the writeback data or doing an action depending on changes in the writeback data e.g. setting variables values, transformations.
- Setup a secured data connection to the binary app
- Publish the binary app and modify the reload task of the writeback app to reload the binary app instead.
- In the writeback app add the binary statement (e.g. Binary [lib://Data Model - Example];) to the very beginning of the script.
- Do the opposite of point 2, remove all the script that is not related to loading the writeback that is being loaded through the binary app.
- Done! Now when doing writebacks the reloads should be much quicker.
Figure 2: Loop & reduce demo app data model.
If you want to see how it's configured in an existing application, please check out the Finance Adjustments demo app here or the demo applications attached to the Loop and reduce article.
Binary Load vs. Partial Reload - Comparison
Partial reload can sometimes be used as an alternative for app reloads, as it can match binary load for speed. We've included a short comparison here.
Binary Load (Recommended)
- Super quick
- Easy to debug, standard debugging in the Data load editor
- All script functions are available
- Section Access is transfer from the binary app if it's secured with section access.
- The application needs to be split in two, one for binary data and one for writeback data. (see How to convert a Writeback app to use Binary load)
- Requires secured data connection (see How to create a secure Binary load)
- Requires changes to the load script because not all script functions are supported during partial reload.
- Tables that are not loaded during the partial reload are not available during the partial reload. This means that transformations and lookup will break the reload.
- An if-statement with Not IsPartialReload() needs to be wrapped around code that should not be executed
- Starting a partial reload is currently only be supported using the Qlik Engine JSON API. This makes it harder to develop since you can not start a partial reload from the Data load editor.
- Debugging partial reloads when they fail requires a review of log files, which is more difficult than being triggered from the Data load editor.