on 03-12-2009 11:39 AM
Hi...
I am having an input file as shown below.
Record --- 1 to unbounded
Field1--- Test1
Field2 --- Test2
Field3 --- YTest3 -(Length -142) YTest4-- (Length -142) YTest4---- (Length -142)YTest5 --- (Length -NTest6 -- (Length -142)142)
In the above structure, The Record is repeating. In the Record 3 fields are there. The third field is having data like YTest3,YTes4,YTest5,NTest6. In that if the starting value is Y, then we can say that next Statement is present. If the starting value is N, then that satement ends and the field3 will be ended.
In the Target i need to map like
Record --- 1 to unbounded
Statement1 -
YTest3
Statement2 --- YTest4
Statement3 -
YTest5
Statement4 --- NTest6
Can you please help in mapping.
Thanks & Regards,
Leela
Can
Hi Leela,
There is no need to check if first character is a Y or N if you'll be using a UDF splitter based on a "comma".
See code below:
UDF type is context
argument is input
String b[] = input[0].split(",");
for (int a=0;a<b.length;a++){result.addValue(b[a]);}
FIELD3 --> UDF --> Target (1..unbounded)
Let me know if this works,
Regards,
Edited by: Mark Dihiansan on Mar 12, 2009 1:55 PM
Edited by: Mark Dihiansan on Mar 12, 2009 1:57 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
First we need to capture the occurence of the target (Statement - 0 .. ountbound) node.
For this we need to first get the entire element data of "FIELD3" and check number of element starting with T + N.
After that we need to split each value and mapp accordingly
any ideas
Srini
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Just divide the field3 like, map statement1 with field3 substring(0,142), statement2 with field(142,284) and so on... If you want use mapWithDefaultValue or Exists.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.