Establishing a Connection
The objects available within our connector are accessible from the "cdata.teradata" module. To use the module's objects directly:
- Import the module as follows:
import cdata.teradata as mod
- To establish a connection string, call the connect() method from the connector object using an appropriate connection string, such as:
mod.connect("User=Admin;Password=test123;Database=Northwind;DataSource=127.0.0.1")
Deploying the Provider
To connect using the CData Python Connector for Teradata, you must install the Teradata .NET Data Provider into the GAC.
Connecting to Teradata
The connector wraps the official Teradata Database driver. You can connect to the CData Python Connector for Teradata using the same connection properties, and access the same functionality, as the underlying Teradata driver.
Required Properties
To connect to Teradata, set these properties:
- AuthScheme: Specify your Teradata server's required authentication mechanism: either TD2 (default) or LDAP.
- User: Teradata user username.
- Password: Teradata user password.
- DataSource: Specify the Teradata server name, DBC Name, or TDPID.
- Port: Specify the port the server is running on.
- Database: Specify the database name. If not specified, the connector connects to the default database.