Merge column values in one column

Hello Knimers : D

I´m making this post for a quick question.

Is there a way or a node in which I can turn this:

image

Into this:

image

In my case all data are relationated, I just need to Join or Merge them into a single column.
But the “Column Merger” node doesnot work for some reason.

Thanks In advance

  • N

Hi @ttsk8der , if every row contains data in just one column, use a Column Aggregator to concatenate all the columns. Tell it not to include missing. Have it remove the aggregation columns. I think that should do it.

2 Likes

@takbb Hello and thank you : D

It worked Perfectly, just one thing I didn´t expected.
The values I just concatenate are durations, and the output looks like this:

image

Is there a way or an option within the node to preserve the datatype?

Again, thank you so much for your help

Hi @ttsk8der , I’ve not got KNIME in front of me at the moment but I don’t think there is such an option.
In the case of durations though can you follow the Column Aggregator with a String to Duration node?

1 Like

Helloo @takbb : D

Sure I tried it, but I got this error from console Log

ERROR String to Duration 3:109:124 Execute failed: Failed to parse time-based duration in row ‘Row6#5_Row1839_Row1378_Row6#5_Row1839_Row1378’: Text cannot be parsed to a Duration

Don´t know why haha, anyway if there is not a way probablye Im´gonna play with string cleaner node

BR

  • N
1 Like

Hi @ttsk8der , thanks for marking my suggestion as the solution. Just following up on your final issue, when I tried the String to Duration node using the 4 examples you posted, it worked

image

So, there is probably something specific with the row with rowid
Row6#5_Row1839_Row1378_Row6#5_Row1839_Row1378

Anyway, my suggestion would be to untick the “Fail on Error” in String to Duration, and have it append a new column rather than replacing the original, so that when you run it, any strings which cannot be resolved will be marked as missing
e.g.

image

Hopefully you can then more easily find (and understand) the problem row, for example by then attaching a row filter to show the rows that have missing values

HI @takbb

Yes it is the concatenation joined two rows in that node. I did not saw that hahaha

image

1 Like

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