0

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.

mastercool
  • 463
  • 12
  • 35

2 Answers2

0

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

mastercool
  • 463
  • 12
  • 35
-1

One approach:

  1. Loop for each row in the data set.

1.1. Put the name and address into a "current person" string.

1.2. When you get to the form "field", parse that.

1.2.1. For each form in the form field

1.2.2. Print (add to vector, etc.) the "current person" + "current form" - Concatenate.

It's a very basic, straight forward approach, so get that first, understand how it works, then consider other approaches - if any.

OneKneeToe
  • 85
  • 7