7.00.02.01 - Connecting to the Aster Database - Aster R

Teradata Aster® R User GuideUpdate 3

prodname
Aster R
vrm_release
7.00.02.01
created_date
December 2017
category
Programming Reference
User Guide
featnum
B700-1033-700K
After Setting Up the Aster ODBC Driver and Installing the TeradataAsterR package on the client system, users can load the TeradataAsterR package, and use the ta.connect() function to establish a connection to the Aster Database from the R interface on the client system.
  1. Load the TeradataAsterR package: > library(TeradataAsterR)
  2. Use ta.connect to establish a connection to the Aster Database: > AsterR <- ta.connect("AsterDB") The ta.connect() function returns an RODBC connection to the specified Aster Database. This object is assigned to a global variable "taConnection", which is used by default for other function calls unless the user provides an explicit RODBC connection object in the function call.

    The syntax of ta.connect():

    ta.connect(dsn, uid="", pwd="", database="", dType="odbc")

    where:

    dsn
    Data Source Name (DSN) for RODBC/ODBC connection.
    uid
    User Id. If not supplied, the user Id from the DSN is used.
    pwd
    Password. If not supplied, the password from the DSN is used.
    database
    Aster Database to connect to. If not supplied, the database name from the DSN is used.
    dType
    Driver type. The default driver is ODBC. Only ODBC is currently supported.

    For example:

    ta.connect("AsterDB")

    ta.connect("AsterDB", uid="db_superuser", pwd="db_superuser", database="beehive", dType="odbc")

Confirming Worker Nodes

When connecting to the Aster Database using ta.connect(), each worker node is registered and assigned a unique nodeid. This is how the worker nodes are made available for parallel processing.

Confirm that all expected worker nodes are registered using ta.worker.nodenames().