Generate Numeric Sequence using Variable (Not Function)

Six Stars

Generate Numeric Sequence using Variable (Not Function)

I need to generate Numeric seq. ( integer ) without using Numeric.Sequence() function.

for Example :

input Data : only 1 column (string ) "name" , has 5 values , A,B,C,D,E

Output :  id(int)  Name(string)

                1           A

                2          B

                  ........

                5         E.

I need to use variable , expression using tMap (or other suitable components).

 

Regards 

Subhadeep

Employee

Re: Generate Numeric Sequence using Variable (Not Function)

Hi,

 

     May I know the reason why internal numeric sequence is a problem for you?

 

     If it is a scenario where you would like to start from last loaded sequence number (like in a DB), you can pick that value first from DB and load to a context variable. Then you can start the sequence from the loaded value instead of 1.

 

Numeric.sequence("s1",context.last_value,1)

 

Warm Regards,

 

Nikhil Thampi

Six Stars

Re: Generate Numeric Sequence using Variable (Not Function)

Hi nikhilthampi, 

 

the scenario demands to avoid the inbuilt function , can you please give me the solution using variables in expression builder ?

 

Thanks in advance .

 

Regards 

Subhadeep 

Employee

Re: Generate Numeric Sequence using Variable (Not Function)

Hi Subhadeep,

 

     Could you please me more context why the sequence function cannot be used for your use case scenario?

 

     If you could explain your specific scenario in detail, we can provide a better solution. All normal scenarios can be handled by above function including the sequence number generation from a specific number instead of 1.

 

     I am really interested in a scenario where this function should not be used.

 

Warm Regards,

 

Nikhil Thampi

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

6 Ways to Start Utilizing Machine Learning with Amazon We Services and Talend

Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend

Blog