Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] tMap Variable to create unique row number?

Hi,
I have a simple job in Talend which uses a tMysqlInput to tFileOutputDelimited and it works perfectly.
However the end user has asked for an enhancement so that the report automatically generates the row number for each line on the report. As I am using MySQL i cannot just use ROWNUM() and when i have tried to set a variable (such as @ROW_NUMBER), Talend doesn't like it.
Does anyone have any experience or suggestions on how I can work this out?
I thought maybe a variable in a tMap component - but I have no java skills so wouldn't know how to begin writing such a thing.
Hope you can help!

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hello,
Maybe in your Tmap you can create a variable like this one :
Numeric.sequence("rowNumber",1,1) => this variable begins at 1 and increment by step 1 the result.
I hope it helps you.

View solution in original post

3 Replies
Anonymous
Not applicable
Author

Hello,
Maybe in your Tmap you can create a variable like this one :
Numeric.sequence("rowNumber",1,1) => this variable begins at 1 and increment by step 1 the result.
I hope it helps you.
Anonymous
Not applicable
Author

Hi tdz,
Many thanks - works exactly as I'd hoped!
Anonymous
Not applicable
Author

https://faihofu.blogspot.com/2019/10/talend-rownumber-functionality-using.html
is this blog post any use?

 

it uses tMap to mimic the tsql row_number() over (partition by....) windows function