How to do partitioning of the incoming data in a file without inserting into a database table

Hi Team - I need to do a partitioning of incoming data in a file for 1 column field without inserting into a database table.For e.g. in Oracle I can use this:

SELECT row_number() over(partition by T.ndc order by T.ndc) row_num FROM TEST T;