I am new in the KNIME forum and I need your help!
I run the workflow to analyze German texts for frequent keywords. When using the Pivoting Node to make further analyzes this error message arrises:
“Execution failed: Duplicate column name “energie” (the German word for energy) at positions 870 and 14096.”
What can I do to make the Pivoting Node running? Where can I find the column names which are duplicated?
It seems you have a value in your pivoting column which is exactly the same as one of the grouping column names. And also you have selected “Pivot name” option for column naming. Or if you have selected other column naming options, the generated column name is the same as one of the existing column names (grouping columns).
You can change the column naming option to solve this issue.
Unfortunately, I cannot create an example with the same error message and I am not allowed to publish the original. I will try to modify my workflow, maybe it works
But another question: I no longer need the term “energy” for my further analysis. Is there a Node with which I can simply delete the term?
You probably have one or multiple whitespace characters prior to some “energie” values. When converted to column name whitespaces at beginning are stripped as column can not start with whitespace. Thus duplicate column name error regardless of column name settings. You can use strip() or stripStart() function from String Manipulation node to get rid of whitespaces. Give it a try if you want and let me know if it solves your problem.
Hello @ipazin,
thanks for joining! With the String Manipulation the same error occurs. Maybe it could be this sign that creates the error when pivoting the data: . There are also some terms having „ and > at their beginning. Can I use the String Manipulation with the code regexReplace? Is this also applicable for rows?
I thank you all in advance!
I tried a little bit and I think, my regexReplace($Term as String$,“☐><-€”", null) only works if there is a space between the sign and the term. Could it be? Is there a node which can delete these signs which a directly connected with the term?
Have seen you got answer here regarding regex function. Also removeChars() or replaceChars() functions work just fine. Still not sure those chars are problem because column name can start with them.