Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi,
I have the fields minimum, maximum, average stander-ed_dev, relative_Std_dev...etc. All these fields having string value as well as numerical data i want to print the numerical data in the corresponding fields..
i want to print only 8.08 in minimum field and 8.13 in maximum field and 8.10 in average field...etc like this how do split this data in tmap component..
Thanks & Rehgards
Mastan SHaik
@Mastan_123, when you have correct input and oput then only the things will better.
However you want to take the numeric data from a field,you can use the below expression in the tmap,where you are deriving.
StringHandling.TRIM(row6.Col1.replaceAll("[A-Za-z]","").replaceAll(":",""))
1) Since you can extract using tExtractDelimitedFields.
https://help.talend.com/reader/QgrwjIQJDI2TJ1pa2caRQA/_MywpLjh6iTB3Orb9afI0w
2) in tMap you can use below expersion to get only numuric value.
StringHandling.TRIM(row6.Col1.replaceAll("[A-Za-z]","").replaceAll(":",""))
hi,
below is the expression and expected output
row1.maximum.substring(StringHandling.INDEX(row1.maximum,":")+1,StringHandling.LEN(row1.maximum))
Thanks
Venkata Kiran
hi Kiran,
My actual job design is like this..
in the second tmap i want to separate the String data from the Numeric data and populate the numeric data in the corresponding field. now i am getting the output as,
but my actual required output is
this is sample data only not exact data the numbers are varied that's why...please give me a solution
Thanks & Regards
Mastan
@Mastan_123 , use below expresion in second tMap.
StringHandling.TRIM(row6.Col1.replaceAll("[A-Za-z]","").replaceAll(":",""))
Hi Manod,
Thanks for your quick reply,
My actual job design is like this..
in the second tmap i want to separate the String data from the Numeric data and populate the numeric data in the corresponding field. now i am getting the output as,
but my actual required output is
this is sample data only not exact data the numbers are varied that's why...please give me a solution
Thanks & Regards
Mastan
@Mastan_123, when you have correct input and oput then only the things will better.
However you want to take the numeric data from a field,you can use the below expression in the tmap,where you are deriving.
StringHandling.TRIM(row6.Col1.replaceAll("[A-Za-z]","").replaceAll(":",""))
Hi Manod,
If u have a common separator dividing Num and Alpha fields u can just only use textractdelimited and give separator ':' as seen from your i/p. i have done a sample with input "Minimum: 8.08" in fixedflow having only one field similarly u can do with other fields also and remove excess columns with tfiltercolumns or a tmap.
Hi Manod..
Thanks for your reply i am sending the input file, from this input file you understand my requirement and tell me possible solution.. my output should be..Sample output
check the input file send to you and sample output...
Thanks & Regards..
Mastan
@Ameesh,can you check the my first reply for this question? since i proveded both ways.