Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
saurau01
Contributor
Contributor

Serialize/Deserailize QVF to json using Python SSE

Hello,

I need to serialize and deserialize QVF to convert it to JSON and store in our git using Python SSE. Please help.

 

 

Labels (5)
6 Replies
AndreeHansson
Employee
Employee

Hi, is there any specific reason for you to use Python SSE?

We have an open source project that is designed specifically for this purpose: https://github.com/qlik-oss/corectl

Essentially it's a command line tool to interact with QVF content, and it has two commands especially useful in your case: corectl build and corectl unbuild, where the latter command takes a QVF and gives your a folder containing all JSON properties of all objects (dimensions, measures, sheets, etc.), you can then use corectl build command to use that folder to produce QVFs at a later time.

saurau01
Contributor
Contributor
Author

We tried unbuild it worked well, however while trying build, we get below error:

corectl build
Error: could not create/modify connection Invalid path: Invalid path (4 GENERIC INVALID PATH)
dxa
Employee
Employee

Hi there Saurau01, sorry for the late reply.
corectl can't necessarily retrieve all information needed for recreating connections as they might contain passwords and other sensitive information. I'm guessing this is the cause of your error.

You can modify the connection files from unbuild to circumvent this.

debdaz
Contributor
Contributor

Hi, Now we are able to perform both build & unbuild using corectl.

Till now we were connecting to engine of Qlik sense desktop to perform build & unbuild.

Now we are trying the same (build & unbuild) with Qlik Sense server but we are not sure how to pass the headers in corectl for NTLM authorization using userid & password to connect to engineAPI for build & unbuild.

Any help/clue?

 

dxa
Employee
Employee

I think you can do it in a couple of ways. Probably the easiest would be through "context login"

corectl context set myserver --engine https://url.to.server
corectl context login

 Or, if you've generated a JWT you can either create a context containing it or use it directly, I think the syntax is like this for headers (given that you have stored your JWT in environment variable, you can also just write it after bearer directly, but it's a bit harder to read):

corectl --headers "Authorization"="Bearer $JWT"

 Lastly, if the server is not behind a proxy, you can generate certificates on the Qlik Sense Enterprise on Windows, which you can put somewhere on you computer and use with --certificates flag:

corectl --certificates ./path/to/certs

 
Good luck, hope it helps!

sap001
Contributor
Contributor

what is the procedure for unbuild? I was trying but I am getting right path