Talend sequence Generation with Data

I Have generated my own sequence based on the data. I need to compare the current sequence with the previous sequence generated from the data.

If both the sequences are same I should not increment the value. If the sequence are different I need to increment the sequence by using Numeric.sequence system routine. How to do that?

Example :

  1. Generated sequence --1234567890 --1
  2. Next sequence --1234567890 --1

If Both has the sequence number generated the value should remain the same.

2 Answers

  1. Fred- Reply


    Store the previous sequence in a variable in order for you to be able to compare, instead of comparing now == next, in talend you need to do now == previous for you to be able to compare both.

    For this a tJavaRow should be enough, you can store the previous sequence on a global variable, and compare it in the next iteration

  2. Gabriel- Reply


    Have a lookup on the target filter the sequence if same

     SOURCE (row1) -> filter 
     (if(row1.sequence !=row2.sequence))
                                   >insert out
     Target (Lookup row2)

Leave a Reply

Your email address will not be published. Required fields are marked *

You can use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>