Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Many of us likely know that after developing a Qlik Sense app, documentation needs to be created to deploy our analysis to production. This process is time-consuming, often requiring several days to produce what feels like just a "piece of paper". Another issue is that documentation is often made using standard templates, leading to materials that aren't complete and can be hard to comprehend. Documentation can be mandatory for both regulatory and operational reasons. Following the idea of “working smarter,” I want to automate this process using DocuGen with Qlik Application Automation (QAA). This approach can save us valuable time, allow us to transfer use cases to production faster, and provide documentation that is both thorough and easy to read.
It all started with this simple idea and a first prototype, which I built in QAA. Various Qlik Cloud Services blocks are used to extract the relevant metadata from the individual app (e.g. table definitions, sheets and visualizations, variables, measures and dimensions, etc.). This data is then stored in variables and once all the information has been collected it gets passed into a “Custom Code” block. This block uses Python 3.11 and creates a dynamic HTML file without external references. This means that the created HTML file remains transportable and does not require any external resources, as it contains all the necessary functions itself. Finally, the created HTML file is saved to MS Sharepoint.
This approach enables us to produce standardized documentation significantly more quickly on a daily basis, reducing the time required from an estimated 3 to 5 days to approximately 30 minutes. In my day-to-day job as a BI Specialist, I am now able to transfer analysis prototypes to production much faster for my customers and deliver added value for the business departments even faster. I think many other people in similar roles like me face the same challenge. This is the reason why I created a community project out of this idea together with Dennis Jaskowiak (Qlik PreSales). We started to extend the documentation with more functionalities, generalized the design of the documentation and reworked the code. In this article, we would like to share the project and its content with the Qlik Community.
The archive consists of only 4 files:
To import the QAA you need the DocuGen v(x).json file. This file contains the exported QAA workspace.
The "code" folder contains the code segments used if you want to customise the code for your needs.
custom_code_block.py: This file contains the code that we use in the "Custom Code"
blog in the automation.
used_css.css: This file contains the CSS definition that we use in the "Variable - vCSS"
blog in the automation and imports the style description for our HTML file. The definition is not minified in this file.
used_js.js: This file contains the Java scripts that we use in our Python script (custom_code_block.py at the very end). The JavaScript is implemented in the Python code (last <script></script>
section). It is important that '{'
and '}'
are replaced with '{{'
and '}}'
so that they are not evaluated in Python.
“Connection is linked”
you can use it by clicking on your created connection. The connection tab should now change its colour from red to black.“Variable – vNumber Format”
from 'de'
to 'us'
. It’s the second block of the automation.
When you click on “Run” the automation gets executed. By default, the automation has configured “Run Mode: Manual”. It requires a few inputs for processing:
If you want to run the automation triggered (e.g. by REST call) it needs to me modified. We will post an example later to showcase this option.
This list showcases what DocuGen covers:
General app information:
Data model:
Measures:
Dimensions:
Variables:
Sheets & Visualizations:
Load Script:
This is it for now. I hope this community project can help you automate and reduce the time you spend on documentation. On the bottom of that article, you will find the necessary files. The current version of the files will be hosted on GitHub.
Link to GitHub : LINK
A special thanks to Emil Koslowski (Product Manager Qlik Application Automation) for his invaluable support with various Qlik Application Automation questions. Your efforts have been instrumental in shaping a robust solution. Additionally, a big shoutout to Dennis Jaskowiak (PreSales Qlik) for his genuine enthusiasm for the idea, as well as his mentorship and unwavering support throughout the development - your guidance has been truly instrumental. Thank you!
This project has been created by Prodromos Chatziagorakis (Volkswagen Financial Services) & Dennis Jaskowiak (Qlik).
re: "Finally, the created HTML file is saved to MS Sharepoint." If a Qlik consumer does not have SharePoint at their place of work, where else can these files be saved? And would it change these documentation steps at all other than platform chosen to save docs to?
I have to say, this is one of the most impressive automation projects I've come across. It's incredibly practical, especially for sharing documentation with business partners or team members who may not be as familiar with your Qlik apps. Thank you for this!
This is looking awesome. I am taking it on a test immediately. Thank you for showing us the art of the possible with app automation.
@Mandy151 : MS SharePoint is just the utilized platform. Qlik Application Automation offers a wide selection of connectors for exporting the generated html file. Some examples are AWS S3 Buckets, MS OneDrive, DropBox, etc. Changing this last step does not affect the rest of the automation workflow. This is the advantage of the modular design of DocuGen.
@JonCarpenter Thank you for wonderful comment! It is a great deal coming from a Qlik Luminary.
@sergeyko Thank you! I hope you enjoy using it. If you find any difficulties, please us know!
excelent work @pchatziag
The article has been updated to include a link to a YouTube video made by Dennis Jaskowiak. In this video, Dennis shows how to use DocuGen, takes us through the document that was created in the example, and shares some behind-the-scenes information about how the automation works and the logic behind it.
@QFabian Thank you for your kind comment.
Excellent work @pchatziag
My suggestion- This could be good replacement of QSDA Pro if this enhance further by incorporating additional features to identify quality issues of the data model or visualisation flags. This is something missing I feel.
#DocuGen #QSDA Pro #QliksenseCloud
@pchatziag
This is very cool! Low effort, high value documentation. It also allowed me to quickly see what elements of an app could be improved with better descriptions.
I'd really like if there was an free text input box in the beginning for some introductory business context. That would need a bit more space than the app description, and potentially with detail not every end user would need to see.
Thank you for sharing!
Any plan to get lineage information like source tables and colums for each measure and dimension ?
@EmmaMcAlister Thank you for your suggestion. This is a nice idea. I will consider it for future development. If this is a very important feature that you need, you could already do that by adding your preformatted text directly in the html document and utilizing the existing css rules.
@PabloLabbeImaps Including lineage information is on our bucket list. This is a meaningful addition to the technical documentation. Thank you for your comment.