Icon

1. Write To DB

KBL: String manipulation and wrting to a database
Annotations and comments
  • String Replacement
  • Write data to SQLite Database Use the SQlite Connector node to connect to the SQLite database. Notice that SQLite is a file based database. The SQlite Connector node thus requires the path of the database file. It also supports the knime:// protocol. SQLite driver is already included in the SQLite Connector node. Drivers of most popular databases are included in database connector nodes for databases' most recent versions. Then connect a DB Writer node to the SQLite Connector node to actually write the data into a new table.
  • Joining Strings
  • String Splitting
  • Workflow: WriteToDB This workflow ultimately writes a data table into a database. In particular, we use here the SQLite database because it is file based and does not require additional installation. This workflow also shows how to performs different kinds of string manipulation, number to string conversions and viceversa. Notice that the workhorse of the string manipulation operations is the String Manipulation node, which includes a large number of string manipulation functions. Note. This workflow has to be executed BEFORE executing workflow My First Data Exploration
  • convert class_Arr[0] to UPPERCASE
  • split column class in iris and <attr> by delimiter '-' <attr> = Setosa/ Virginica/ Versicolor
  • split petal width into integer and floating by using '.' as the delimiter string in a Cell Splitter node
  • split column class in iris and <attr> by position <attr> = Setosa/ Virginica/ Versicolor
  • combine <attr> and "IRIS" into <attr>:IRIS
  • rearrange column order for next node column combiner
  • write output data table into SQLite database
  • transform integer and floating parts of petal width from double into integers
  • read data from iris.data set from KBLdata folder
  • petal width from Double to String
  • split column class in iris and <attr> by regex <attr> = Setosa/ Virginica/ Versicolor
  • Col0 -> sepal length Col1 -> sepal width Col2 -> petal length Col3 -> petal width Col4 -> class
  • from iris name to class no
  • connecting to SQLIte Database knime:// protocol supported
  • build <attr>: "IRIS"
  • replace all "Iris" with "IRIS"
  • replace all Ir* with IRIS
  • transform integer and double into numbers

Nodes

Extensions

Links