how to generate ASCII values for an alphabetic sequence

One Star

how to generate ASCII values for an alphabetic sequence

Hi,
The sequence goes like A, B, C ...... Z, AA, AB, AC ..... AZ, BA, BB, BC.... BZ, CA, CB, CC....CZ, DA......ZA, ZB....ZZ, AAA, AAB, AAC....AAZ, ABA, ABB... AZZ, BAA, BAB....ZZZ
I want output as1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20........27,28,29,,,,,,,,,,,,,,,,,,,,,,,,,,,
using talend component .
Any suggestions thanks in Advance
Regards
VK

Community Manager

Re: how to generate ASCII values for an alphabetic sequence

Hi
You can call the system function Numeric.sequence("s1",1,1) to generate a sequence number for each row. 

Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: how to generate ASCII values for an alphabetic sequence

hi shong,
thanks for your reply
but if my input is A,B,C,D,AA,AB,AZ,BA,BF,BZ,ZZ,AAA,ZAB,ZZZ
THEN HOW COULD I USE Numeric.sequence("s1",1,1) 


THANKS
VK
Community Manager

Re: how to generate ASCII values for an alphabetic sequence

Hi
Add one column in the output table of tMap, and set its expression as:
Numeric.sequence("s1",1,1) 

Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business

2019 GARTNER 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

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog