Hi,
I'm new to DataStage.
I'm trying to detect the new records that coming from one data source.
I have file A with key DSA_ID. I have table B which consist all the records with unique key that exist in the system, the key is also DSA_ID.
I try to use transformer stage to do this, but the problem is that i have to have 2 outputs. The first one with Constraint
'TabelA.DSA_ID Matches LookUpHashedB.DSA_ID'
and the second output with 'Reject Row' ticked.
How can I do this with only one output? I've tried to do using constraint :
'TabelA.DSA_ID <> LookUpHashedB.DSA_ID'
but it didn't work.
DSA_ID data type is VarChar(6)
Thanks in advance...
Endy
Regards
ND
Detecting New Records
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
I am basing this answer on the following understanding of your question: you want to process only those records from FileA that do not also occur (based on key) on FileB.
FileA feeds a Transformer stage on the main input link.
FileB feeds the same Transformer stage on a reference input link.
The Reference Key Expression for FileB is FileA.KeyColumn
On the single output link from the Transformer stage, the constraint expression can consist solely of the Link Variable FileB.NOTFOUND (choose Link Variables in the Expression Editor's drop down list of operands).
An alternative constraint expression would be IsNull(FileB.KeyColumn) which relies on DataStage setting all columns on a reference input link to NULL when the row sought is not found.
FileA feeds a Transformer stage on the main input link.
FileB feeds the same Transformer stage on a reference input link.
The Reference Key Expression for FileB is FileA.KeyColumn
On the single output link from the Transformer stage, the constraint expression can consist solely of the Link Variable FileB.NOTFOUND (choose Link Variables in the Expression Editor's drop down list of operands).
An alternative constraint expression would be IsNull(FileB.KeyColumn) which relies on DataStage setting all columns on a reference input link to NULL when the row sought is not found.