Page 1 of 1

Logic

Posted: Mon Jun 09, 2008 8:36 am
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.

Posted: Mon Jun 09, 2008 9:04 am
by ArndW
What is the rule behind the result - use just values values where column A is not empty?

Posted: Mon Jun 09, 2008 10:54 am
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.