Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
You can use the modulus operator to do this quite easily. You would pass your source to a tMap with two outputs. Use a tMap variable to generate a sequence number. In the output filters, use a modulus operation to decide which way the data should flow. This will work irrespective of how many rows are returned.
An example of the sort of output filter you will need is below....
//First output
intSequenceNum%2==0
//Second output
intSequenceNum%2!=0
You can use the modulus operator to do this quite easily. You would pass your source to a tMap with two outputs. Use a tMap variable to generate a sequence number. In the output filters, use a modulus operation to decide which way the data should flow. This will work irrespective of how many rows are returned.
An example of the sort of output filter you will need is below....
//First output
intSequenceNum%2==0
//Second output
intSequenceNum%2!=0
Hi,
Here is a simple solution.
Connect your input to a tMap in which you define a local variable (count for example) associated to a sequence(s1 for example).
Now, define 2 output in the tMap, drag and drop the desired fields for each and (the solution), add a filter for each outpout to filter odd and even values for the sequence.
Here is the tMap:
Hope this helps.
Great minds think alike @TRF 🙂
Hi ,
your approach approach is splitting the table in EVEN & ODD number of sequence .
But ,what if I need first 3 records to one table and last 3 into another ?
not like Seq. 1,3,5 in Table A and Seq 2,4,6 in Table B ..Not Like that.
Thanks in advance.
Regards
Subhadeep