Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Could you please tell how to split two columns into multiple following scenario?
Consider a sample input file as below:
Id, String1,String2,String3,Date1,Date2,Date3
Expected Output:
Id,String1,Date1
Id,String2,Date2
Id,String3,Date3
---------------------------------------------------------------
I have tried concatenating all String columns -String1@String2@String3 into one column and used that column to normalize using tNormalize component.
(But it is not what I expect)
Id,String1,Date1,Date2,Date3
Id,String2,Date1,Date2,Date3
Id,String3,Date1,Date2,Date3
Probably not the most efficient solution, but gets the job done as long as the positions for every element remains consistent in your input set. You wouldn't even need the last tJavaRow if you want your output as one column.
How many columns you have in source?
is it 7 columns?
Regards,
Yes 7 Columns.
For every ID, 3 records needs to be created.
Example:
1, Veeru, Karthik, Jay, 2018-06-30,2018-04-14,2018-05-01
Output:
1, Veeru, 2018-06-30
1, Karthik, 2018-04-14
1,Jay, 2018-05-01
Probably not the most efficient solution, but gets the job done as long as the positions for every element remains consistent in your input set. You wouldn't even need the last tJavaRow if you want your output as one column.
You can try below.
Regards,