问题
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
回答1:
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.
回答2:
default context parameters are stored inside
<job-name>/items/<namespace>/process/<job-name>_<revision>.item
inside of a built project
来源:https://stackoverflow.com/questions/52301736/add-context-parameters-to-talend-job-in-tac-via-api-without-actually-running-it