Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
sbxr
Contributor III
Contributor III

Generate auto_incermental serial_no for the tfileoutputdelimted csv tmap

Hi am using tmap for processing and tfilleoutput delimited for a csv output. in my output i am having an auto incremented columm named sl_no.. but it as not happening  as  i want. data has some repeated values.. i am using Numeric.sequence("s1",1,1).

coming output pattern:

sl_no ,name, place

2 ,xyz , la

12 ,tyu ,usa

34 ,hdd  ,ab

44,fffs,hf

Desired Output Pattern:

sl_no ,name, place

1,xyz , la

2 ,tyu ,usa

3 ,hdd  ,ab

4,fffs,hf

 

 

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi Sushil,

I am attaching here the mapping and tmap photos.

In tmap you can see that I am not taking the input for SNO ,I am directly incrementing in Variable and attaching it with the output.

 

I am getting the same output as described by you.

0683p000009Lz6Z.png0683p000009Lz66.png0683p000009Lz6e.png

View solution in original post

4 Replies
Anonymous
Not applicable

Hi Sushil,

I am attaching here the mapping and tmap photos.

In tmap you can see that I am not taking the input for SNO ,I am directly incrementing in Variable and attaching it with the output.

 

I am getting the same output as described by you.

0683p000009Lz6Z.png0683p000009Lz66.png0683p000009Lz6e.png

fdenis
Master
Master

Add a new Int variable in tMap var1 and set the value to: Var.var1+1

Anonymous
Not applicable

@fdenis.Is my answer wrong ?

 

fdenis
Master
Master

How many time and when is your Sequence S1 initialized or incremented. in a big job or in sub-job you can not know.