Forum Discussion

darshthakkar's avatar
darshthakkar
Valued Contributor
10 months ago

Generate dynamic sequence in mapper with every pipeline validation?

Hi Team,

Is there a way we can generate a dynamic sequence in mapper or any other snap (values of which can be used in mapper eventually) with each pipeline validation? If not with pipeline validation, it will be okay for now if we are able to generate a value with each pipeline execution.

For example, if I validated or executed my pipeline once, the sequence starts with 1, with every other run, the sequence would be 2, 3, 4, etc.

Thank you.


Best Regards,

Darsh

6 Replies

  • We don't want to overdo this as well. Something like, setting a numberSequence to 1 and before the completion of the pipeline, appending it with +1 and storing that number as a parameter and using it during next execution. I'm looking for an easier way that doesn't put a lot of overhead to the pipeline.

    • darshthakkar's avatar
      darshthakkar
      Valued Contributor

      Thank you koryknick for the assistance over here, I tried it once and it doesn't work the way I intend it to be.
      The count changes from 0 to 1 and then it stops, when you tested it, was it working well for you?

       

      I'm actually travelling this week so I will give it a try again next week, thanks again for your help.

      Also, I was looking for an easier way (less memory and less resources usage) and didn't want to use expression library at the very first as there are challenges to it as well; if there is a common expression library and we need to append this variable for storing the value, every time the exp. library gets changed and promoted to higher env., we lose the history (reason being, when the count changed to 1 on the pipeline, expression library was still pointing to its initial value).

      Thank you.

       

      Best Regards,

      Darsh

  • Make sure your File Writer that is re-creating the expression library with the count is set to Validate and Execute (by default it is Execute Only).  Also, you can use multiple expression libraries in your pipeline properties, so I would have the count alone in it's own library so you don't need to ensure re-creation of your entire expr file.

    • darshthakkar's avatar
      darshthakkar
      Valued Contributor

      Makes sense, I will try with this tomorrow and keep you posted with my findings. Thanks for the insights though.