Output using stage variable concept of transformer only (remove reserve duplicates)

INPUT:
SOURCE DESTINATION DISTANCE(KM)
HYD CHN 500
CHN HYD 500
BANG HYD 600
HYD BANG 600
PUN HYD 750
HYD PUN 750
OUTPUT :
SOURCE DESTINATION DISTENCE
HYD CHN 500
BAN HYD 600
PUN HYD 750

Showing Answers 1 - 12 of 12 Answers

Chandra

  • Sep 10th, 2015
 

SRC---->TRANS---->RM---->TGT
in Transform implement below logics
SRC -->If DSLink2.SRC < DSLink2.DESTINATION Then DSLink2.SRC Else DSLink2.DESTINATION
Destnation -->If DSLink2.DESTINATION > DSLink2.SRC Then DSLink2.DESTINATION Else DSLink2.SRC
Remove duplicated on SRC and DESTINATION .
Hope This will help . If any changes please correct me ..

  Was this answer useful?  Yes

uma mahesh

  • Sep 18th, 2015
 

SOURCE->SORT->TRANSFORMER(LINK.DISTANCE->STAGEVAR1, IF STAGVAR3=STAGEVAR1 THEN STAGE2+1 ELSE 1 -> STAGEVAR2, STAGEVAR1 -> STAGEVAR3) -> OUTPUT1( CONSTRAINT : STAGEVAR2=1), OUTPUT2( CONSTRAINT : STAGEVAR2=2)

  Was this answer useful?  Yes

Ram

  • Feb 5th, 2016
 

Simple:
Source --> Sort (key distance) --> RD (retains 1st occuance) --> Target
Please let me know if it is not work.

  Was this answer useful?  Yes

Rudra

  • Feb 9th, 2016
 

Source->Transformer Stage -> Target
In transformer use 2 stage variables. Use hash Partition in the source and select key field and select sort option only. STG1 -> if stg2= keyfield then 1 else 0
stg2 - keyfield
Then in filter put condition stg1=0

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions