Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Gowtham174
Creator
Creator

App Preload Qliksense

Hi All,

Based on the below link understood by using .net sdk we can store cache after preload the app before first user login.

https://help.qlik.com/en-US/sense-developer/February2019/Subsystems/NetSDKAPI/Content/Sense_NetSDKAP...

Do we need any services to connect this to different platform, if yes then please suggest.

Is there any solution to trigger the .net sdk in qliksense.

 

Thanks,

Gowtham

 

 

 

1 Solution

Accepted Solutions
Øystein_Kolsrud
Employee
Employee

I don't know if you saw it, but the source code for that cache warmer referred to in the developer help can be found here:

https://github.com/AptkQlik/PublicExamples/blob/master/AppPreload/AppPreload.cs

That file also contains a description of the principle behind the cache warming at the top of the file. That example uses direct connection to a desktop version though, and I assume you want to connect to a server instead. You will find examples for doing different types of connections here:

https://github.com/AptkQlik/PublicExamples

View solution in original post

14 Replies
Gowtham174
Creator
Creator
Author

I'm new to .Net sdk and how to implement this to qliksense server. can you please help me to implement by steps or any guide.

Levi_Turner
Employee
Employee

That ought to work, although I haven't done it.

In the past when I need a slim basic tool to do warming, I've used https://github.com/JoeBickley/CacheInitializer. Attached is a compiled version using the Qlik Sense November 2018 SDK. As for usage, it's pretty straight-forward. An example way of doing it would be.

C:\Temp\TelemetrySaturate\cacheinitiazer>CacheInitializer.exe --help
ConsoleApplication1 1.0.0.0
Copyright c 2015
-s, --server Required. URL to the server.
-a, --appname App to load (using app name)
-i, --appid App to load (using app ID)
-p, --proxy Virtual Proxy to use
-o, --objects (Default: False) cycle through all sheets and objects
-f, --field field to make selections in e.g Region
-v, --values values to select e.g "France","Germany","Spain"
--help Display this help screen.

C:\Temp\TelemetrySaturate\cacheinitiazer>CacheInitializer.exe -s https://servername -i $($app.id) -o
Øystein_Kolsrud
Employee
Employee

I don't know if you saw it, but the source code for that cache warmer referred to in the developer help can be found here:

https://github.com/AptkQlik/PublicExamples/blob/master/AppPreload/AppPreload.cs

That file also contains a description of the principle behind the cache warming at the top of the file. That example uses direct connection to a desktop version though, and I assume you want to connect to a server instead. You will find examples for doing different types of connections here:

https://github.com/AptkQlik/PublicExamples

sergio_loza
Partner - Contributor III
Partner - Contributor III

Levi this is awesome, thanks for compiling it for us!

 

I can see this being triggered with the external Program Task QRS API .  What would be great is if we could  chain the end of the app reload task to a an external program Task 

witty
Contributor III
Contributor III

Hi @user which QRS endpoint is doing this preloading?  - i was only able to see reload and not preload -  sadly in the file it looks like a "manual" browse of all selections possible and no reference on how to trigger this via the API https://github.com/AptkQlik/PublicExamples/blob/master/AppPreload/AppPreload.cs

 

Any Hints?

Levi_Turner
Employee
Employee

@witty : This is done via the Engine API, not the Repository API.

witty
Contributor III
Contributor III

@Levi_Turner is there a reason we cannot trigger this in an easy way by just calling an endpoint after we updated an app? Like why can i trigger a reload/publish via QRS/QPS but not a preload to index and improve speed? So lets say i have to write a new script to do this action - is there a utility class/function I can call in this API by just providing an app id?

https://help.qlik.com/en-US/sense-developer/June2019/APIs/EngineAPI/index.html

Additionally can you comment on these "Caches" if I use section access in the app - do i need to do one cache process per section access combination or is the cache valid for any section access "view" if I ran it as a user that as "*" or "admin" access to the app?

 

Mccutchan1
Contributor III
Contributor III

Hi Levi,

When using CacheInitializer how do I cycle through all the sheets and cache them? I notice -o defaults to false how do I set it to true? 

Thanks

McCutchan

Levi_Turner
Employee
Employee

Like this:

D:\Tools\CacheInitializer-master\CacheInitializer\bin\Debug>CacheInitializer.exe -s https://sense.company.com -a "Operations Monitor" -o
09:56:53 - Operations Monitor: Opening app
09:56:56 - Operations Monitor: App open
09:56:56 - Operations Monitor: Clearing Selections
09:56:56 - Operations Monitor: Getting sheets
09:56:56 - Operations Monitor: Number of sheets - 17, getting children
09:56:56 - Operations Monitor: Number of objects - 143, caching all objects
09:56:57 - Operations Monitor: Objects cached
09:56:57 - Operations Monitor: App cache completed
09:56:57 - Cache initialization complete. Total time: 00:00:07.1136044