Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Customers, Partners & Luminaries only: You're invited to a Data Analytics Roadmap session. Read More
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Partner
Partner

How to get the streams custom properties in script?

Hello all,

 

I have set a few custom properties on the streams (as of now 5). Some are purely technical, but 3 of them are actually business items that have a huge importance for us.

I try now to retrieve the value through script and I'm totally stucked. Any idea?

Best regards,

Simon

Bi Consultant (Dataviz & Dataprep) @ Business & Decision
Labels (2)
10 Replies
Highlighted
Contributor II
Contributor II

Good morning,

 

I have the same need. Did you found a way to access the stream properties from your loading script?

Highlighted
Specialist
Specialist

Hi @ylegrand 

What properties are you talking about? Can these special properties be stored at a DataBase so the script can load them; if it is imperative to retrieve these QlikSense Server' Stream properties, perhaps you could try connecting to its back-end database, although this option is not advisable.

Hope this helps,

Arnaldo Sandoval
A journey of a thousand miles begins with a single step.
Highlighted
Contributor II
Contributor II

Hello,

Thanks for your answer.

In my reports, the loading scripts are already based on an "environnement" variable (with possible values "dev" / "uat" / "prod"), to use the correct databases, QVD, etc.

My initial wished was to :

  • add and fill a custom property "environment" on my streams with the same values
  • let the report setting the environnement variable directly by reading it's stream custom property live, without having to edit the load script every time 

 

Your suggestion to access the backoffice database sounds like a good idea (I now have to search how to access 🙂 ). Can you just be more specific on why it is not recommended? Is there any risk ? 

Highlighted
Partner
Partner

Hello @ylegrand 

No, i haven't found any solution right now to get the stream custom properties.

However, I posted this idea, asking for more data available through the rest monitoring connections

https://community.qlik.com/t5/Ideas/Qlik-sense-monitoring-I-would-like-to-query-ALL-the-data-e-g-the...

Best regards,

Simon

Bi Consultant (Dataviz & Dataprep) @ Business & Decision
Highlighted
Specialist
Specialist

@ylegrand 

I understand your challenge, one question are you guys developing the Qlik Applications, e.g. Scripts + UI on the same server? because I never had this problem, we have minimum 2 environments: Development and Production; the Data Connections are named exactly the same at both environment, when you import your developed application into the production server, Qlik automatically handle the Data Connections as long as they share the same name.

You may also consider introducing Script files (QVS); implementing one of them as Config.QVS, this file should be located in a common server folder for all the Qlik Users; this Config.QVS file should define among other things a variable, vEnviroment with values like PRD (when loaded from the common folder on the server) or DEV (when loaded from the developer workstation), I suggested vEnvironment, but that's a long name, I will prefer vEnv. This approach support as many environments with minimum dependencies and with a very small footprint; you may also visit Qlik Deployment Framework , there are some great articles explaining Qlik environments, you may find that forum interesting.

 Take a look at this articles:

Hope this helps,

Arnaldo Sandoval
A journey of a thousand miles begins with a single step.
Highlighted
Contributor II
Contributor II

@simonaubert sounds like a good idea 🙂 I think it can be helpful for many QlikSense dev/admins.

 

@ArnadoSandoval you're totally right: I have this need because my company unfortunately has only 1 QS server for dev, qualif and prod. It's something I'm working on, but I have to find an effective solution in the meantime with my single server.

I'm very interested in the QVS track, so I'm going to look deeply into that. Thanks again for taking the time to answer me, have a nice day.

Highlighted
Specialist
Specialist

@ylegrand 

It is tricky when everything is in one single server, even against auditors' guidelines about developers working in production environments, that is a no-go zone! unfortunately, Qlik is not offering any alternative that I am aware of; perhaps granting a second server license for at least one user; it will make life easier.

You have the alternative to do all your Qlik development with QlikSense Desktop; it will be available for clients having a QlikSense Server (for free no charge is my understanding), so you can develop your Qlik's applications on a local workstation, which access to the development environment data-applications at your site. 

Good luck!

Arnaldo Sandoval
A journey of a thousand miles begins with a single step.
Highlighted
Contributor II
Contributor II

@ArnadoSandoval unfortunately the Desktop version won't be supported after June this year.

 

@simonaubert I just wrote this little script to determine my environment variable, if it can help (cf attached) :

  • The stream custom property is named "Env" (to be changed with your own naming)
  • I call it this way : 
// "LET vEnvironment" script :
$(Must_Include=[lib://Global Ressources/QVS/_SetEnvironnement.QVS] );																	//Determine the environment according to the Stream "Env" custom property (DEV  / UAT / PROD)

 

That's all folks 🙂

Highlighted
Partner
Partner

Hello @ylegrand

Actually our need is more about the "domains", the "services" than environment.
We have some streams for Supply Chain, others for Human resources, etc, etc..  We also have a categorization by stream type (etl/front app).

The custom properties would be better than a repository for that purpose.

Bi Consultant (Dataviz & Dataprep) @ Business & Decision