Talend Connect
Virtual Summit
JOIN US!
And visit the Customer
& Community Lounge.
May 27-28, wherever you are.

how can split Date and insert as a new row

Highlighted
Eight Stars

how can split Date and insert as a new row

Hello everyone,

i have a scenario where  input table column is like this

Input:-           

Date Of Brith                                           emp name

                

01-05-2002         03-09-2017                 Manish

07-05-2001        05-02-2016                   Lokesh

 

i want to split this and load every date in new row

Output:-

Date Of Birth                             emp Name

  1. 01-05-2002                        Manish 
  2. 03-09-2017                        Manish
  3. 07-05-2001                        Lokesh
  4. 05-02-2016                      Lokesh

Thanks In advanced

Regards,

Manish

Highlighted
Sixteen Stars
Sixteen Stars

Re: how can split Date and insert as a new row

I assume you are able to have a schema with 3 fields for your input.

In such a case, have a look to tSplitRow, it's here for that.


TRF
Highlighted
Eight Stars

Re: how can split Date and insert as a new row

hello sir,

thanks for reply..

can you please explain me how it works, and how can we use tsplitrow for this scenario.

 

 

Highlighted
Sixteen Stars
Sixteen Stars

Re: how can split Date and insert as a new row

I suppose your schema is like this:

DateOfBrith1
DateOfBirth2
EmpName

Base on this schema, you 1rst need to define the output schema for the tSplitRow component:

DateOfBrith
EmpName

Then, define the mapping for the tSplitRow like this:
Capture.png

Here, row3 is the input flow for tSplitRow, and 2 output records are made for each imput record, 1 with 1rst birthdate + name, the other with 2nd birthdate + name.


TRF

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog