Friday, March 28, 2014

Scenario
How to send alternate record to target?
Or

Sending Odd numbered records to one target and even numbered records to another target.

Solution:
Step 1: Drag the source and connect to an expression transformation.

Step 2: Add the next value of a sequence generator to expression transformation.

Step 3: In expression transformation make two port, one is "odd" and another "even".
And Write the expression like below
Step 4: Connect a router transformation to expression.
Make two group in router.
And give condition  Like below
Step 5: Then send the two group to different targets.
The entire mapping is as below

No comments:

Post a Comment

 BEST PYSPARK LEARNING SITES https://www.youtube.com/watch?v=s3B8HXLlLTM&list=PL2IsFZBGM_IHCl9zhRVC1EXTomkEp_1zm&index=5 https://www...