Search code examples
javatalendcontext-param

Add context parameters to Talend job in Tac via API without actually running it


This seems to be a weird situation, but I want to know (have googled in Talend forums and their API docs, but nothing) if it is possible to set the context parameters for an already deployed task in TAC without actually running it.

I say that last part because I already know how and have the ability to run a specified job with the right context parameter values, but that's actually a step further than I need to go.

Thanks for any input


Solution

  • You can use the metaservlet API-s updateTask command. Although the documentation does not lists that it can modify the contexts but it can. Just keep in mind that the context json section shouldn't be the last one, because the parsing they use will not work if the last tag is context. So basically do it the same way as you would do with runTask command.