Database Writer

This Node Is Deprecated — This node is kept for backwards-compatibility, but the usage in new workflows is no longer recommended. The documentation below might contain more information.

This node is part of the deprecated database framework. For more information on how to migrate to the new database framework see the migration section of the database documentation.

Establishes and opens a database access connection to which the entire input table is written to.

If the optional input is connected the database connection information is taken from the port, otherwise you need to specify the connection information in the dialog.

Make sure you have your vendor-specific database driver registered in the KNIME preference page (section Database Driver).

Options

Settings

Database Driver
Enter the database driver here; it is a Java class (including the package path). Additional driver can be registered via KNIME's preference page (Database Driver).
Database URL
Enter the database name here, for example: jdbc:mysql://host:port/database_name
Workflow Credentials
If checked, the credentials (user and password) are used as defined on the workflow. The credential name links to the specified user and password. Those can be replaced or edit using the 'Workflow Credentials' menu available in the workflow context menu.
User Name
Your log-in user name for the database.
Password
Your log-in password for the database. Note, the password is de- and encrypted before handling it internally and is not stored inside the settings.
TimeZone
Select the TimeZone to convert the date, time or timestamp field into. The current implementation can't represent time zones. In order to support persisting those fields into a database, the time values can be changed according to the selected time zone, which is used as the offset (including the daylight saving time) for the original values: No Correction (use UTC) is used for workflows (created before 2.8) and doesn't apply any correction, Use local TimeZone uses the local time zone offset to correct the date field before reading or writing, and TimeZone: allows selecting the time zone to covert the date values into.
Allow spaces in column names
Some databases do not allow whitespace characters in column names. If your database supports spaces in column names you can enable this option. Otherwise whitespace characters will be replaced by underscores.
Table Name
Enter the name of the table to which data should be written. Note, if this table exists, the table is dropped before writing.
Append Data
Check this to append the input data to an existing table with the same data structure. If the table does not exist a new one will be created. Note, if this box is unchecked an existing table is dropped before execution of this node.
Insert null for missing columns
Check this option to force KNIME to insert null into all database columns that are not present in the KNIME input table. This option is only available if the append data option is selected.
Fail if an error occurs
If this option is checked the node will fail with an exception if an error occurs while writing the data e.g. a unique key constraint violation. If not checked the node displays a warning with information about the failing rows and will write as many rows as possible.

SQL Types

Types
Enter the SQL types here to write integer-, double-, or string-valued columns to the database. By default integers are defined as type "integer", doubles as "numeric(10,30)", and all other columns, including strings are written as "varchar(255)". Some databases such as MS Access and Firebird do not allow this numeric precision, therefore you must select "numeric" as the SQL type. If your database allows strings longer than 255 chars, you can change this value in order to write long strings such as SLNs or Smiles.

Advanced

Batch Size
Enter a number greater than 0 for the number of rows written in one batch job; 1 means on row at a time.

Input Ports

Icon
Table with data to write into database
Icon
An optional database connection that should be used instead of providing the connection information in the dialog.

Output Ports

This node has no output ports

Views

This node has no views

Workflows

Links

Developers

You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.