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

Teradata® Package for R User Guide

Product
Teradata Package for R
Release Number
17.00
Published
July 2021
Language
English (United States)
Last Update
2023-08-08
dita:mapPath
yih1585763700215.ditamap
dita:ditavalPath
ayr1485454803741.ditaval
dita:id
B700-4005
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.