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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Get error when trying to use component context variable in tRunJob

Hi!

 

I'm trying to figure out a way to start the same job with diffrent parameters. I know there are a lot of ways of doing it but I'm tryin to use tRunJob for it. See what happens below

 

First I run the child job on its own and it works fine with the context parameter

0683p000009M8DZ.png

 

I then set the context variable in the child job to null and sets the value in the tRunJob instead, in its context page and it works fine, see below

0683p000009M8De.png

 

Now i set the context variable in the context page to NULL and then I want to use the context variable in the tRunJob component, see below

0683p000009M7zY.png

 

But when running it I get an error that I can't figure out the reason for, see below

0683p000009M8Dj.png

 

I'm not sure what I am do wrong. This is what it says in the help about tRunJob

 

Context Param

You can change the value of selected context parameters. Click the [+] button to add the parameters defined in the Context tab of the child Job. For more information on context parameters, see Talend Studio User Guide.

The values defined here will be used during the child Job execution even if Transmit whole context is selected.

 

And thats the reason I thought I could use it this way. pls help

 

Regards

Patrik

 

 

 

 

 

 

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

The reason you are having an issue here is that the Context Param section of the tRunJob is essentially interpreted as a single line of Java. This has many advantages in that you can make method calls, etc, but it means that you need to pass values as you would in code. If you are passing a String in Java you would need to wrap it in double quotes. Therefore you need to add...

 

"TYPE='MODEL'"

View solution in original post

1 Reply
Anonymous
Not applicable
Author

The reason you are having an issue here is that the Context Param section of the tRunJob is essentially interpreted as a single line of Java. This has many advantages in that you can make method calls, etc, but it means that you need to pass values as you would in code. If you are passing a String in Java you would need to wrap it in double quotes. Therefore you need to add...

 

"TYPE='MODEL'"