top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to get row_number() in informatica

+1 vote
4,659 views

How to get the result that we get in oracle ROW_NUMBER() OVER (PARTITION BY ID) from flat file in informatica

posted Mar 5, 2014 by Madhavi Kumari

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

You can get somewhat similar functionality using the Rank transformation.

In the rank transormation, select the GroupBy option for the ports you would use in PARTITION BY. Specify the rank port as the port on which you would do ORDER BY. You can select only 1 rank port, however. Select Top/Bottom in properties for Descending/Ascending order respectively

Also, you have to manually specify the maximum number of records you are expecting in each PARTITION in the Number of Ranks property in Rank transformation. You can put a number that will always be greater than the count of records in any partition/group.

The RANKINDEX output from Rank Transformation will be your row number.

answer Mar 5, 2014 by Shweta Singh
Similar Questions
+2 votes

My question is very similar to the one below, but on a informatica environment:

Retrieving the index of an inserted row

Here is a brief summary of the issue: I'm trying to figure out how I can insert a row into a table and then find out what the value of the auto_incremented id column was set to so that I can insert additional data into another table. Our target is SQL server 2008. We have a table which has to be populated by informatica ETLs and the application is also using the same table - so, we can't use informatica sequence generator.

In the past when I have used Oracle database, there was a Oracle sequence generator transformation available in Informatica - but for SQL server, I am not sure.

Any solutions please?

0 votes

I have 20 records in a file and I don't need the first and the last line, I need data from 2 through 19 lines only.
How can I achieve this?

+2 votes

Is there any environment variable which holds the value of task ran ?

...