{"title":"DB Column Name Replacer","nodeType":"Manipulator","id":"*rPu0ZkqfZ-sXwzeS","factoryName":"org.knime.database.node.manipulation.columnrename.regex.DBRenameColumnRegexNodeFactory","factoryId":"org.knime.database.node.manipulation.columnrename.regex.DBRenameColumnRegexNodeFactory","path":["DB","Query"],"owner":"knime","ownerAccountId":"account:team:b5f0848f-496d-4e6a-b869-fa3532248db7","description":"<p>Renames all columns based on a search &amp; replace pattern. The search pattern is a regular expression, literal, or wildcard expression.</p>\n            \n            <p>In the simplest case, you can search and replace string literals. E.g. if the input columns are called &#34;Foo 1&#34;, &#34;Foo 2&#34;, &#34;Foo 3&#34;, etc and the search string is &#34;Foo&#34;, the replacement is &#34;Bar&#34;, the output would be &#34;Bar 1&#34;, &#34;Bar 2&#34;, &#34;Bar 3&#34;.</p>\n            \n            <p>More complicated cases contain <a href=\"http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html#cg\" rel=\"ugc nofollow noopener noreferrer\"> capturing groups</a> , i.e. expressions in parentheses that, if matched in a column name, are saved. The groups can be referenced in the replacement string using <tt>$g</tt> , whereby <tt>g</tt> is a number 0-9. These placeholders will be replaced by the original occurrence in the input column name. For instance, to rename the columns that are produced by the Data Generator node (they follow a scheme <tt>Universe_&lt;number1&gt;_&lt;number2&gt;</tt> ) to <tt>&lt;number2&gt; (Uni &lt;number1&gt;)</tt> , you would use as search string: &#34;Universe_(\\d&#43;)_(\\d&#43;)&#34; and as replacement: &#34;$2 (Uni $1)&#34;.</p>\n            \n            <p>The special sequence <tt>$i</tt> represents the current column index (unless escaped by &#39;\\&#39; (backslash)). E.g. in order to precede each column name with the column index, use as search string &#34;(^.&#43;$)&#34;, capturing the entire column name in a group, and as replacement &#34;$i: $1&#34;.</p>\n            \n            <p>Further documentation regarding regular expressions can be found in the Java API documentation, in particular the classes <a href=\"http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html\" rel=\"ugc nofollow noopener noreferrer\"> Pattern</a> and <a href=\"http://download.oracle.com/javase/6/docs/api/java/util/regex/Matcher.html\" rel=\"ugc nofollow noopener noreferrer\"> Matcher</a> .</p>\n            \n        \n        ","shortDescription":"Renames all columns based on a regular expression search & replace pattern.","keywords":["DB Column Rename (Regex)","replace","rename","database","regex","column"],"deprecated":false,"streamable":true,"tags":["DB","Query","Streamable"],"icon":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOxAAADsQBlSsOGwAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAFbSURBVDiNpdK9a1RBFAXw38x7QQRFE4W4vJU0izapRRCxsVoQIV1aq3T5O6zsrSSVpZWoiCSN+IGNuIUuFpIqjZpENpDEGYu3C8/NBldyYWA4c8+55869nDAKfMEyriGg/z8CAXkMe4buEH+D2WO4S+gZJjbPNk5PIHyYpBIb9308xQ3sTWMfSnX/m/iI3X8RWq3WQkrl2a2tzU8jB4/xGnNYxVucR1FdrK50Op1Tfyn8Lm6W0nK73Z4bOejjMkaJA2xX89VaznYGu3tXcbupkbmTD/Ktar7qRXQaZNhATtkLMQwIraON5PVQupuzbvMTv+Eh7iGG4H7O+Qf5zDg9CNcdWgnRuxIX8Es9BeoRFiHppiLOxJxeqRcOHOby5Uy5/z6leCnG9ADOYVG9GGvYwZGqjtmDEj/HsO9DR1NFOQF70rg3V3kBnxtvS+gFfB1W7OM5HuFgWgcnjj/3MmENSVskCQAAAABJRU5ErkJggg==","views":[],"inPorts":[{"objectClass":"org.knime.database.port.DBDataPortObject","color":"66002d","dataType":"DB Data","optional":false,"name":"DB Data","description":"DB data with columns to rename"}],"outPorts":[{"objectClass":"org.knime.database.port.DBDataPortObject","color":"66002d","dataType":"DB Data","optional":false,"name":"Renamed DB Data","description":"DB data with renamed columns"}],"dynInPorts":[],"dynOutPorts":[],"additionalSiteInformation":{"url":"https://update.knime.com/analytics-platform/5.12","trusted":true,"enabledByDefault":true,"name":"KNIME Analytics Platform 5.12 Update Site","version":"5.12.0"},"dialog":[{"sectionName":"Options","fields":[{"name":"Pattern type","description":"Select the type of pattern which you want to use.\n<ul><li><i>Literal</i> matches the pattern as is.</li><li><i>Wildcard</i> matches <tt>*</tt> to zero or more arbitrary characters and matches <tt>?</tt> to any single character.</li><li><i>Regular expression</i> matches using the full functionality of Java regular expressions, including back references in the replacement text. See the <a href=\"http://docs.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html\" rel=\"ugc nofollow noopener noreferrer\">Java API </a> for details.</li></ul>","optional":false},{"name":"Use backslash as escape character","description":"If checked, the backslash character can be used to escape special characters. For instance, <tt>\\?</tt> will match the literal character <tt>?</tt> instead of an arbitrary character. In order to match a backslash you need to escape the backslash, too ( <tt>\\</tt> ).","optional":false},{"name":"Case sensitive","description":"Specifies whether matching will distinguish between upper and lower case letters.","optional":false},{"name":"Pattern","description":"A literal string, wildcard pattern or regular expression, depending on the pattern type selected above.","optional":false},{"name":"Replacement text","description":"The replacement text for the pattern. If you are using a regular expression, you may also use backreferences (e.g. $1 to refer to the first capture group. Named capture groups can also be used with (?&lt;group&gt;) and ${group} to refer to them).","optional":false},{"name":"Replacement strategy","description":"Select what to replace in case a string matches a pattern.\n<ul><li><i>Whole string</i> replaces the entire string with the replacement string, requiring an exact match of the whole string.</li><li><i>All occurrences</i> replaces all occurrences of the pattern with the replacement string. Note that when e.g. matching on the RegEx-pattern <tt>.*</tt> , an empty string at the end of the input is also matched and replaced. To avoid that, use e.g. the pattern <tt>^.*</tt> to indicate that the match has to start at the beginning of the string.</li></ul>","optional":false}]}],"links":[],"kudos":[],"kudosCount":0,"bundleInformation":{"bundleVersion":"5.12.0.v202606171318","bundleName":"KNIME database nodes","bundleSymbolicName":"org.knime.database.nodes","bundleVendor":"KNIME AG, Zurich, Switzerland","featureSymbolicName":"org.knime.features.database","featureName":"KNIME Database","featureVersion":"5.12.0.v202606171318","featureVendor":"KNIME AG, Zurich, Switzerland","extensionId":"*0mIkLShcIfCXS7Y-"},"frequentSuccessors":[]}
