This node creates a connection to a H2 database file via its JDBC driver. You need to provide the path to the database file or the name when using in-memory mode. No username and password are required for H2 databases.
Driver URL template:
This node uses the selected driver's URL template for creating the concrete database URL. For additional drivers, which are not provided by the KNIME database modules, the URL template is to be specified on the driver preferences page under KNIME/Databases. E.g.jdbc:h2:[location=file?<file>][location=in-memory?mem:<database>]
is a possible H2 driver URL template.
- Mandatory value (e.g. <database>):
The referenced variable must have a non-blank value. The name between the brackets must be a valid variable name. Please refer to the variable descriptions below.
- Optional value (e.g. [database]):
The referenced variable may have a blank value. The name between the brackets must be a valid variable name. Please refer to the variable descriptions below.
- Conditional part (e.g. [location=in-memory?mem:<database>]):
The first ? character separates the condition and the content that will be included in the URL only if the condition is true. The only explicit operator available currently is =, to test the exact value of a variable. The left operand must be a valid variable name, and the right operand the value the variable is required to have for the content to be included. Please refer to the variable descriptions below for the variables available in conditions and their possible values.
The content may include mandatory and/or optional tokens (<database>/[database]), but not conditional parts.
Testing that a variable has a non-blank value is possible without an operator, just by specifying a valid variable name as the condition. E.g.
(The second ? in this example is part of the content to be included, which may be the start of the URL's query component.)
The Location choice on the Connection Settings tab. The file value corresponds to the radio button next to Path being selected, and in-memory to the radio button next to In-memory. This variable can only be used in conditions.
The value of the Path field on the Connection Settings tab. This variable is only valid if the value of location is file.
The value of the In-memory field on the Connection Settings tab. This variable is only valid if the value of location is in-memory.
Field validation in the dialog depends on whether the (included) tokens referencing them are mandatory or optional.
- Type: DB Session H2 DB Connection.