Logic

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
pravin1581
Premium Member
Premium Member
Posts: 497
Joined: Sun Dec 17, 2006 11:52 pm
Location: Kolkata
Contact:

Logic

Post by pravin1581 »

Hi All,

I have a requirement, the input data is as follows :-

Code: Select all


          File 1                              File 2

       col1  col2                        col1  col2
       100 ,   a                                , a
             ,   b                           200, b


The desired output is :-

Code: Select all


                         100 , a
                         200 , b

           

Thanks in advance.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

What is the rule behind the result - use just values values where column A is not empty?
Minhajuddin
Participant
Posts: 467
Joined: Tue Mar 20, 2007 6:36 am
Location: Chennai
Contact:

Post by Minhajuddin »

Your logic is not clear from the example you've posted. I am assuming that you want to send the records which DO NOT have a NULL in column 1 in the output and that you don't want duplicates on col2 in the output.

You can read the file through a single sequential file stage (by adding two File properties). After this you can sort on col2 and then in a downstream transformer you can send the first row with a NOT NULL col1 and then drop the other rows.
Minhajuddin

<a href="http://feeds.feedburner.com/~r/MyExperi ... ~6/2"><img src="http://feeds.feedburner.com/MyExperienc ... lrow.3.gif" alt="My experiences with this DLROW" border="0"></a>
Post Reply