• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » If then else in talend and separate string in tMap

#1 2012-06-03 11:24:25

rocknrolla
Member
Registered: 2012-04-15
Posts: 14

If then else in talend and separate string in tMap

hello, i need to use if then else in tMap component and what i know is only if else condition. how to use if then else in talend?

and how to separate string if it goes like this (abcd, efgh, ijkl, mnop) then i want to separate it for different element but in the same loop (btw, i use it for tAdvanceXMLOutput later)

from this form:

<root>
<book> abcd, efgh, ijkl, mnop</book>
</root>

so it will goes like this:

<root>
<book number = "1">abcd</book>
<book number = "2">efgh</book>
<book number = "3">ijkl</book>
<book number = "4">mnop</book>
</root>

thank you

Offline

#2 2012-06-03 12:16:51

shong
Talend team
Registered: 2007-08-29
Posts: 10297
Website

Re: If then else in talend and separate string in tMap

Hi

On tMap, you can use the if ...else logic like:

condition1?value if true:(condition2?value if true:value if false)

Before generating the XML file, using tNormalize is to separate one row to more rows.

Best regards
Shong


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the leader of open source data management and application integration solutions!

Offline

#3 2012-06-03 12:28:52

rocknrolla
Member
Registered: 2012-04-15
Posts: 14

Re: If then else in talend and separate string in tMap

shong wrote:

Hi

On tMap, you can use the if ...else logic like:

condition1?value if true:(condition2?value if true:value if false)

Before generating the XML file, using tNormalize is to separate one row to more rows.

Best regards
Shong

thanks for the answer

can you tell me how to use tNormalize?, can i combined it with tMap?

Offline

#4 2012-06-03 12:37:31

shong
Talend team
Registered: 2007-08-29
Posts: 10297
Website

Re: If then else in talend and separate string in tMap

Hi
Here is a scenario showing how to use tNormalize component.

Best regards
Shong


Uploaded Images


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the leader of open source data management and application integration solutions!

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » If then else in talend and separate string in tMap

Board footer

Powered by FluxBB