Run R Model in Microsoft SQL Server

This node allows running R code on a Microsoft SQL Server (using a SQL query behind the scenes). Input and output data to the R script are SQL tables. In addition the knime.model (cannot be NULL, or will not be transfered to R otherwise) and variables from a R port can be used in the R script. To output data from the R script to the output SQL table, assign a R data.frame to knime.out.

JDBC driver

This node requires the Microsoft JDBC driver to be used in the Microsoft SQL Server connector. You can install the driver extension from the KNIME Update Site (KNIME Microsoft JDBC Driver For SQL Server).


R Snippet

SQL Input
Shows the SQL query defined by the input port. Its result will be available as
SQL Output Table Name
Name of the SQL table which knime.out will be written to.
Whether to overwrite when a table with the output table name already exists (failure otherwise).
R Script
The code being executed in R. Input data is available as a data frame named


A template category defined by the author.
Names of the available templates.
A brief overview of the purpose of the template.
The code to be applied to your expression editor.

Input Ports

R Workspace which contains the model.
DB Data defining the input data of the R script.

Output Ports

DB Data referencing the result table from the R script.


R Std Output
The text sent to standard out during the execution of R executable as well as the text of the .Rout file generated by R.
R Error Output
The text sent to standard error during the execution of R executable as well as the text of the .Rout file generated by R. (If it appears in gray, it's the output of a previously failing run which is preserved for your trouble shooting.)




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.