My scrapbook about almost anything I stumble upon in my tech world. If you find anything useful don't forget to give thumbs-up :)

Breaking

Monday, September 21, 2015

DataStage Scenario #5 - Oracle Rank & Rownum



Scenario:

a. Design a job where we read the data from squential file.
b. Analyze the data into job and generate these 3 columns



Example Input:

Data
Gama
Charlie
Alpha
Beta
Alpha
Charlie
Delta
Alpha

Output Expected:

Data  ROW_NUMBER   RANK   DENSE_RANK 
Alpha            1      1            1
Alpha            2      1            1
Alpha            3      1            1
Beta            4      4            2
Charlie            5      5            3
Charlie            6      5            3
Delta            7      7            4
Gama            8      8            5



Like the below page to get update  
https://www.facebook.com/datastage4you
https://twitter.com/datagenx
https://plus.google.com/+AtulSingh0/posts
https://groups.google.com/forum/#!forum/datagenx

2 comments:

Disclaimer

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.