Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Esteemed colleagues.
Does anyone know of a way to perform a search on the codebase?
I could go into every file and use CTRL + F or something, but is there a faster way? I want to do an impact analysis of an upcoming Qlik change that will deprecate some API names.
Thanks in advance.
Great question - and an important one before any deprecation rollout!
Since we are working in a Qlik environment, there is no native global search across all app scripts from a single place, but here are the most practical approaches depending on how your environment is set up:
If you are on Qlik Cloud: The most reliable approach is to use the Qlik Cloud REST API to pull the load scripts from all apps programmatically, save them locally, and then run a search across those files. Once you have them locally, VS Code (Ctrl+Shift+F) or a simple grep will find every reference in seconds.
If you are on Qlik Sense Enterprise on Windows (QSEoW): Qlik app files (.qvf) are actually ZIP archives under the hood. You can export the apps via QMC, rename each .qvf to .zip, extract it, and search the script files inside. Alternatively, tools like Qlik Scripting Tools can help automate this extraction across multiple apps.
If you are on Qlik Sense Enterprise on Windows (QSEoW):
A good option for this use case is Butler Spyglass, an open source tool specifically designed to extract load scripts from all apps in a Qlik Sense Enterprise environment.
It connects to your Qlik Sense server via the Engine and Repository APIs, iterates over all apps, and saves each app's load script as an individual .qvs file on disk. Once you have those files locally, you can search across all of them at once using a simple PowerShell command:
Get-ChildItem -Recurse -Path ".\out\script\" -Include "*.qvs" | Select-String -Pattern "DeprecatedApiName"
If your scripts are versioned in Git: This is by far the fastest option if it applies to you:
git grep "DeprecatedApiName"This searches across every file in the repository instantly and shows file names and line numbers.
If you need to check multiple API names at once:
grep -rn "ApiName1\|ApiName2\|ApiName3" ./scripts-folderFor documenting the impact analysis: Once you have your results, I would recommend exporting the matches to a file for traceability:
grep -rn "DeprecatedApiName" ./scripts-folder > impact-analysis.txtHope this helps with the migration planning. If anyone has already gone through a similar API deprecation in Qlik and has a script for the extraction step, it would be great to share it here!
Hi @chiragpatel
You can use the REST API to perform it.
https://{tenant}.us.qlikcloud.com/api/v1/apps/{appId}/scripts
https://{tenant}.us.qlikcloud.com/api/v1/apps/{appId}/scripts/{scriptId}
Then you will need to find a way to automate it.
Regards,
Eduardo Monteiro - Senior Support Engineer @ IPC Global
Follow me on my LinkedIn | Know IPC Global at ipc-global.com
@kallnascimento "Qlik app files (.qvf) are actually ZIP archives under the hood. You can export the apps via QMC, rename each .qvf to .zip, extract it,"
That's intriguing. I tried unzipping an export qvf but got an "invalid" error message. Can you tell me more about this? Or how you've made it work?
-Rob
You are correct, it does not work nowadays.
Another method for QSEoW is using Butler Spyglass. It extracts: Data Connections, Linages and Scripts.
So, you can open the script QVS by text editors.
Butler Spyglass is an open-source project which can be found at GitHub.