Skip to main content

Hello,

 

I have a text format attribute (lenght : 5 characters (for exple : FEFER, FOUSER,...)) as primary key and I want to change it in integer attribute format. Do you know about methods to do it ? I've tried ASCII conversion but it gives results more than the integer limit.

For exemple : I thought I could change each letter by the number (A->1, B->2, ...). How can I do it ?

 

Thank you for your help.

You'll need to split the attribute using an AttributeSplitter so you get the individual letters, then use a CharacterCodeExtrator to turn them into their ascii codes and a StringConcatenator or AttributeManager to create a new attribute that holds those 5 ascii codes.

ZZZZZ would give you 9090909090 which is indeed longer than the max length of a regular 32-bit integer. Does your output format support 64-bit integers (as primary keys)?


My output format is 32 bit.

 

I have found the BaseConverter Transformer. I have converted base 64 to base 10. It works !

 

Thank you for your help.


Reply