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

Announcements
Streamlining user types in Qlik Cloud capacity-based subscriptions: Read the Details
cancel
Showing results for 
Search instead for 
Did you mean: 
coleturegroup
Creator
Creator

Qlik Sense: How do we prepare script using the Store statement to save data with a QVS extension to a defined data connection on the server?

The documentation is not very clear on this specific request.

Creating QVS files

Create QVS files in a text editor outside of Qlik Cloud. Load script history can also be downloaded as QVS files.

Do the following:

  1. Create a block of load script in an app or script.

    Creating your load script in an app or script allows you to test the script first before adding it to a QVS file.

    Alternatively, find a block of load script you want to reuse.

  2. In a text editor, copy and paste the block of load script you want to reuse.

  3. Save the load script as a file with the QVS extension.

You can now upload the QVS file to Qlik Cloud or a web storage provider.

Example:

The App will consume the data daily needed in the proper script format then store it to a data connection.

For Example: 

 Comment Field [Field1]   With "Dimension | A note that describes field contents ";

Store QVS_1 into [lib://QVS_Files/Automation/Generate_Data.qvs]) (txt,delimiter is ';');

Then all Apps that need to load this script daily via:  Must_Include statement. 

What am I missing here?

Labels (4)
11 Replies
marcus_sommer

It's a misinterpretation that a qvs-file is mandatory a pure Qlik script - else it's just a file-extension for a txt-file. Because of the fact that Qlik used quite old windows libraries for this feature there aren't many customizing options like enabling/disabling header and/or quote-handling ... 

Nevertheless these files could be applied as direct script - if they are appropriate prepared. This means the rows must contain valid code like:

set var = abc;

mostly created by concatenating the wanted content before assigning them to a rows/columns. This includes also the header which might be set to:

REM abc;

It becomes more difficult if there are any quotes includes because it will lead to an extra wrapping quoting but with some efforts and advanced scripting to include further quotes and comments it should be possible to create longer and complex scripts.

Like already hinted from Rob there are surely more simple ways - from a technically point of view as well as from an administrative one especially if a centralized logic should be applied. It's easily done with a mapping - and such mapping might be applied per include-variables.

And such includes-variables may contain other includes which also contain includes ... respectively they could be nested with any conditions. This could lead to a complete automation for scripts with a starting- and ending include-variable which control per layer + path + name which interpretation variables, connections ... and cleaning ... 

coleturegroup
Creator
Creator
Author

Thanks team