This topic describes how to connect to Teradata from Domino.
Teradata Vantage is a multi-cloud data platform providing access to data lakes, data warehouses, and analytics. You must have network connectivity between Teradata and your Domino deployment.
The easiest way to connect to Teradata from Domino is to create a Domino Data Source as described below.
Administrators can create a Data Source for Teradata that Domino users can access. Domino recommends this method. See the Admin Guide for details.
After your administrator has created the Data Source, you can query it.
Note
|
You must specify the database name in your query, as in this example where example res = ds.query("select * from td_demo.yellow_cab") |
Warning
| Domino does not officially support this method. We provide this information as a courtesy. |
Domino recommends the Teradata SQL Driver for Python.
Credential setup
Set the following Domino environment variables to store secure information about your Teradata connection.
-
TERADATA_USER
-
TERADATA_PASSWORD
-
TERADATA_HOST
See Secure Credential Storage to learn more about Domino environment variables.
Usage
See the Teradata SQL Driver for Python documentation for information about how to use the package. The following is an example.
import teradatasql
import os
con = teradatasql.connect(
user=os.environ['TERADATA_USER'],
password=os.environ['TERADATA_PASSWORD'],
host=os.environ['TERADATA_HOST']
)
cur = con.cursor()
try:
cur.execute ('{fn teradata_nativesql}Driver version {fn teradata_driver_version} Database version {fn teradata_database_version}')
print (cur.fetchone () [0])
finally:
cur.close()
con.close()
-
After connecting to your Data Source, learn how to Use Data Sources.
-
Share this Data Source with your collaborators.