Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

robodeveloper
New Contributor

Using common script within multiple apps?

We have several apps used to extract and transform data into QVDs.     These apps contain the same script within their data load editors.   But this script now needs amending and I will have to repeat the process for each app in turn.  

Ideally, I would like to have just one piece of script which our ETL apps could call within their load editor (e.g. like a SAS autoexec file).   So when it came to maintaining the script I would only have to update in one place.

Is there a method to achieve this?

regards,

RB

1 Solution

Accepted Solutions
MVP
MVP

Re: Using common script within multiple apps?

Yes - you can use the $(include=.......) or better the $(must_include=.....)

https://help.qlik.com/en-US/sense/June2018/Subsystems/Hub/Content/Scripting/SystemVariables/Include....

Note: Whatever the documentation writers in Qlik might think.... The include is NOT a SYSTEM VARIABLE.

It is a directive that includes the contents of a file from the filesystem or an http (URL) address as if the text is a part of the script.

4 Replies
MVP
MVP

Re: Using common script within multiple apps?

Yes - you can use the $(include=.......) or better the $(must_include=.....)

https://help.qlik.com/en-US/sense/June2018/Subsystems/Hub/Content/Scripting/SystemVariables/Include....

Note: Whatever the documentation writers in Qlik might think.... The include is NOT a SYSTEM VARIABLE.

It is a directive that includes the contents of a file from the filesystem or an http (URL) address as if the text is a part of the script.

ruanhaese
Contributor

Re: Using common script within multiple apps?

I take it you have considered changing the process first?

There should only be 1 extract app (for each extraction process) for data in the Extraction process.

The transform should then be based on the QVD's extracted in the previous process.

The "E" & "T" (from ETL)  apps should be separated.

robodeveloper
New Contributor

Re: Using common script within multiple apps?

Thanks!

robodeveloper
New Contributor

Re: Using common script within multiple apps?

Each app is detecting a trigger file to commence ETL apps each for a given data stream.

I hadn't given much thought to the pro's and con's of splitting the E/T steps.    What would be your reasoning to split these out?   

Community Browser