Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Is it possible to pass a parameter from the POST executions API to a cloud job? The example/model in swagger shows
Executable task {
Executable identifier
,Executable parameters
}
inline_model {}
But, when I publish a job to cloud and try this POST below, it runs, returns 201 but the job isn't using the parameter.
- curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Authorization: Basic xxxxxx ==' -d '{ \
"executable": "5cc75d7e1488ad43b1447f6a", \
\
"parameters": { \
"parameter_passed": "test" \
} \
}' 'https://api.us.cloud.talend.com/tmc/v1.2/executions'
Can someone please explain this? Is there a different way to set up the context variable or something?
Hello,
I have th same problem, have you find a solution ?
Thanks
Hello,
I don't know how you define your parameter in your job but using "parameter_name" in the context works for me.
I set a tFixedFlowInput with this context and retrieve the value of the parameter correctly.
Hope this help
Guillaume
Bump.
Any updates or new findings how this actually works? The api docs are sparse/nonexistent .
Ok figured this out.
The contexts in your job should be prefixed with 'parameter_' ("parameter_name" in my job)
Then in the body of your request you can just put the name of the context w/o the prefix. eg.
{
"executable": "5dcb3498fc531f932a235dcam",
"parameters": {
"name":"Hello World"
}
}