Creating more similar rows based on values in a record

Dear Andy,
here I am.
Here is the full question.
Is it possible with your software to create multiple copies of a row adding to each name field of each new row a suffix picked up from a list of values present in another field (a different value suffix for each new row)? So the field with name is costume_1 and has another field with the list piece1, piece2, piece3 I will obtain three new rows with same data and their name field becomes costume_1_piece1, costume_1_piece2, costume1_piece3. Hope to have been clear enough.
After that I want to cancel the original row and remain with derivated rows only.

origin
name pieces
costume_1 piece1, piece2, piece3
costume_2 piece1, piece3
costume_3 piece5, piece3
costume_4 piece1, piece4
result
costume_1_piece1 piece1
costume_1_piece2 piece2
costume_1_piece3 piece3
costume_2_piece1 piece1
costume_2_piece3 piece3
costume_3_piece5 piece5
costume_3_piece3 piece3
costume_4_piece1 piece1
costume_4_piece4 piece4

Thanks in advance

Yes, no problem. The crux is to use Split Col col to split into rows.

image

ANTONIA.transform (3.7 KB)

2 Likes

oooh ! splitting column into rows!! superb

2 Likes

For me this would be useful for database splitting single line to multi records

Sales Order 23456
Having Multiple BOM articles inside it and data is collected inside

23456 Silk,Cartons,Paint,Leather X

With above I can get this inside csv and split into multiple lines for parent to multiple child

In short @ANTONIA , thanks for asking this question

2 Likes

@ANTONIA,

Here is another way of doing the same with less number of transforms.

First Replace to remove any whitespace characters like spaces, tab and such from the pieces column.

Second Replace to append pieces column values to the name column as per the requirement.

Or you can even do it with two transforms.

Transform File.
CreatingMoreSimilarRows.transform (4.7 KB)

Nicely done. You win this round of Easy Data Transform golf. ;0)

1 Like