Registry / data / teradataml

teradataml

JSON →
library20.0.0.11pypypi✓ verified 88d ago

teradataml is a Python package that provides an interface to perform advanced analytics on Teradata Vantage. It allows users to leverage the massive parallel processing capabilities of Teradata Vantage for data manipulation, transformation, and various analytic functions without extensive SQL coding. The current version is 20.0.0.10, and it receives frequent minor updates within its major releases.

pip install teradataml
INSTALL
IMPORT
SIG · TERADATAML
T
teradataml
datapythonv20.0.0.11
Install
22.9s avg
Import
2393ms
Disk
965MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v20.0.0.11 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
12/20 runs
✓ 23.63s
py 3.11
12/20 runs
✓ 21.72s
py 3.12
12/20 runs
✓ 21.04s
py 3.13
12/20 runs
✓ 21.08s
py 3.9
12/20 runs
✓ 26.96s
965MB installed
● package 965MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

create_context
✓ from teradataml import create_context
DataFrame
✓ from teradataml import DataFrame
copy_to_sql
✓ from teradataml import copy_to_sql
remove_context
✓ from teradataml import remove_context
in_schema
✓ from teradataml.dataframe.dataframe import in_schema
✗ from teradataml import in_schema
in_schema is part of the dataframe submodule, not top-level.

This quickstart demonstrates how to establish a connection to Teradata Vantage using `create_context`, create a teradataml DataFrame from an existing table, and display its head. It uses environment variables for sensitive connection details.

import os from teradataml import create_context, DataFrame, remove_context host = os.environ.get('TD_HOST', 'your_teradata_host') username = os.environ.get('TD_USERNAME', 'your_username') password = os.environ.get('TD_PASSWORD', 'your_password') temp_database_name = os.environ.get('TD_TEMP_DB', 'your_temp_db') # Establish connection to Teradata Vantage try: create_context(host=host, username=username, password=password, logmech='TD2', temp_database_name=temp_database_name) print("Successfully connected to Teradata Vantage.") # Create a teradataml DataFrame from an existing table # Replace 'your_table_name' and 'your_database' with actual values # For demo, assuming a table named 'sample_data' in the default database td_df = DataFrame(tablename='sample_data') print("\nTeradataml DataFrame head:") print(td_df.head()) except Exception as e: print(f"An error occurred: {e}") finally: # Clean up the connection if create_context._active_context: remove_context() print("Connection context removed.")
Debug
Known issues
breakingStarting from teradataml 20.0.0.9, optional dependencies are no longer installed by default due to footprint reduction and modularization. Users must explicitly install them using `pip install teradataml[<feature_name>]` (e.g., `teradataml[automl]`, `teradataml[openml]`, `teradataml[visualization]`, `teradataml[eda-ui]`).
fix
Manually install required optional dependencies: `pip install teradataml[feature_name]`.
affects: >=20.0.0.9
gotchaThe `fastload()` utility in teradataml does not support table names that start with digits, even though it works with `copy_to_sql()` and SQL directly.
fix
Avoid creating or using table names that begin with digits when using `fastload()`. Consider using `copy_to_sql()` or pandas `to_sql()` instead if this is an issue.
affects: <20.0.0.10 (fix expected soon)
gotchaConnections can fail if the Teradata system has 'Require Confidentiality' enabled in `gtwcontrol` due to data encryption issues with older `teradatasql` versions.
fix
Upgrade `teradatasql` (`pip install -U --no-cache-dir teradatasql`) or, for older `teradataml` versions, pass `encryptdata='true'` via a SQLAlchemy engine to `create_context`.
affects: <17.10.00.03 (teradatasql dependency)
gotchaWhen upgrading `teradataml`, `pip install` may use a cached version. To ensure the new version is downloaded, use the `--no-cache-dir` option.
fix
Use `pip install --no-cache-dir -U teradataml` for upgrades.
affects: All versions
breakingIn version 20.0.0.10, the `set_auth_token` function's return type changed from a boolean to the class object. While functionality remains the same, this might affect code expecting a boolean return.
fix
Update code that relies on the return value of `set_auth_token` to expect the class object, or adjust logic if a boolean check was previously performed.
affects: >=20.0.0.10
deprecatedIn earlier versions (e.g., 16.20.00.01), old analytic functions were deprecated due to namespace changes. While not directly breaking for current versions, users upgrading from very old `teradataml` might encounter this.
fix
Refer to the Teradata Python Package User Guide for updated analytic function names and structures.
affects: <16.20.00.02 (deprecated in 16.20.00.01, removed in future release)
gotchaWhen creating a SQLAlchemy engine for use with `teradataml`'s `create_context`, ensure to specify the `teradatasql` dialect, not a generic `teradata` dialect, to avoid `NoSuchModuleError`.
fix
Use `sqlalchemy.create_engine('teradatasql://...')` for creating the engine.
affects: All versions
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'teradataml'
The 'teradataml' package is not installed in the current Python environment.
fix
pip install teradataml
teradataml.exceptions.TeradataMLException: Failed to connect to the Vantage system. Please check the hostname, username, and password, and ensure the Vantage system is accessible.
The connection parameters provided to `tdml.configure` or `create_context` are incorrect, or the Teradata Vantage system is unreachable due to network issues, firewall restrictions, or downtime.
fix
from teradataml import tdml
tdml.configure(host="your_vantage_hostname", username="your_username", password="your_password", logmech='LDAP' # if required, other params like port, driver_path can be added)
# Ensure 'your_vantage_hostname', 'your_username', 'your_password' are correct and the Vantage system is accessible.
AttributeError: 'DataFrame' object has no attribute 'fillna'
You are attempting to call a method that exists on a local pandas DataFrame (like `fillna`, `apply`, `pivot_table`) or a scikit-learn object (like `fit`), but not directly on a `teradataml.DataFrame`, which is a lazy-evaluated object representing a table on Teradata Vantage.
fix
from teradataml import DataFrame
my_teradata_df = DataFrame(table_name="my_table")
# Use teradataml's in-database functions or convert to pandas for local processing
# Example for local processing:
pandas_df = my_teradata_df.to_pandas()
pandas_df.fillna(0, inplace=True)
# For in-database operations, use teradataml's built-in analytic functions or methods.
KeyError: 'NonExistentColumn'
You are trying to select, filter, or operate on a column that does not exist in the `teradataml.DataFrame`.
fix
from teradataml import DataFrame
my_teradata_df = DataFrame(table_name="my_table")
# Verify the exact column names available in the DataFrame
print(my_teradata_df.columns)
# Correct the column name in your code based on the available columns
selected_df = my_teradata_df.select(['ExistingColumn1', 'ExistingColumn2'])
Upgrade
Version history
20.0.0.11latest on PyPI · released Jun 12, 2026
Audit
Dependencies
teradatasqlalchemyrequiredCore dependency for database connectivity, automatically installed.
teradatasqlrequiredCore dependency for database connectivity, automatically installed.
imbalanced-learnoptionalRequired for AutoML family functions.
scikit-learnoptionalRequired for AutoML and OpenSourceML functions.
lightgbmoptionalRequired for OpenSourceML functions.
matplotliboptionalRequired for visualization features.
seabornoptionalRequired for visualization features.
teradatamlwidgetsoptionalRequired for Teradataml EDA UI components.
Agent activity
13 hits · last 30 days
node
10
OpenAI (training)
1
Resources