Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Is there any simple trick I can use?
Starting job forum6760 at 10:53 27/05/2009.
1|Dupont
1|Dupont
1|Dupont
1|Dupont
2|Shong
2|Shong
2|Shong
Job forum6760 ended at 10:53 27/05/2009.
Another quick trick I require, I have a filed that looks like : ;;;;;;;1;;;;1;;;;1
And I would like to be able to addition those numbers... any java killer method could help?
String[] tab = ";;;;;;;1;;;;1;;;;1".split(";");
int result = 0;
for(String s : tab) {
if(s.matches("+")) {
result += Integer.parseInt(s);
}
}
Is there any simple trick I can use?
Starting job forum6760 at 10:53 27/05/2009.
1|Dupont
1|Dupont
1|Dupont
1|Dupont
2|Shong
2|Shong
2|Shong
Job forum6760 ended at 10:53 27/05/2009.
.. I want to change the number of tuples I have in a source component based on a number located into a filed
Hello
Is there any simple trick I can use?
Yes, it is easy to finish in TOS. Here is a java senario:
in.csv:
1;Dupont;4
2;Shong;3
Result:Starting job forum6760 at 10:53 27/05/2009.
1|Dupont
1|Dupont
1|Dupont
1|Dupont
2|Shong
2|Shong
2|Shong
Job forum6760 ended at 10:53 27/05/2009.
Best regards
shong
how you do that ?
The job design is as below:
tFileInputDelimited--main(row1)-->tFlowToIterate--iterate-->tFixedFlowInput--main--tLogrow
on tFixedFlowInput, set the number of Row field with the current Number value, for example:
(Integer)globaoMap.get("row1.Number")
About tFlowToIterate component, refer to the user manual:
https://help.talend.com/reader/JuYAu6ZYt6JnyC2yfuo83w/~aaaL9zPp0xMBTIBqNXMmw
Best regards
Shong