Connect R and Teradata using JDBC

空扰寡人 提交于 2019-11-30 23:03:11

Using the R Console, enter the following steps below to make a Teradata connection:

drv = JDBC("com.teradata.jdbc.TeraDriver","ClasspathForTeradataJDBCDriverFiles") 

Example:

drv = JDBC("com.teradata.jdbc.TeraDriver","c:\\terajdbc\\terajdbc4.jar;c:\\terajdbc\\tdgssconfig.jar")  

NOTE: A path on a UNIX machine would use single forward slashes to separate its components and a colon between files.

conn = dbConnect(drv,"jdbc:teradata://DatabaseServerName/ParameterName=Value","User","Password") 

Example:

conn = dbConnect(drv,"jdbc:teradata://jdbc1410ek1.labs.teradata.com/TMODE=ANSI,LOGMECH=LDAP","guestldap","passLDAP01")

NOTE: Connection parameters are optional. The first ParameterName is separated from the DatabaseServerName by a forward slash character.

dbGetQuery(conn,"SQLquery")

Example:

dbGetQuery(conn,"select ldap from dbc.sessioninfov where sessionno=session")
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!