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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
LP1664879672
Contributor
Contributor

jobName variable

Hello,

How use the variable "jobName" in a context group ? I have tried several solutions but it doesn't work.

0695b00000Wv3y6AAB.png

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Hello,

 

There's a feature request that aims to solve this problem. There the idea is that this ApplicationName parameter could be configured at the project level, and this calculated value could be passed to the databases. I.e. you could generate string such as: "Talend-"+projectName+"-"+jobName this idea is tracked internally under TDI-48074 feel free to raise a support ticket and share your use-case / expectation so it can be linked and we can follow up.

 

For now your best option would be to do a joblet that rewrites the context parameters at the beginning of the job.

View solution in original post

6 Replies
Anonymous
Not applicable

You can't do this. jobName is a private variable within a job. It doesn't exist in the context group. But you can use it anywhere in your jobs.

LP1664879672
Contributor
Contributor
Author

Thank you !! Is there any other way to put the current job name in a context group?

 

I use this component in my jobs and I would like to keep the property type as "Referential". That's why I would like to put the name of the job in the context group0695b00000Wv4brAAB.png

Anonymous
Not applicable

You can't add it to the Context Group so that simply dropping your Context Group into a job will pick this up. But you can get it added to a Context Variable within a Context Group while the job is running. There are several ways in which this could work, but the simplest is probably to set up a joblet to include a tJavaFlex and a tContextLoad. The tJavaFlex would retrieve the jobName variable and supply it to the "value" column of the tContextLoad and the name of the Context Variable would be supplied to the "key" column. If you add the joblet to each job along with the Context Group, this would handle this.

Anonymous
Not applicable

Hello,

 

There's a feature request that aims to solve this problem. There the idea is that this ApplicationName parameter could be configured at the project level, and this calculated value could be passed to the databases. I.e. you could generate string such as: "Talend-"+projectName+"-"+jobName this idea is tracked internally under TDI-48074 feel free to raise a support ticket and share your use-case / expectation so it can be linked and we can follow up.

 

For now your best option would be to do a joblet that rewrites the context parameters at the beginning of the job.

LP1664879672
Contributor
Contributor
Author

Hello, yes I created a joblet to rewrites the context parameters and it works ! Thanks for your help !

LP1664879672
Contributor
Contributor
Author

Hello, yes I created a joblet to rewrites the context parameters and it works ! Thanks for your help !