Warm tip: This article is reproduced from serverfault.com, please click

How to make multiple rows from one row in Talend?

发布于 2020-12-28 21:38:56

I have data that looks like this:

Name | Address | FormName
John | 123 Apple Drive | Form1 Form2 Form3
Dave| 133 Westchester Drive | Form1 Form2 Form3

How can I turn this into multiple rows based on that FormName column? So the result would be:

Name | Address | FormName
John | 123 Apple Drive | Form1
John | 123 Apple Drive | Form2
John | 123 Apple Drive | Form3
Dave| 133 Westchester Drive | Form1 
Dave| 133 Westchester Drive | Form2
Dave| 133 Westchester Drive | Form3

So a row was created for each form for each person.

I tried using the tJavaFlex component but that seems too complicated for this simple task.

Questioner
mastercool
Viewed
0
mastercool 2020-12-29 06:12:55

I found out that tNormalize does exactly this! I hooked up tNormalize to my tMap like this: img1

And in tNormalize component I specified what I wanted to separate on (spaces) and what column to normalizeenter image description here