Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have an excel input in the below format: And I need to filter out whatever is non integer.
ProjectNumber | TaskNumber |
107 | AT |
108 | AT |
108 | C-NON |
109 | 119 |
109 | 120 |
109 | 121 |
109 | 122 |
109 | 123 |
109 | 124 |
109 | AT |
109 | C-NON |
12518-1 | AT |
12518-1 | C-NONSCA |
I need the output as below:
ProjectNumber | TaskNumber |
109 | 119 |
109 | 120 |
109 | 121 |
109 | 122 |
109 | 123 |
109 | 124 |
Can anyone please suggest any solution.
Thanks
SK
1) if you define your schema as Integer , it will reject non-numeric as Input level itself. ( un-tick "Die of error")
2) if you want to read as String and then check it can be done using regex also ( if you do not want to use external library ) .One option other than tMap could be tFilterRow.
Hi,
I believe you are looking for this solution.
The component details are as below.
You will have to download the jar commons-lang-2.2.jar to use the class NumberUtils. This can be achieved through tLibrarayLoad.
Now, use a tMap to separate the data based on the condition as shown below.
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Hi Nikhil,
Thank you so much for the quick response. Really appreciate it. Should I download the jar from talend studio (Help->Download additional packages) or should I install it externally ?
Also after I open the component I see the following options. Will be really grateful if you could guide me through this.
1) if you define your schema as Integer , it will reject non-numeric as Input level itself. ( un-tick "Die of error")
2) if you want to read as String and then check it can be done using regex also ( if you do not want to use external library ) .One option other than tMap could be tFilterRow.
Thank you Abhishek.. worked well..