on 10-13-2011 12:58 PM
Dear Experts,
We have to Concatenate all the entries of a table in a string field, we want to do with graphical mapping. An example is:
Source:
<ITEM>
<TEXT>A</TEXT>
</ITEM>
<ITEM>
<TEXT>B</TEXT>
</ITEM>
<ITEM>
<TEXT>C</TEXT>
</ITEM>
Target:
<XML>
<TEXT>A B C</TEXT>
</XML>
Somebody knows if it is possible with graphical mapping?
Any help will be appreciated.
Thans and regards,
MML.
Hi,
You can achieve this with simple UDF...
textremovecontext-concatUDF---targetText
public void concatUDF(String[] var1, ResultList result, Container container) throws StreamTransformationException{
String res = "";
for(int i=0;i<var1.length;i++){
res = res" "var1<i>;
}
result.addValue(res);
}
Regards,
Priyanka
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You will need to write an advanced UDF to do this
Using Java code, you could retrieve all the values of a queue and then concatenate them
rgds
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.