Values from multiple columns into single column

Hi,

I am currently working on a workflow, where I need to combine values from multiple columns into a single column.

The amount of input columns changes based on the input file. Sometimes it´s 3 columns, sometimes 16. The data type of the columns is path.

Here is an example of what the input data looks like input data.


column1 column2 column3
ABC.jpg DEF.jpg GHI.jpg
JKL.jpg MNO.jpg PQR.jpg
… … …


This is what the output column should look like. The order of the values does not matter, all that matters, is that the values are in one column


OutputColumn
ABC.jpg
DEF.jpg
GHI.jpg
JKL.jpg
MNO.jpg
PQR.jpg


I could not wrap my head around this one and could not find any help online yet.
I hope someone can help me out. Thanks in advance!

Hi @e2dboden , I think you should be able to use Column Aggregator followed by Ungroup

The input dataset is your three Path columns
image

Specify input columns on Column Aggregation but “enforce exclusion” so that any additional columns (when it varies from file to file) will be included in the aggregation

Set options to aggregate as “List”, and remove aggregation columns

Then simply Ungroup the [...] List column

The result…
image
Merge multiple columns.knwf (13.7 KB)

… and Welcome to the Community! :slight_smile:

3 Likes

Thank you so much @takbb.

Exactly what I was looking for.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.