Split collection column node

Hi,

Can someone please tell me how to rename column in Split collection column node?

Hi @tanvi,

By default, all the output columns of the Split Collection Column node are named Split Value 1, Split Value 2., … You can use the Column Rename node to rename single columns or the Column Rename (Regex) node to rename all the models using Split Value(.+) as search string an NewName$1 as replacement.

Cheers,
Simon

@SimonS …except that it is not entirely true that you always get “Split Value” as column names after applying Split Collection Column. If you use the Create Collection Column node to make a collection column while removing the original columns, and then immediately split the collection column again, the old column names magically reappear from out of nowhere. Is this a bug or intentional behaviour? And if it is intentional behaviour, what is the idea behind it? It feels inconsistent.

Hi @Aswin,

This is true and intended behavior. The idea is simply that you don’t want to lose the column names if you put them into a collection and split it afterwards again. However, I agree that it might be an inconsistent behavior. A setting to choose whether to use the original column names or new column names (Split Value 1, Split Value 2, …) in the Split Collection Column node would be a nice enhancement.

Cheers,
Simon

1 Like

@SimonS it can be nice that the column names are kept, but the names disappear when you do something with the collection inside a Java Snippet. This means that rest of the workflow may suddenly stop working once you insert a Java Snippet somewhere, even if the size and type of the collection remain exactly the same. I like your idea of adding an option to the Create Collection Column node.

1 Like

I will create a ticket for this enhancement so that we will add this option to the node!

Thank you for your feedback!

Simon

1 Like