0

I have a very tricky situation and have yet to come up with my own solution using Talend. I have an input MySql that has a number of columns and need to copy first string from MATCHING column to contactFirstName column when VALUE column contains 1;1;1

i am using tjavarow component.

Required description: Click here for required description

Batch design: Click here for batch design

tobi6
  • 8,033
  • 6
  • 26
  • 41

2 Answers2

2

Using a simple tMap, use the following expression for contactFirstname field in the output flow:
row46.VALUE.equals("1;1;1") ? row46.MATCHING.replaceAll(";.*$", "") : row46.contactFirstname

Here is a capture of the tMap I use for testing: enter image description here

Hope this helps.
TRF

TRF
  • 791
  • 4
  • 9
0

You could use a specific flow in your tMap and filter it by the column which contains 1;1;1. Then, you could replace value from contactFirstName in your tMap. The two flows go in database or memory. You could continue your process by using OnSubJobOk