Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
i'm new to the talend and im trying to use Talend Open Studio for Data Integration for converting csv into an xml file. I ran into trouble because i am having multiple columns bullet1 - bullet20 which I want to bring into the loop custom-attributes. Basic idea is to use the flatfile columns to fill a new attribute in the xml with the content of the columns. I know whats showed on the image does not work, its just to demonstrate the problem. I got 20 input cols which should each create a xml node inside of custom-attributes.
Any ideas on that?
Big thanks in advance!
i3
@kolfe since you need to concatinate columns like row3.bullets1 || row3.bullets2.
try in this way.
Thanks for your input. That doublepipe will throw an error: "The operator || is undefined for the argument type(s) java.lang.String, java.lang.String". I could use + to concat but that would put all togehther into the same node and not one custom-attribute node each.
yes you can use + to
you can add into single node using +
xml result should look like this:
...
<custom-attribute>{row3.bullets1}</custom-attribute>
<custom-attribute>{row3.bullets2}</custom-attribute>
<custom-attribute>{row3.bullets3}</custom-attribute>
<custom-attribute>{row3.bullets4}</custom-attribute>
...
not likes this
<custom-attribute>{row3.bullets1} {row3.bullets2} {row3.bullets3} {row3.bullets4}</custom-attribute>