Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
We want to associate some custom metadata, such as "version", on an App in QVF format. For example, we have a QVF file that we import across different Tenants. We want to associate some kind of "version" like attribute or metadata to this QVF. Is there a mechanism that would allow this type of information to be included in the QVF? We don't want to use file name or the App description for this purpose.
We've tried adding information to the "attributes.cutom" property of an App, but it looks like this information is not retained when a QVF is exported and imported.
Does anyone have any experience associating some custom metadata or attributes that gets retained within the QVF?
I see what you are trying to achieve now.
PEEKing the values out of the load script should certainly be possible.
I wondered if there was a way to retrieve variable values using the same API, but variables don't seem to be there as an endpoint (though they are available in Qlik Automations, so it must be possible to get to them somehow).
I didn't find that functionality, sadly, but I did find this:
https://qlik.dev/apis/rest/apps/#%23%2Fentries%2Fv1%2Fapps%2F-appId%2Fdata%2Fmetadata-get
As this gives the table information for the app, you could create a metadata table within the app in the load script and perhaps have different fields as the headers, e.g. Version and then either tags or comments to hold the values.
This is not something I have tried (yet) but it looks like it might be possible.
If you give that a try, please let me know how you get on.
Cheers!
Steve
You could make use of variables. Simply set them in the load script:
Let vAppVersion = '0.1.2.3';
I tend to populate a number of variables, such as vLastLoadStart, vLastLoadEnd and vNoOfRows.
These do not appear in the UI by default, but you could have a text object that displays them on a sheet in each app.
Hope that helps,
Steve
Hi @stevedark,
Thanks for the information.
That would be OK if we need that type of information displayed on the Sheets. What we're looking for is something that can be queried by API, such as in the response body of GET /api/v1/apps/{appId}.
I guess if we have an agreed format, we could put the information in the load script as a comment, and retrieve the load script with GET /api/v1/apps/{appId}/scripts/{version}. Then we can parse the load script and match on the agreed format. This is a bit hacky, so something "first class" to the App/QVF is preferred, but this may be the only way to achieve what we're looking for.
I see what you are trying to achieve now.
PEEKing the values out of the load script should certainly be possible.
I wondered if there was a way to retrieve variable values using the same API, but variables don't seem to be there as an endpoint (though they are available in Qlik Automations, so it must be possible to get to them somehow).
I didn't find that functionality, sadly, but I did find this:
https://qlik.dev/apis/rest/apps/#%23%2Fentries%2Fv1%2Fapps%2F-appId%2Fdata%2Fmetadata-get
As this gives the table information for the app, you could create a metadata table within the app in the load script and perhaps have different fields as the headers, e.g. Version and then either tags or comments to hold the values.
This is not something I have tried (yet) but it looks like it might be possible.
If you give that a try, please let me know how you get on.
Cheers!
Steve
For others coming to this topic, the recommended approach in Qlik Cloud is to tag the item using the collections service with the relevant version. You will need to re-tag apps when they are moved between tenants, similar to as you would tag something if moving between repositories in git.
Hello @DaveChannon Thank for your response. I am trying to create the automation for version control backup of apps. I am planning to schedule backup apps with this automation every night. But this creates multiple .qvf backup files, even if there is no change in the app. I am trying to find some kind of trigger which will initiate my backup app to github automation only when there is some change in the app(frontend or backend). When I make change in the load script(backend), my modified dates changes. Is there a way to identify if there is any front change happened? thank you in advance!
Yes, you can follow an approach similar to what we use with the Qlik Cloud Monitoring Apps, using unbuilds of the app. You can see how this presents in git here: https://github.com/qlik-oss/qlik-cloud-reload-analyzer/pull/23/files
However - you cannot do this in application automation as the QPO connector does not have the capability to interrogate app objects.
Hello @DaveChannon Thank you for your response. I'll study the github shared above. But we need to create a simple version control backup automation. Since github don't understand if .qvf file has changed or not, it created multiple copies. But Json and txt file only gets verisoned when is some change. so there way using qlik automations to build app using json and txt file instead of .qvf file?
Or is there a better way to version apps with some version name which will happen automatically or when there is some trigger?
Let's say I have to build an automation that export apps to Github when they are published.
Or is there way to modify Publish option, so when I right clik on app , there is one option 'publish '. In that can I intregate a button 'backup to github with notes'?