This is for my Windows Administrator friends! A demonstration of how you may use QlikView to execute and load data using Windows PowerShell.
If you are like me, you use QlikView not only to develop nice dashboards to share with others, but you also use QlikView to frequently perform quick ad-hoc analysis on different datasets. Sounds familiar? Great! So naturally you can understand that when I recently started playing with PowerShell it made sense to try to load some data into QlikView.
The demo application will use PowerShell to read:
- Application & System Event Logs
- All Services
- All running Processes
How I did it:
The approach I took is straight forward, I use QlikView’s ‘Execute’ command to call a PowerShell command which queries some objects and saves the results to a CSV-based file. That CSV-file is then read into QlikView for analyses.
The demo application is already loaded with some demo data which was run on my computer.
A friendly disclaimer:
I think this option is probably more suited for ad-hoc queries and quick analysis, so if you want to build a production-ready application, you may want to also consider other options such as the QlikView API.
Some potential troubleshooting:
Depending on your environment, you may run into the following:
Access denied: The PowerShell commands I am using should run for most users, however if you run into an issue you may want to consider running QlikView as an Administrator:
- Press and hold down the SHIFT key and right-click on the QlikView icon
- From the popup menu select “Run as Administrator” or “Run as a different user”
Execute flag: QlikView might prompt you with a Security Alert because you are using the ‘Execute’ command. You have two options:
- You can press on the “Override Security, Execute This Statement” button each time you reload the data, or
- You can enable QlikView to run ‘Execute’ statements without prompting you by going to the “Settings” tab on the Edit Script window and checking “Can Execute External Program”