Skip to main content
Announcements
Join us on Sept. 17 to hear how our new GenAI Assistant empowers data professionals: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
smore1665386696
Contributor II
Contributor II

I have to use the decimal stripe logic in my job in tmap

Basically have to replace trtt00376.625gajsH = 0376.625​ using regular expression . Please help me with this

I tried forming one equation but it's showing me incorrect character error.

Regexp_replace ('column_name','[^-0-9.],' ');​

Labels (2)
6 Replies
dilip_n
Contributor II
Contributor II

HI there,

I thinks this one will be helpful

StringHandling.CHANGE("trtt00376.625gajsH","[a-zA-Z]","")

or

StringHandling.EREPLACE("trtt00376.625gajsH","[^-0-9.]","")

 

better use [a-zA-Z] to replace with with "no space" like as shown in above function.

 

both the conditions are working... Still you are not getting output? ping me with column type that you are using.

 

0695b00000fKkpnAAC.png0695b00000fKkpdAAC.png

smore1665386696
Contributor II
Contributor II
Author

The column type​ is bid decimal.

smore1665386696
Contributor II
Contributor II
Author

Output i am getting for above expression is

1 ._

Where expected output should be 0376.625​

dilip_n
Contributor II
Contributor II

in this case read entire file as string then use tmap after that convert into bigdecimal to output

dilip_n
Contributor II
Contributor II

other wise we need to use tjavarow to resolve it

smore1665386696
Contributor II
Contributor II
Author

How can be done? Data type is bigdecimal for that column .​