0
I have 100 records in source table, but I want to load 1, 5,10,15,20…..100 into target table. How can I do this? Explain in detailed mapping flow.

Open 1 Answers 54 Views Technology
I have 100 records in source table, but I want to load 1, 5,10,15,20…..100 into target table. How can I do this? Explain in detailed mapping flow.

1 Answer

0

This is applicable for any n= 2, 3,4,5,6… For our example, n = 5. We can apply the same logic for any n.

The idea behind this is to add a sequence number to the records and divide the sequence number by n (for this case, it is 5). If completely divisible, i.e. no remainder, then send them to one target else, send them to the other one.

  1. Connect an expression transformation after source qualifier.
  2. Add the next value port of sequence generator to expression transformation.
    Sequence-generator-informatica-interview-questions
  3. In expression create a new port (validate) and write the expression as in the picture below.
    Validate-expressions-informatica-interview-questions
  4. Connect a filter transformation to expression and write the condition in property as given in the picture below.
    Filter-transformation-informatica-interview-questions
  5. Finally connect to target.
    Connect-to-target-informatica-interview-questions
by (302k points)
...