Merge Stage

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
Smeitei
Participant
Posts: 28
Joined: Tue Jan 23, 2007 3:14 pm

Merge Stage

Post by Smeitei »

Merge issue

My requirement is .
1. File1 and File2
2. ID is key field in both File1(ID,Name) and File 2(ID,Designation)
3. Join File1 and File2 base on the ID field
4. Get File3 with this column(ID,Name,Designation) with ID as key field

I have followed this

MergeStage------->Output seqfile

1. First a Merge Stage where I defined the File1 and File2
2. Output seqfile

Issue i am having
DS Tells to define all the column in File1 and File2 in Output seq file File3. I have tried it this way and it worked but now my output is redundant with one extra ID column. The output File 3 look like this(File1.ID,File2.ID,Name,Designation)

Is there any way i can remove one of the ID column with my approach. I don't want want to write into another seqfile.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

I havent worked with the Merge stage but once the file is created, you can read it as it is and not propogate the extra column through the transformer.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Smeitei
Participant
Posts: 28
Joined: Tue Jan 23, 2007 3:14 pm

Post by Smeitei »

I pretty much got what I want but wanted to know if there is a way I can negate the redundancy of extra column in the Merge Stage itself or this is the only way how DS works.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

What does the manual say about Merge stage?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Smeitei
Participant
Posts: 28
Joined: Tue Jan 23, 2007 3:14 pm

Post by Smeitei »

Sorry to say that i don't have any reference for Merge Stage
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

:shock: You dont have online manuals installed on your desktop? It gets shipped along with the product. Look for it under the Ascential directory in your local drive.
Anywho, guess you have to specify keys from both the files in your output as per the following from the manual:

You must include a First File Column Key and Second File Column Key in the Column List.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply