Page 1 of 1

Merge Stage

Posted: Fri Mar 23, 2007 10:20 am
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.

Posted: Fri Mar 23, 2007 10:40 am
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.

Posted: Fri Mar 23, 2007 11:09 am
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.

Posted: Fri Mar 23, 2007 12:28 pm
by DSguru2B
What does the manual say about Merge stage?

Posted: Fri Mar 23, 2007 12:39 pm
by Smeitei
Sorry to say that i don't have any reference for Merge Stage

Posted: Fri Mar 23, 2007 12:55 pm
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.