on 02-23-2012 7:00 AM
Hi,
The mapping requirement is input value is 400
example
in put value is (before space)
400000
400
output is comes like this(after space)
400000
400
Thanks and regards,
Kesava.
You can use standard trim function only to remove leading and trailing spaces. That means beginning and ending white spaces. If you find spaces in the middle then you have to use UDF to remove the spaces.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
output is comes like this(after space)
400000
400
approach1:
field( 400) -> trim(Text fun . group) -> udf-> target field(400 )
udf: space depends on field
String Addspace(int var1, Container container) throws StreamTransformationException{
String var2 ="";
for (int i=0; i<=var1;i++)
{var2 = var2 + " ";
}return var2;
approach2:
field( 400) -> trim(Text) -> concat + costant( space )-> target field(400 )
Edited by: bhavanisankar.solasu on Feb 23, 2012 2:09 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
In put value is (before space)
400000
400
output is comes like this(after space)
400000
400
The Input and output look the same, so I'm guessing there are whitespaces before/after the input. So you can use the standard String function called trim to remove the whitespaces.
Hope this helps,
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kesav,
Req not clear give some more info
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
77 | |
9 | |
9 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.