Hello Everyone,
I have two files AAAA.txt and BBBB.txt
I need to have all records from AAAA.txt and Unmatched records from BBBB.txt and I don't want the records from BBBB.txt that matches in AAAA.txt
I need to implement the functionality of UNION. Is there any chance that datastage can implement UNION functionality.
Thanks in Advance
Regards
Cherry
UNION Functionality
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
Do full outer join on AAAA.txt and BBBB.txt. You will get left link key columns and right link key columns that is AAAA.key columns and BBBB.key columns. Next in a transformer stage take two output links, One link contrained with AAAA.key columns as null(i.e Records in BBBB is not in AAAA) and another link constrained with AAAA.key columns not null. Then funnel both the links.
Re: UNION Functionality
UNION is UNION ALL plus DISTINCT (in SQL terms). So, you can use Funnel stage and Remove Duplicates Stage right after that.