How to remove reverse duplicates in datastage ?
Scenario:
Objective: The interface aims to consolidate the round-trip ticket cost of passengers.
Description: The source file is a .txt file, train_route_src.txt, consolidated with trains from a particular source to destination. There are many repetitions in the source file (Reverse Duplication: eg. BLR --> BBS and BBS --> BLR). Remove the reverse duplicates and maintain the target in the following manner.
SRC-DES-SRC Distance Fare
SRC1-DES1-SRC1 2*Distance 2*fare
Source File:
SOURCE DESTINATION DISTANCE FARE
SBC BBS 1500 1500
GWH PUN 1750 1800
PUR CTC 90 90
FAR GHZ 750 750
BBS SBC 1500 1500
PUN GWH 1750 1800
CTC PUR 90 90
SIM OOT 500 500
GHZ FAR 750 750
OOT SIM 500 500
BRD REI 900 900
SRI CHN 4500 4500
REI BRD 900 900
GHN MNG 1650 1650
HWH BBS 550 550
MNG GHN 1650 1650
BBS HWH 550 550
CHN SRI 4500 4500
BBS GHN 1800 1800
BBS OOT 1500 1500
BBS DEL 2200 2200
OOT BBS 1500 1500
DEL BBS 2200 2200
-
Interview Candidate
- Apr 9th, 2015
- 9
- 16950
Showing Answers 1 - 9 of 9 Answers
Related Answered Questions
Related Open Questions
How to remove reverse duplicates in datastage ?
Objective: The interface aims to consolidate the round-trip ticket cost of passengers.
Description: The source file is a .txt file, train_route_src.txt, consolidated with trains from a particular source to destination. There are many repetitions in the source file (Reverse Duplication: eg. BLR --> BBS and BBS --> BLR). Remove the reverse duplicates and maintain the target in the following manner.
SRC-DES-SRC Distance Fare
SRC1-DES1-SRC1 2*Distance 2*fare
Source File:
SOURCE DESTINATION DISTANCE FARE
SBC BBS 1500 1500
GWH PUN 1750 1800
PUR CTC 90 90
FAR GHZ 750 750
BBS SBC 1500 1500
PUN GWH 1750 1800
CTC PUR 90 90
SIM OOT 500 500
GHZ FAR 750 750
OOT SIM 500 500
BRD REI 900 900
SRI CHN 4500 4500
REI BRD 900 900
GHN MNG 1650 1650
HWH BBS 550 550
MNG GHN 1650 1650
BBS HWH 550 550
CHN SRI 4500 4500
BBS GHN 1800 1800
BBS OOT 1500 1500
BBS DEL 2200 2200
OOT BBS 1500 1500
DEL BBS 2200 2200
Related Answered Questions
Related Open Questions