Page 1 of 1

Global Parameter

Posted: Tue Jan 23, 2018 4:51 pm
by sshrestha
Is there a way to create a parameter that is available in a jobflow and any subgraphs or jobflows without having to pass it as a parameter to subgraphs every time.

For Example, let's say I want to create a paramter called 'PI' whose value is 3.14, but I don't want to pass it as parameter every time to my subgraphs. Is it possible for me to create it once and use it from any graphs and subgraphs in the project?

Re: Global Parameter

Posted: Thu Jan 25, 2018 3:16 pm
by jandikovae

There are a couple of options that you can use to store some general value, but I am afraid, that you have to link your current graph to the "global" parameter or value anyway.

Best practice is to use an External (Shared) Parameter file. Please follow the instructions in the documentation (link "External (Shared) Parameter file") and create a new parameter file. The file is then immediately available in your current graph but it is also stored outside the graph within the project. All you need to do in order to use the same parameter file in another graph/subgraph is to drag and drop the file from the Navigation pane (Project root directory) to the Outline pane of the new graph (you can also use function "Link parameter file", as the documentation says, but I believe the "drag and drop" is easier).

In addition, please let me mention also so-called Database Lookup Table. You can have your parameters and its values in a DB table (e.g. Cities and its zipcodes) and access the values using Lookup. Yet, in order to reference the predefined lookup in more graphs, you still need to use external lookup and link it to each graph again.

Thank you for understanding. Best Regards,

Re: Global Parameter

Posted: Sun Jan 28, 2018 12:23 pm
by PercyJin
Hi Eva, I'm trying to accomplish the same thing as sshrestha, but I'm having trouble following what you're suggesting. Is there anywhere a step by step guide on how to do this by any chance?

Re: Global Parameter

Posted: Mon Feb 05, 2018 5:52 pm
by sshrestha
Thank you Eva,

I had a MASTER_AUTH_KEY that I wanted available in any graph that wanted to use it. I put the key value pair in workspace.prm file since that file seems to be available in every graph with the same parameter values.

However, your suggestions for db lookup seems to be more favorable for my case as I did not want to store the Auth key in the project. This way whenever the auth key changes i don't have to update the project. Also, I could have as many parameters as I want without polluting the workspace.prm file.


Re: Global Parameter

Posted: Fri Feb 09, 2018 11:05 am
by jandikovae
Hi guys,

I can confirm that it is safe to use also the workspace.prm file and you are right, in such a case, you don't need to link it to the graph/subgraph each time as the workspace.prm file is already linked to each job.

Additional note: You have to add your parameter to the workspace.prm file in the root directory if you want it to be "global". I mean, the main workspace.prm file is in the Navigator pane at the bottom of the project's directories and files list. You can double-iclick the file there and edit as usual. This way the parameter will be shared among all graphs. On the contrary, if you add the parameter within a single graph by double-clicking the workspace.prm file in graph's Outline pane, you will see it in that single graph only.

PercyJin, if you decide to keep your parameters in a separate file (as I suggested originally), please follow the instructions on the following page:

On the above-mentioned page, there is also described how to "Link" the PRM file to each graph. You can skip this point by drag and drop the file from Navigator pane to the Outline of the graph in question. If you have any difficulties with the process, please let me know what exactly do you struggle with and I'll help you through.

Thank you both and have a nice day,