DataCleaner icon indicating copy to clipboard operation
DataCleaner copied to clipboard

Check input while triggering jobs via REST

Open jhorcicka opened this issue 9 years ago • 0 comments

When you try to trigger/invoke a job via REST endpoint and you specify incorrect input or just don't specify required values, then you can end up with 200 OK but empty output. This should be changed. Within the job, required columns are known and can be checked for.

For example:

POST http://localhost:8080/repository/demo/jobs/concatenator.invoke/mapped
{
  "rows":
[{
  "values":["customernumber","customername","contactlastname","contactfirstname","phone","addressline1","addressline2","city","state","postalcode","country","salesrepemployeenumber"]
}], 
  "columns":["customernumber","customername","contactlastname","contactfirstname","phone","addressline1","addressline2","city","state","postalcode","country","salesrepemployeenumber"],
  "columnValueMap":
[{"customernumber":"42","customername":"name","contactlastname":"last-name","contactfirstname":"first-name","phone":"phone","addressline1":"addr1","addressline2":"addr2","city":"city","state":"state","postalcode":"postcode","country":"country","salesrepemployeenumber":"1"}]
}

concatenator

This will return 200 OK and empty result because keys are lower-cased instead of upper-cased.

jhorcicka avatar Sep 26 '16 15:09 jhorcicka