Ask Your Question
0

pipeline global parameter

asked 2018-03-05 04:56:30 -0500

mikygit gravatar image

I see it is possible to define a pipeline parameter.

Is it possible to modify that parameter at runtime?

I would like to implement a mechanism that checks the previous value of a parameter before an appropriate action depending on this value and then update this parameter value.

End goal: I have a pipeline that pulls data every 5 seconds. I want to treat them differently depending on if they have changed or not.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-03-19 11:28:14 -0500

mikygit gravatar image

The can be achieved by comparing a record value with the pipeline parameter and update it accordingly. Could be done in a groovy such as:

 if (record.value['text'] != sdcFunctions.pipelineParameters()['OSM_REF_ID']) {
    record.attributes['action'] = "TRIGGER"
    sdcFunctions.pipelineParameters()['OSM_REF_ID'] = record.value['text']
 }
edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-03-05 04:56:30 -0500

Seen: 38 times

Last updated: Mar 19