This R package is a wrapper around RJDBC containing drivers for various DBMSs.
connectionDetails <- createConnectionDetails(dbms="mysql",
server="localhost",
user="root",
password="blah",
schema="cdm_v4")
conn <- connect(connectionDetails)
querySql(conn,"SELECT COUNT(*) FROM person")
dbDisconnect(conn)
DatabaseConnector is an R package using Java's JDBC drivers.
Requires R. Also requires Java 1.6 or higher (Oracle Java is recommended. Issues have been reported when using GCJ.)
Please note that this package requires Java to be installed. If you don't have Java already intalled on your computed (on most computers it already is installed), go to java.com to get the latest version.
To be able to use Windows authentication for SQL Server, you have to install the JDBC driver. Download the .exe from Microsoft and run it, thereby extracting its contents to a folder. In the extracted folder you will find the file sqljdbc_4.0/enu/auth/x64/sqljdbc_auth.dll (64-bits) or sqljdbc_4.0/enu/auth/x86/sqljdbc_auth.dll (32-bits), which needs to be moved to location on the system path, for example to c:/windows/system32.
In order to enable Netezza support, place your Netezza jdbc driver at inst/java/nzjdbc.jar
in this package.
DatabaseConnector also depends on the OHDSI SqlRender package.
Use the following commands in R to install the DatabaseConnector package:
r
install.packages("devtools")
library(devtools)
install_github("ohdsi/SqlRender")
install_github("ohdsi/DatabaseConnector")
library(DatabaseConnector)
DatabaseConnector is licensed under Apache License 2.0. The JDBC drivers fall under their own respective licenses.
DatabaseConnector is being developed in R Studio.
Stable. The code is actively being used in several projects.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.