Maybe this is known to most, but for me it was a struggle, so I thought I'd share this little tip:
When using the GroupBy node, the Header will contain things such as
Not sure if of interest to change the headers back to the original already after this step (though possible as well), but certainly after using Ungroup node one might want to restore original headers. There is a solution out with 2 or three nodes, saving the header names, but that is a bit unflexible imho, esp if one has added columns after GroupBy. Alt. one can of course just rename every column one by one (certainly unflexible).
With the node Column Rename (Regex), it can be done in one step. In Main Configuration tab (See also attached picture) write:
- Search String (regexp): ^[^()]+\((.*)\)$
- Replacement: $1
This should cover all of above, even if there are () inside the bracket, i.e.
List*(Myheader(mytext)) will give Myheader(mytext).
Of course I haven't covered all scenarious, but I think this solution covers a lot. Hope this helps others. And please do leave comments/suggestions.
PS: no, I am not a regex expert, I had help from a colleague at work.