How to generate a sequence number in Talend using Tmap

Six Stars

How to generate a sequence number in Talend using Tmap

Hello,

 

I am new to Talend.

 

I want to know the process to generate sequence number. Can anyone help me plz.

 

Regards,

Deepak

Forteen Stars TRF
Forteen Stars

Re: How to generate a sequence number in Talend using Tmap

Hi,
For example, on the output side of a tMap add the desired field with the expression:
Numeric.sequence("name", 0, 1)
to create a sequence called "name" starting with 0 incremented by 1.

TRF
Six Stars

Re: How to generate a sequence number in Talend using Tmap

Thanks for the reply.

 

I followed the below steps.

 

1. Created a new field called SEQ in the output side.

2. Added the expression as Numeric.Sequence("S1",1,1)

 

In tMap it is giving the error. Will that be issue with datatype? 

Currently I have created a new field SEQ as String type. 

 

workflowpic2.PNG

 

Regards,
Deepak

Six Stars

Re: How to generate a sequence number in Talend using Tmap

And also I have created a field called SEQ in MySQL database as well. 

Forteen Stars TRF
Forteen Stars

Re: How to generate a sequence number in Talend using Tmap

Must be Integer of course

TRF
Six Stars

Re: How to generate a sequence number in Talend using Tmap

Thanks it worked Smiley Happy