Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
chiragpatel
Contributor
Contributor

How to search the codebase (all apps and scripts)

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.

Labels (2)
4 Replies
kallnascimento
Partner - Contributor II
Partner - Contributor II

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:

powershell
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:

 
bash
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:

bash
grep -rn "ApiName1\|ApiName2\|ApiName3" ./scripts-folder

For documenting the impact analysis: Once you have your results, I would recommend exporting the matches to a file for traceability:

bash
grep -rn "DeprecatedApiName" ./scripts-folder > impact-analysis.txt

Hope 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!

Eduardo_Monteiro
Partner - Creator II
Partner - Creator II

Hi @chiragpatel 

You can use the REST API to perform it.

https://{tenant}.us.qlikcloud.com/api/v1/apps/{appId}/scripts 

aaa.png

https://{tenant}.us.qlikcloud.com/api/v1/apps/{appId}/scripts/{scriptId} 

bbb.pngThen 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

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP


 

@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

kallnascimento
Partner - Contributor II
Partner - Contributor II

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.