Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
This article contains information on how to use the “Split QVD Generation” template.
Content:
While QVD files are optimized for loading speed, it is possible to further improve loading time during reloads by splitting a QVD file into several smaller ones. This will allow you to use Qlik Sense Cloud's ability to perform parallel reloads.
The template uses two Qlik Sense applications. Demo examples of what these applications may look like are attached to this article.
This app should have a table containing the dimensional values to be used for the splitting. Add the dimension on which you want to base the QVD split as a dimension in the application's Master Items. To visualize the values, you may also add the dimension to a table on a sheet. When considering what dimension to base the data split on, it is a good idea to select a dimension that has evenly distributed values, since this will improve performance. Having the data unevenly split, where most of the data is loaded into just one of the QVDs, would have minimal performance improvements compared to not splitting the QVD.
The attached demo uses sample data from Snowflake (TPCH_SF10) and "Region" is used as the dimension on which to base the data split.
This is the application that produces the data for the split QVD files. It is important that you filter on the dimension used for splitting in the WHERE clause in the load script of this application, as highlighted below in the example taken from the attached demo application:
FROM "SNOWFLAKE_SAMPLE_DATA"."TPCH_SF10"."CUSTOMER","SNOWFLAKE_SAMPLE_DATA"."TPCH_SF10"."ORDERS","SNOWFLAKE_SAMPLE_DATA"."TPCH_SF10"."LINEITEM","SNOWFLAKE_SAMPLE_DATA"."TPCH_SF10"."REGION", "SNOWFLAKE_SAMPLE_DATA"."TPCH_SF10"."NATION","SNOWFLAKE_SAMPLE_DATA"."TPCH_SF10"."SUPPLIER"
where Year("O_ORDERDATE")=$(vYear) and Month("O_ORDERDATE")=$(vMonthNumber) and R_NAME = '$(vQVDName)' and "L_ORDERKEY"="O_ORDERKEY" and "C_CUSTKEY"="O_CUSTKEY" and "N_NATIONKEY"="C_NATIONKEY" and "N_REGIONKEY"="R_REGIONKEY" and "S_SUPPKEY"="L_SUPPKEY";
Once the applications have been set up, they can be used in the automation template. The template requires the configuration of two blocks:
If you wish to add debugging to the reloads you can add this after the “Wait For Reloads To Complete” block.
If you can’t identify the app that failed based on its id, use the "Get App Information" to retrieve the app name.
Note that automation logs are removed after 30 days. If you wish to keep older logs, then you must add blocks to write the failed reload logs to a cloud storage destination.
The information in this article is provided as-is and to be used at own discretion. Depending on tool(s) used, customization(s), and/or other factors ongoing support on the solution below may not be provided by Qlik Support.
What is missing here is the reload log files. Because the apps are deleted after the reload is complete (fail or not), we do not have the error log for the reloads should they fail. I had to disable the delete app block to understand why the reloads were failing. Is there anyway to generate and store the reload logs should they fail? @J_Lindberg
Thank you for the article, maybe a short video will help with the implementation? Thanks.
Hi @dyy ,
Here you can find instructions on how you can add error handling for the reload block: https://youtu.be/PXjfilz_TPw?t=1521
@dyy Article has been updated to include information on how to log failed reloads for debugging purposes.
@J_Lindberg This is powerful stuff, thanks for sharing and adding the log failed reloads for debugging. I was wondering for days why my update finished with no error message but some of my files weren't updated. I use parallel reload all the time in Qlikview using bat file however Qlik SaaS is new to me so this article is very helpful and it works! Thanks.