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.
- Load the TeradataAsterR package: > library(TeradataAsterR)
-
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().