{"title":"DB Writer","nodeType":"Sink","id":"*9r94oazAJx1JxCzT","factoryName":"org.knime.database.node.io.write2.DBWrite2NodeFactory","factoryId":"org.knime.database.node.io.write2.DBWrite2NodeFactory","path":["DB","Read/Write"],"owner":"knime","ownerAccountId":"account:team:b5f0848f-496d-4e6a-b869-fa3532248db7","description":"<p><a href=\"https://en.wikipedia.org/wiki/Insert_%28SQL%29\" rel=\"ugc nofollow noopener noreferrer\">Inserts</a> data rows into the database based on the selected columns from the input table.\n <br />\n If the database table does not exist it will be created by the node prior inserting the values. The new table will have a column for each input KNIME column. The database column name will be the same as the name of the input KNIME column. The database type is derived from the given KNIME type based on the output type mapping rules specified in the &#34;Output Type Mapping&#34; tab. All database columns will allow missing values (NULL). Please use the <i>DB Table Creator</i> node if you want to control the properties of the created database table.\n <br />\n If the table already exists in the database all selected column names need to exactly match the column names within the database table.</p>\n        ","shortDescription":"Inserts the selected rows in the database based on the selected columns from the input table.\nCreates a new table if the table does not exist.","keywords":["database","db","write","insert","drop","append"],"deprecated":false,"streamable":true,"tags":["DB","Read/Write","Streamable"],"icon":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOxAAADsQBlSsOGwAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAADLSURBVDiNpdE9ToJBFIXhhwIJCSixomMD7sA10Fi5AK2pcScUNtSUIGuwJHSoiTGx00ISEqygQJPJfDME+G5yi5lz5p37Q8moYIEvzDH+y03CuwneFIQwpylToGeF//xB/RTALya42gOPE9ziGs0DqksC2PXcQQ/PaB3TwgvWgWGl5BCfUqZDAO8YoJ0BZOMSZ8G5jmrkqeEuB7iwW90NhliiEehdvOIzB4hn8B1oDwm9sMr44jH6oIuPfRW8YYYR7hX7h3P0c4BSsQW8wViZrjsMmQAAAABJRU5ErkJggg==","views":[],"inPorts":[{"objectClass":"org.knime.core.node.BufferedDataTable","color":"000000","dataType":"Table","optional":false,"name":"Data to write into the database","description":"KNIME data table with the data rows to write into the database."},{"objectClass":"org.knime.database.port.DBSessionPortObject","color":"cc005b","dataType":"DB Session","optional":false,"name":"DB Connection","description":"DB Connection to the database."}],"outPorts":[{"objectClass":"org.knime.core.node.BufferedDataTable","color":"000000","dataType":"Table","optional":false,"name":"Input Data with Write Status","description":"Input KNIME data table with additional columns providing the number of affected rows in the database and warnings, if checked in the dialog."},{"objectClass":"org.knime.database.port.DBDataPortObject","color":"66002d","dataType":"DB Data","optional":false,"name":"DB Data","description":"DB Data referencing the selected database table."}],"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":"Database name","description":"The name of the database (or catalogue) to use.","optional":false},{"name":"Schema name","description":"The optional database schema name.","optional":false},{"name":"Table name","description":"Name of the database table to write to.","optional":false},{"name":"If a database error occurs","description":"The option allows you to change the behavior if a database error occurs.\n<ul><li><b>Fail</b> : The node will abort the execution and fail on errors.</li><li><b>Ignore</b> : The node will ignore errors.</li></ul>","optional":false},{"name":"Batch size","description":"Enter a number greater than 0 for the number of rows updated in one batch job. Entering 1 disables batch processing. This way only one row is processed at a time.","optional":false},{"name":"If table exists in database","description":"If no table with the given name exists in the database a new table will be created. However if a table with the entered name already exists in the database one of the following operations is performed depending on the selected option:\n<ul><li><b>Append rows</b> : All data rows will be appended to an existing database table. All previous data will be preserved.</li><li><b>Remove existing table and contained data</b> : Overwrites an existing database table. All previous data will be deleted.</li><li><b>Fail</b> : The node will fail if a table with the same name already exists in the database.</li></ul>","optional":false},{"name":"Columns to write (SET in SQL)","description":"Select the columns which should be merged in the database e.g. if a matching row exists the values of the selected columns are updated otherwise a new row is created and the values of the selected columns are inserted in to the corresponding database columns. The column names in the KNIME input table need to match the column names in corresponding database table. In SQL this is equivalent to the <i>SET</i> columns.","optional":false},{"name":"Append status column (to KNIME table)","description":"If selected, it adds an extra column to the output table. The status column is the number of rows affected by the SQL statement. A number greater than or equal to zero indicates that the command was processed successfully and is an update count giving the number of rows in the database that were affected by the command&#39;s execution. A value of 2 indicates that the command was processed successfully but that the number of rows affected is unknown.","optional":false},{"name":"Status column name","description":"Name of the new status column.","optional":false},{"name":"Append error column (to KNIME table)","description":"If selected, it adds an extra column to the output table. The error column shows a warning message, if any.","optional":false},{"name":"Error column name","description":"The name of the error column.","optional":false},{"name":"Disable DB Data output port","description":"Select this option to disable the DB Data output port and the execution of the metadata query at the end of the node execution which might cause problems with databases that do not support subqueries.","optional":false},{"name":"Name","description":"Columns that match the given name (or regular expression) and KNIME type will be mapped to the specified database type.\n<ul><li><b>Column selection type</b> : The option allows you to select how the column is matched.\n  <ul><li><b>Manual</b> : Use the exact name of the column</li><li><b>Regex</b> : Allow regex expressions to select multiple columns</li></ul></li><li><b>Column name</b> : The name or regex expression.</li><li><b>Source type</b> : Datatype to map from.</li><li><b>Mapping to</b> : SQL type to map to.</li></ul>","optional":false},{"name":"Type","description":"Columns that match the given KNIME type will be mapped to the specified database type.\n<ul><li><b>From type</b> : Datatype to map from.</li><li><b>To type</b> : SQL type to map to.</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":[]}
