Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

string separation from numerical data

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.. 

0683p000009Ls1i.png

Thanks & Rehgards

Mastan SHaik

Labels (1)
1 Solution

Accepted Solutions
manodwhb
Champion II
Champion II

@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(":","")) 

View solution in original post

11 Replies
manodwhb
Champion II
Champion II

@Mastan_123,

 

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(":","")) 

Anonymous
Not applicable
Author

hi,

below is the expression and expected output

row1.maximum.substring(StringHandling.INDEX(row1.maximum,":")+1,StringHandling.LEN(row1.maximum))

 

Thanks

Venkata Kiran


Capture5.PNG
Capture6.PNG
Anonymous
Not applicable
Author

hi Kiran,

My actual job design is like this..

0683p000009Lswj.pngin 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,

0683p000009Lsyb.png

but my actual required output is 

0683p000009LsRE.png

this is sample data only not exact data the numbers are varied that's why...please give me a solution

 

Thanks & Regards

Mastan  

manodwhb
Champion II
Champion II

@Mastan_123 , use below expresion in second tMap.

StringHandling.TRIM(row6.Col1.replaceAll("[A-Za-z]","").replaceAll(":","")) 

Anonymous
Not applicable
Author

Hi Manod,

Thanks for your quick reply,

 

My actual job design is like this..

0683p000009Lswj.pngin 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,

0683p000009Lsyb.png

but my actual required output is 

0683p000009LsRE.png

this is sample data only not exact data the numbers are varied that's why...please give me a solution

 

Thanks & Regards

Mastan  

manodwhb
Champion II
Champion II

@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(":","")) 

Anonymous
Not applicable
Author

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.

0683p000009LtDZ.png

Anonymous
Not applicable
Author

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..0683p000009LsmM.pngSample output

check the input file send to you and sample output...

 

Thanks & Regards..

Mastan


Book1.xlsx
manodwhb
Champion II
Champion II

@Ameesh,can you check the my first reply for this question? since i proveded both ways.