Testing Connection to Vantage with Teradata ODBC Driver | Teradata R Package - Testing Connection to Vantage with Teradata ODBC Driver - Teradata R Package

Teradata® R Package User Guide

Product
Teradata R Package
Release Number
16.20
Published
February 2020
Language
English (United States)
Last Update
2022-05-02
dita:mapPath
qbt1519078127352.ditamap
dita:ditavalPath
Generic_no_ie_no_tempfilter.ditaval
dita:id
B700-4005
lifecycle
previous
Product Category
Teradata Vantage
After installing the tdplyr package on the client, you can load the tdplyr package, and use the td_create_context() function to establish a connection to the database from the R interface on the client.
  1. Load the tdplyr package:
    library(tdplyr)
  2. Use td_create_context() to establish a connection to the database:
    For example, assume that your DSN is called "TDDSN", then from the R command line interface, run the command:
    con <- td_create_context("TDDSN")
    When your DSN specification contains at least the connection data source name, user name and password information, this command run successfully without any error message.
    Otherwise, also specify as needed the function string arguments dsn=<data-source-name>, uid=<username>, and pwd=<password>.
    For example:
    con <- td_create_context(dsn="TDDSN", uid="user1", pwd="user1",database="TDDB")
  3. Run the command con to show the details of the connection.