How do you join a cell separated by a comma (,) if a certain condition is met. I.e if the "Record ID Cloned = Record ID (from any row in the data) => (then give me) “Record ID, Record ID Chain (Output)”. The Record ID Chain (Output) is the output im trying to create but we can have two columns if needed.
If you join the 2 columns (if necessary create duplicate columns) and then Groupby record id with concatenate as aggregation type and separator a comma?
br
thanks for sharing the data. Based on your description:
If the "Record ID Cloned = Record ID (from any row in the data) => (then give me) “Record ID, Record ID Chain (Output)”.
The best approach would be to follow “divide & conquer”. You basically split apart based on the condition, which could be many (Dictionary Row Split), followed by whatever task you want to accomplish … in this case a join with comma as a separator.
But given the fact that there are no results, either the data is incorrect or you wanted to accomplish something else. Please let me know.
Hi @mwiegand ,
The desired result is the 4th Column "Record ID Chain (Output). This column isn’t in my data set so this is the column i’m trying to create. Hope this clarifies, thanks David.
Ah, So you mean when the task letter matches in the first two column then concatenate. I have updated the workflow accordingly. Worth to note that it uses the Regex Extractor Node form the awesome Palladian extension.
Hi Mike,
Is there a way to achieve this without the Regex extractor? I checked in and for this project, we are not allowed to use extension nodes - only standard knime nodes are permitted.
@mwiegand Thanks! It looks like the Regex extractor perfectly though unfortunately I cant use the additional nodes. The other steps don’t seem to be producing the desired output, can you please walk through your logics, maybe i can recreate
PS: Workflow was updated but no change was made to the nodes. I just wrapped them in a component for convenience reasons. Though, may I ask why you are not allowed or cannot install extensions?
Hi Mike @mwiegand ,
I can’t use additional nodes as I need a solution that I can be utilized widely. I have also marked as solution as your method does solve the question as asked. I should have clarified that I was looking for a solution that can be utilized with multiple sets of data applying the same logic. I will create a new post with the clarifications. Thanks for engaging.