My e-Notes about DataScience, Machine Learning, Python, Data Analytics, DataStage, DWH and ETL Concepts


Thursday, 3 September 2015

DataStage Scenario #3 - Fetch middle one

Develop a DataStage Job to achieve below requirement -

Atul Kr Singh
Geeta Vishwas
Anoop Despande
Rohit S Pande
Ankit Singh
Garima Bhatia Arya

Fname   Mname   Lname
Atul       Kr         Singh
Geeta                  Vishwas
Anoop                 Despande
Rohit     S           Pande
Ankit                  Singh
Garima   Bhatia   Arya

For more Scenario -  CLICK HERE


  1. Use field function in transformer to get the result .
    Derivations in transformer :

    Lname ::If Count(InputCol,' ')=1 Then Field (InputCol,' ',2)
    Else Field (InputCol,' ',3)

    Mname:If Count(InputCol,' ')=1 Then ' ' Else Field (InputCol,' ',2)

    Fname : Field(InputCol,' ',1)



The postings on this site are my own and don't necessarily represent IBM's or other companies positions, strategies or opinions. All content provided on this blog is for informational purposes and knowledge sharing only.
The owner of this blog makes no representations as to the accuracy or completeness of any information on this site or found by following any link on this site. The owner will not be liable for any errors or omissions in this information nor for the availability of this information. The owner will not be liable for any losses, injuries, or damages from the display or use of his information.