Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
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
But when running it I get an error that I can't figure out the reason for, see below
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
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'"
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'"