logo-MindMajix
PostTalendTalend
T
Tim Parker

Posted on 22nd June 2024|36 views

0
votes

Describe The Process To Separate The Given Names Into First_name And Middle_names Columns In Talend.

1 answers
Answers
P
Aryan Sharma

Posted on 22nd June 2024| views

 We use an expression called the ternary operation to separate the given names. A simple tMap expression is just a single line Java Code. 

  • For the first name extraction, we use this expression.

 

StringHandling.INDEX(row1.GivenNames," ") > 0 ? StringHandling.LEFT(row1.GivenNames,StringHandling.

INDEX(row1.GivenNames," ")) : row1.GivenNames

 

  • For middle name extraction, we use

 

StringHandling.INDEX(row1.GivenNames," ") > 0 ? StringHandling.RIGHT(row1.GivenNames,StringHandling.

LEN(row1.GivenNames)-StringHandling.INDEX(row1.GivenNames," ")–1) : ""

 

Write your answer

STILL GOT QUERIES?

Get a Live FREE Demo

  • Explore the trending and niche courses and learning maps
  • Learn about tuition fee, payment plans, and scholarships
  • Get access to webinars and self-paced learning videos
Name
Course *
Email *
Phone Number