- 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")
- Data Source Name (DSN) for RODBC/ODBC connection.
- User Id. If not supplied, the user Id from the DSN is used.
- Password. If not supplied, the password from the DSN is used.
- Aster Database to connect to. If not supplied, the database name from the DSN is used.
- Driver type. The default driver is ODBC. Only ODBC is currently supported.
ta.connect("AsterDB", uid="db_superuser", pwd="db_superuser", database="beehive", dType="odbc")
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().