Book Image

QlikView: Advanced Data Visualization

By : Miguel Angel Garcia, Barry Harmsen, Stephen Redmond, Karl Pover
Book Image

QlikView: Advanced Data Visualization

By: Miguel Angel Garcia, Barry Harmsen, Stephen Redmond, Karl Pover

Overview of this book

QlikView is one of the most flexible and powerful business intelligence platforms around, and if you want to transform data into insights, it is one of the best options you have at hand. Use this Learning Path, to explore the many features of QlikView to realize the potential of your data and present it as impactful and engaging visualizations. Each chapter in this Learning Path starts with an understanding of a business requirement and its associated data model and then helps you create insightful analysis and data visualizations around it. You will look at problems that you might encounter while visualizing complex data insights using QlikView, and learn how to troubleshoot these and other not-so-common errors. This Learning Path contains real-world examples from a variety of business domains, such as sales, finance, marketing, and human resources. With all the knowledge that you gain from this Learning Path, you will have all the experience you need to implement your next QlikView project like a pro. This Learning Path includes content from the following Packt products: • QlikView for Developers by Miguel Ángel García, Barry Harmsen • Mastering QlikView by Stephen Redmond • Mastering QlikView Data Visualization by Karl Pover
Table of Contents (25 chapters)
QlikView: Advanced Data Visualization

Running an example execution

Running a session is actually quite straightforward, and a lot easier than having to craft the script by hand.

There are a couple of steps that we need to do before we can generate a test script:

  1. We need to open the target application in QlikView desktop and extract the layout information:

    This exports all of the information about the document, including all of the objects, into XML files that can be imported into the script generator. This is how the script generator finds out about sheets and objects that it can use.

  2. Copy the AjaxZfc URL for the application. We need to give this information to the script builder so that it knows how to connect to the application:

  3. Clear the existing log files from the QVS. These files will be in the ProgramData\QlikTech\QlikViewServer folder. Stop the QlikView Server Service and then archive or delete the Performance*.log, Audit*.log, Events*.log, and Sessions*.log files. When you restart the service, new ones will start to be created:


    Note that you should be careful not to delete the PGO files in the same folders—these are copies of the server's license information files.

  4. Start the Performance Monitor using the template that you configured earlier. Double-check that it starts to create content in the folder (for example, C:\PerfLogs\Admin\New Data Collector Set\QlikView Performance Monitor).

Once those steps have been completed, we can go ahead and create a script:

  1. Execute the script generator by running QlikViewTestScriptGeneratorGui.exe from the ScriptGenerator folder.

  2. There are some properties that we need to set on this page:



    QlikView version


    Document URL

    Paste the URL that you recorded earlier.

    Security settings

    Choose the right authentication mechanism for your QlikView server (more details discussed later).

    Concurrent users

    How many users you want to run concurrently.

    Iterations per user

    How many times each user will run through the scenario. If you set this to Infinite, you need to specify a Duration below.

    Ramp up

    What time should there be before all users are logged in. 1 means that all users start together.


    How long the test should be run for. If you set this to Infinite then you must set a number of Iterations per user above it.


    If you use NTLM, then you cannot use more than one concurrent user. This is because the NTLM option will execute under the profile of the user running the application and each concurrent user will therefore attempt to log in with the same credentials. QVS does not allow this so each concurrent user will actually end up killing each other's sessions.

    If you want to simulate more than one user, then you can turn on Header authentication in the QVWS configuration and make use of the userpw.txt file to add a list of users. The QVS will need to be in DMS mode to support this. Also bear in mind that you will need to have an appropriate number of licenses available to support the number of users that you want to test with.

  3. Save the document in the ScriptGenerator\SourceXMLs folder. Note that you should not use spaces or non-alphanumeric characters in the XML filename. It is a good idea to make the filename descriptive as you might use it again and again.

  4. Click the Scenario tab. Click the Browse button and navigate to the folder where you save the document layout information earlier. Save the template (it's always a good idea to save continually as you go along). Change the Timer Delay Min to 30 and the Max to 120:

    This setting specifies the range of delay between different actions. We should always allow an appropriate minimum to make sure that the application can update correctly after an action. The random variation between the minimum and maximum settings gives a simulation of user thinking time.

  5. By default, there are three default actions—open AccessPoint, open the document, and then a timer delay. Click on the green + button on the left-hand side of the bottom timer delay action to add a new action below it. Two new actions will be added—an unspecified Choose Action one and a timer delay containing the settings that we specified above. The Auto add timers checkbox means that a timer delay will be automatically added every time we add a new action.

  6. Build up a scenario by adding appropriate actions:

    Remember to keep saving as you go along.

  7. Click on the Execution tab. Click on Yes in answer to the Add to execution prompt. Expand the Settings option and click on Browse to select the JMeter path:

When you click on OK, you will be prompted on whether to save this setting permanently or not. You can click on OK in response to this message:

  1. Right-click on the script name and select Open in JMeter:

  2. Click on OK on OutputPopupForm. When JMeter opens, note the entries that have been created in the test plan by the script generator.

  3. Close JMeter. Back in the script generator, right-click on the script again and select Run from the menu. The Summary tab appears, indicating that the script is executing:

Once you have executed a test, you will want to analyze the results. The scalability tools come with a couple of QVW files to help you out here. There are a couple of steps that you need to go through to gather all the files together first:

  1. In the QVScriptGenTool_0_7 64Bit\Analyzer folder, there is a ZIP file called Extract the FolderTemplate folder out of the ZIP file and rename it to match the name of your analysis task—for example, SalesAnalysis. Within this folder, there are four subfolders that you need to populate with data:


    Data source


    These are the QVS event logs—Events_servername_*.log


    These are the JMeter execution logs that should be in QVScriptGenTool_0_7 64Bit\Analyzer\JMeterExecutions


    These are the CSV files created—SERVERNAME_Processes*.csv


    These are the QVS session logs—Sessions_servername_*.log

  2. Open the QVD Generator.qvw file using QlikView Desktop. Set the correct name for the subfolder that you have just created:

  3. Reload the document.

  4. Once the document has reloaded, manually edit the name of the server using the input fields in each row of the table:

  5. Once you have entered the data, click on the Create Meta-CSV button. You can then close the QVD Generator.

  6. Open the SC_Results – DemoTest.qvw file and save it as a new file with an appropriate name—for example, SC_Results – SalesAnalysis.qvw. Change the Folder Name variable as before and reload.

Now you can start to analyze your server's performance during the tests:

Because you can run multiple iterations of the test, with different parameters, you can use the tool to run comparisons to see changes. These can also be scheduled from the command line to run on a regular basis.


One thing that these JMeter scripts can be used for is a process called "warming the cache". If you have a very large QlikView document, it can take a long time to load into memory and create the user cache. For the first users to connect to the document in the morning, they may have a very poor experience while waiting for the document to open—they may even time out. Subsequent users will get the benefit of these user actions. However, if you have a scheduled task to execute a JMeter task, you can take the pain away from those first users because the cache will already be established for them when they get to work.