Python client for Teradata ModelOps (TMO)
Actively maintained. Last release 7 weeks ago. A safe choice.
pip install teradatamodelopsREADME as published on PyPI with version 7.3.6.
Python client for Teradata ModelOps (TMO)
Actively maintained. Last release 7 weeks ago. A safe choice.
pip install teradatamodelopsREADME as published on PyPI with version 7.3.6.
The teradatamodelops is available from pypi
pip install teradatamodelops
Note: previously Teradata ModelOps was known as AnalyticsOps Accelerator (AOA), so you might encounter mentions of AOA or aoa, it's referring to an older version of ModelOps
Note: If you're installing on Windows, you need to install OpenSSL manually to be able to authenticate with your ModelOps instance.
By default, the CLI looks for configuration stored in ~/.tmo/config.yaml. Copy the config from ModelOps UI -> Session Details -> CLI Config. This will provide the command to create or update the config.yaml. If required, one can override this configuration at runtime by specifying environment variables (see api_client.py)
The cli can be used to perform a number of interactions and guides the user to perform those actions.
> tmo -h
usage: tmo [-h] [--debug] [--version] {list,add,run,init,clone,link,task,connection,feature,doctor} ...
TMO CLI
options:
-h, --help show this help message and exit
--debug Enable debug logging
--version Display the version of this tool
actions:
valid actions
{list,add,run,init,clone,link,task,connection,feature,doctor}
list List projects, models, local models or datasets
add Add model to working dir
run Train and Evaluate model locally
init Initialize model directory with basic structure
clone Clone Project Repository
link Link local repo to project
task Manage feature engineering tasks
connection Manage local connections
feature Manage feature statistics
doctor Diagnose configuration issues
Allows to list the tmo resources. In the cases of listing models (pushed / committed) and datasets, it will prompt the user to select a project prior showing the results. In the case of local models, it lists both committed and non-committed models.
> tmo list -h
usage: tmo list [-h] [--debug] [-p] [-m] [-lm] [-t] [-d] [-c]
options:
-h, --help show this help message and exit
--debug Enable debug logging
-p, --projects List projects
-m, --models List registered models (committed / pushed)
-lm, --local-models List local models. Includes registered and non-registered (non-committed / non-pushed)
-t, --templates List dataset templates
-d, --datasets List datasets
-c, --connections List local connections
All results are shown in the format
[index] (id of the resource) name
for example:
List of models for project Demo:
--------------------------------
[0] (03c9a01f-bd46-4e7c-9a60-4282039094e6) Diabetes Prediction
[1] (74eca506-e967-48f1-92ad-fb217b07e181) IMDB Sentiment Analysis
Add a new model to a given repository based on a model template. A model in any other existing ModelOps git repository (specified via the -t <giturl>) can be used.
> tmo add -h
usage: tmo add [-h] [--debug] -t TEMPLATE_URL -b BRANCH
options:
-h, --help show this help message and exit
--debug Enable debug logging
-t TEMPLATE_URL, --template-url TEMPLATE_URL
Git URL for template repository
-b BRANCH, --branch BRANCH
Git branch to pull templates (default is main)
Example usage
> tmo add -t https://github.com/Teradata/modelops-demo-models -b master
The cli can be used to validate the model training and evaluation logic locally before committing to git. This simplifies the development lifecycle and allows you to test and validate many options. It also enables you to avoid creating the dataset definitions in ModelOps UI until you are ready and have a finalised version.
> tmo run -h
usage: tmo run [-h] [--debug] [-id MODEL_ID] [-m MODE] [-d DATASET_ID] [-t DATASET_TEMPLATE_ID] [-ld LOCAL_DATASET] [-lt LOCAL_DATASET_TEMPLATE] [-c CONNECTION]
options:
-h, --help show this help message and exit
--debug Enable debug logging
-id MODEL_ID, --model-id MODEL_ID
Id of model
-m MODE, --mode MODE Mode (train or evaluate)
-d DATASET_ID, --dataset-id DATASET_ID
Remote datasetId
-t DATASET_TEMPLATE_ID, --dataset-template-id DATASET_TEMPLATE_ID
Remote datasetTemplateId
-ld LOCAL_DATASET, --local-dataset LOCAL_DATASET
Path to local dataset metadata file
-lt LOCAL_DATASET_TEMPLATE, --local-dataset-template LOCAL_DATASET_TEMPLATE
Path to local dataset template metadata file
-c CONNECTION, --connection CONNECTION
Local connection id
You can run all of this as a single command or interactively by selecting some optional arguments, or none of them.
For example, if you want to run the cli interactively you just select tmo run but if you wanted to run it non interactively to train a given model with a given datasetId you would expect
> tmo run -id <modelId> -m <mode> -d <datasetId>
When you create a git repository, its empty by default. The init command allows you to initialize the repository with the structure required by ModelOps. It also adds a default README.md and HOWTO.md.
> tmo init -h
usage: tmo init [-h] [--debug]
options:
-h, --help show this help message and exit
--debug Enable debug logging
The clone command provides a convenient way to perform a git clone of the repository associated with a given project. The command can be run interactively and will allow you to select the project you wish to clone. Note that by default it clones to the current working directory so you either need to make sure you create an empty folder and run it from within there or else provide the --path argument.
> tmo clone -h
usage: tmo clone [-h] [--debug] [-id PROJECT_ID] [-p PATH]
options:
-h, --help show this help message and exit
--debug Enable debug logging
-id PROJECT_ID, --project-id PROJECT_ID
Id of Project to clone
-p PATH, --path PATH Path to clone repository to
Links the current local repository to a remote project.
> tmo link -h
usage: tmo link [-h] [--debug]
options:
-h, --help show this help message and exit
--debug Enable debug logging
Manage feature tasks actions. The feature tasks are used to automate the feature engineering process. The tasks are stored in a git repository and can be shared across multiple projects.
> tmo task -h
usage: tmo task [-h] {add,run} ...
options:
-h, --help show this help message and exit
actions:
valid actions
{add,run}
add Add feature engineering task to working dir
run Run feature engineering tasks locally
Add a new feature engineering task to a given repository based on a task template. A task in any other existing ModelOps git repository (specified via the -t <giturl>) can be used.
> tmo task add -h
usage: tmo task add [-h] [--debug] -t TEMPLATE_URL -b BRANCH
options:
-h, --help show this help message and exit
--debug Enable debug logging
-t TEMPLATE_URL, --template-url TEMPLATE_URL
Git URL for template repository
-b BRANCH, --branch BRANCH
Git branch to pull task (default is main)
Example usage
> tmo task add -t https://github.com/Teradata/modelops-demo-models -b feature_engineering
The cli can be used to run feature engineering tasks locally before committing to git.
> tmo task run -h
usage: tmo task run [-h] [--debug] [-c CONNECTION] [-f FUNCTION_NAME]
options:
-h, --help show this help message and exit
--debug Enable debug logging
-c CONNECTION, --connection CONNECTION
Local connection id
-f FUNCTION_NAME, --function-name FUNCTION_NAME
Task function name
You can run all of this as a single command or interactively by selecting some optional arguments, or none of them.
For example, if you want to run the cli interactively you just select tmo task run but if you wanted to run it non interactively to run a given task function you would expect
> tmo task run -f <functionName> -c <connectionId>
The connection credentials stored in the ModelOps service cannot be accessed remotely through the CLI for security reasons. Instead, users can manage connection information locally for the CLI. These connections are used by other CLI commands which access Vantage.
> tmo connection -h
usage: tmo connection [-h] {list,add,remove,export,test,create-byom-table} ...
options:
-h, --help show this help message and exit
actions:
valid actions
{list,add,remove,export,test,create-byom-table}
list List all local connections
add Add a local connection
remove Remove a local connection
export Export a local connection to be used as a shell script
test Test a local connection
create-byom-table Create a table to store BYOM models
Manage feature metadata by creating and populating feature metadata table(s). The feature metadata tables contain information required when computing statistics during training, scoring etc. This metadata depends on the feature type (categorical or continuous).
As this metadata can contain sensitive profiling information (such as categories), it is recommended to treat this metadata in the same manner as you treat the features for a given use case. That is, the feature metadata should live in a project or use case level database.
> tmo feature -h
usage: tmo feature [-h] {compute-stats,list-stats,create-stats-table,import-stats} ...
options:
-h, --help show this help message and exit
action:
valid actions
{compute-stats,list-stats,create-stats-table,import-stats}
compute-stats Compute feature statistics
list-stats List available statistics
create-stats-table Create statistics table
import-stats Import column statistics from local JSON file
Compute the feature metadata information required when computing statistics during training, scoring etc. This metadata depends on the feature type (categorical or continuous).
Continuous: the histograms edges
Categorical: the categories
> tmo feature compute-stats -h
usage: tmo feature compute-stats [-h] [--debug] -s SOURCE_TABLE -m METADATA_TABLE [-t {continuous,categorical}] -c COLUMNS
options:
-h, --help show this help message and exit
--debug Enable debug logging
-s SOURCE_TABLE, --source-table SOURCE_TABLE
Feature source table/view
-m METADATA_TABLE, --metadata-table METADATA_TABLE
Metadata table for feature stats, including database name
-t {continuous,categorical}, --feature-type {continuous,categorical}
Feature type: continuous or categorical (default is continuous)
-c COLUMNS, --columns COLUMNS
List of feature columns
Example usage
tmo feature compute-stats \
-s <feature-db>.<feature-data> \
-m <feature-metadata-db>.<feature-metadata-table> \
-t continuous -c numtimesprg,plglcconc,bloodp,skinthick,twohourserins,bmi,dipedfunc,age
Lists the name and type (categorical or continuous) for all the features stored in the specified metadata table.
> tmo feature list-stats -h
usage: tmo feature list-stats [-h] [--debug] -m METADATA_TABLE
options:
-h, --help show this help message and exit
--debug Enable debug logging
-m METADATA_TABLE, --metadata-table METADATA_TABLE
Metadata table for feature stats, including database name
Example usage
tmo feature list-stats \
-m <feature-metadata-db>.<feature-metadata-table>
Creates or prints out the required SQL to create the metadata statistics table with the specified name.
> tmo feature create-stats-table -h
usage: tmo feature create-stats-table [-h] [--debug] -m METADATA_TABLE [-e]
options:
-h, --help show this help message and exit
--debug Enable debug logging
-m METADATA_TABLE, --metadata-table METADATA_TABLE
Metadata table for feature stats, including database name
-e, --execute-ddl Execute CREATE TABLE DDL, not just generate it
Example usage
tmo feature create-stats-table \
-m <feature-metadata-db>.<feature-metadata-table> \
-e
Imports feature metadata statistics from a local JSON file to the target table. It also supports showing an example of the file structure.
> tmo feature import-stats -h
usage: tmo feature import-stats [-h] [--debug] -m METADATA_TABLE -f STATISTICS_FILE [-s]
options:
-h, --help show this help message and exit
--debug Enable debug logging
-m METADATA_TABLE, --metadata-table METADATA_TABLE
Metadata table for feature stats, including database name
-f STATISTICS_FILE, --statistics-file STATISTICS_FILE
Name of statistics JSON file
-s, --show-example Show file structure example and exit
Example usage
tmo feature import-stats \
-m <feature-metadata-db>.<feature-metadata-table> \
-f <path-to-statistics-file>
Runs healtchecks on the current setup. First checks the health of the remote ModelOps service configuration and secondly checks the health of any of the locally created connections.
> tmo doctor -h
usage: tmo doctor [-h] [--debug]
options:
-h, --help show this help message and exit
--debug Enable debug logging
A number of authentication methods are supported for both the CLI and SDK.
When working interactively, the recommended auth method for the CLI is device_code. It will guide you through the auth automatically. For Vantage CloudLake (VCL), the recommended auth method is pat. To learn more about working with PATs, please refer to the VCL documentation. For the SDK, use bearer if working interactively.
For both CLI and SDK, if working in an automated service-service manner, use client_credentials.
The device_code mode implements the OAuth2 Device Authorization Grant. It is the recommended interactive auth method for the CLI. The SDK prints a verification URL and a short user code; you open the URL in any browser and enter the code to authorize the device. The SDK polls for completion automatically.
The token is cached in ~/.tmo/.token and reused on successive calls, with automatic silent refresh using the refresh_token when the access token is near expiry.
from tmo import TmoClient
client = TmoClient(
vmo_url="<modelops-endpoint>",
auth_mode="device_code",
auth_client_id="<client-id>",
auth_client_secret="<client-secret>", # optional, depends on IdP
auth_token_url="<token-endpoint>",
auth_device_auth_url="<device-authorization-endpoint>",
project_id="23e1df4b-b630-47a1-ab80-7ad5385fcd8d",
)
On first run, the SDK will print:
1. On your computer or mobile device navigate to: https://<idp>/device?user_code=XXXX-XXXX
2. Enter the following code: XXXX-XXXX
Alternatively, all parameters can be provided via environment variables:
| Environment variable | Description |
|---|---|
VMO_API_AUTH_MODE | Set to device_code |
VMO_API_AUTH_CLIENT_ID | OAuth2 client ID |
VMO_API_AUTH_CLIENT_SECRET | OAuth2 client secret (optional) |
VMO_API_AUTH_TOKEN_URL | Token endpoint URL |
VMO_API_AUTH_DEVICE_AUTH_URL | Device authorization endpoint URL |
The client_credentials mode implements the OAuth2 Client Credentials Grant. It is the recommended method for automated, service-to-service scenarios where no user interaction is possible (e.g. CI/CD pipelines). No browser or prompt is required — the SDK exchanges the client ID and secret for a token directly.
from tmo import TmoClient
client = TmoClient(
vmo_url="<modelops-endpoint>",
auth_mode="client_credentials",
auth_client_id="<client-id>",
auth_client_secret="<client-secret>",
auth_token_url="<token-endpoint>",
project_id="23e1df4b-b630-47a1-ab80-7ad5385fcd8d",
)
Alternatively, all parameters can be provided via environment variables:
| Environment variable | Description |
|---|---|
VMO_API_AUTH_MODE | Set to client_credentials |
VMO_API_AUTH_CLIENT_ID | OAuth2 client ID |
VMO_API_AUTH_CLIENT_SECRET | OAuth2 client secret |
VMO_API_AUTH_TOKEN_URL | Token endpoint URL |
The bearer mode accepts a raw Bearer token obtained externally (e.g. copied from the ModelOps UI). It is the simplest way to authenticate the SDK when working in notebooks or scripts. No token refresh is performed — the provided token is used as-is until it expires.
To get the token and endpoint, go to ModelOps UI → Session Details → SDK Config.
from tmo import TmoClient
client = TmoClient(
vmo_url="<modelops-endpoint>",
auth_mode="bearer",
auth_bearer="<bearer-token>",
project_id="23e1df4b-b630-47a1-ab80-7ad5385fcd8d",
)
Alternatively, all parameters can be provided via environment variables:
| Environment variable | Description |
|---|---|
VMO_API_AUTH_MODE | Set to bearer |
VMO_API_AUTH_BEARER_TOKEN | Raw Bearer token value |
The pat mode uses a Personal Access Token (PAT) generated in the Vantage CloudLake (VCL) platform. It is the recommended auth method when working with VCL. The PAT private key must be stored at ~/.tmo/modelops_pat.pem.
To generate a PAT, refer to the VCL documentation. Once generated, download the private key and place it at the path above.
from tmo import TmoClient
client = TmoClient(
vmo_url="<modelops-endpoint>",
auth_mode="pat",
pat="<pat-value>",
user="<username>",
project_id="23e1df4b-b630-47a1-ab80-7ad5385fcd8d",
)
Alternatively, all parameters can be provided via environment variables:
| Environment variable | Description |
|---|---|
VMO_API_AUTH_MODE | Set to pat |
VMO_API_PAT | Personal Access Token value |
VMO_API_USER | Username associated with the PAT |
The authorization_code mode implements the standard OAuth2 Authorization Code grant. It is headless — no browser is opened automatically. Instead, the SDK prints the authorization URL and prompts you to paste back the full redirect URL after authorizing in your browser.
The token is cached in ~/.tmo/.token and reused on successive calls, with automatic silent refresh using the refresh_token when the access token is near expiry.
from tmo import TmoClient
client = TmoClient(
vmo_url="<modelops-endpoint>",
auth_mode="authorization_code",
auth_client_id="<client-id>",
auth_client_secret="<client-secret>",
auth_token_url="<token-endpoint>",
auth_authorization_url="<authorization-endpoint>",
auth_redirect_uri="http://localhost:8085/callback", # optional, this is the default
project_id="23e1df4b-b630-47a1-ab80-7ad5385fcd8d",
)
On first run, the SDK will print:
1. On your computer or mobile device navigate to: https://<idp>/auth?response_type=code&...
2. After authorizing, copy the full redirect URL from your browser and paste it below.
Redirect URL:
Paste the full redirect URL (e.g. http://localhost:8085/callback?code=ABC&state=XYZ) and press Enter. The token is then exchanged and cached locally.
Alternatively, all parameters can be provided via environment variables:
| Environment variable | Description |
|---|---|
VMO_API_AUTH_MODE | Set to authorization_code |
VMO_API_AUTH_CLIENT_ID | OAuth2 client ID |
VMO_API_AUTH_CLIENT_SECRET | OAuth2 client secret |
VMO_API_AUTH_TOKEN_URL | Token endpoint URL |
VMO_API_AUTH_AUTHORIZATION_URL | Authorization endpoint URL |
VMO_API_AUTH_REDIRECT_URI | Redirect URI (default: http://localhost:8085/callback) |
The SDK for ModelOps allows users to interact with ModelOps APIs from anywhere they can execute python such as notebooks, IDEs etc. It can also be used for devops to automate additional parts of the process and integrate into the wider organization.
By default, creating an instance of the TmoClient looks for configuration stored in ~/.tmo/config.yaml. When working with the SDK, we recommend that you specify (and override) all the necessary configuration as part of the AoaClient invocation.
An example to create a client using a bearer token for a given project is
from tmo import TmoClient
client = TmoClient(
vmo_url="<modelops-endpoint>",
auth_mode="bearer",
auth_bearer="<bearer-token>",
project_id="23e1df4b-b630-47a1-ab80-7ad5385fcd8d",
)
To get the values to use for bearer token and vmo_url, go to the ModelOps UI -> Session Details -> SDK Config.
We provide an extensive sdk implementation to interact with the APIs. You can find, create, update, archive, etc any entity that supports it via the SDK. In addition, most if not all search endpoints are also implemented in the sdk. Here are some examples
from tmo import TmoClient
import pprint
client = TmoClient(project_id="23e1df4b-b630-47a1-ab80-7ad5385fcd8d")
datasets = client.datasets().find_all()
pprint.pprint(datasets)
dataset = client.datasets().find_by_id("11e1df4b-b630-47a1-ab80-7ad5385fcd8c")
pprint.pprint(dataset)
jobs = client.jobs().find_by_id("21e1df4b-b630-47a1-ab80-7ad5385fcd1c")
pprint.pprint(jobs)
Let's assume we have a model version 4131df4b-b630-47a1-ab80-7ad5385fcd15 which we want to deploy In-Vantage and schedule it to execute once a month at midnight of the first day of the month using dataset connection 11e1df4b-b630-47a1-ab80-7ad5385fcd8c and dataset template d8a35d98-21ce-47d0-b9f2-00d355777de1. We can use the SDK as follows to perform this.
from tmo import TmoClient
client = TmoClient(project_id="23e1df4b-b630-47a1-ab80-7ad5385fcd8d")
trained_model_id = "4131df4b-b630-47a1-ab80-7ad5385fcd15"
deploy_request = {
"engineType": "IN_VANTAGE",
"publishOnly": False,
"language": "PMML",
"cron": "0 0 1 * *",
"byomModelLocation": {
"database": "<db-name>",
"table": "<table-name>"
},
"datasetConnectionId": "11e1df4b-b630-47a1-ab80-7ad5385fcd8c",
"datasetTemplateId": "d8a35d98-21ce-47d0-b9f2-00d355777de1",
"engineTypeConfig": {
"dockerImage": "",
"engine": "byom",
"resources": {
"memory": "1G",
"cpu": "1"
}
}
}
job = client.trained_models().deploy(trained_model_id, deploy_request)
# wait until the job completes (if the job fails it will raise an exception)
client.jobs().wait(job['id'])
Let's assume we have a PMML model which we have trained in another data science platform. We want to import the artefacts for this version (model.pmml and data_stats.json) against a BYOM model f937b5d8-02c6-5150-80c7-1e4ff07fea31.
from tmo import TmoClient
client = TmoClient(project_id="23e1df4b-b630-47a1-ab80-7ad5385fcd8d")
# set metadata for your import request
model_id = '<model-uuid>'
filename = './pima.pmml'
language = 'PMML'
dataset_connection_id = '<dataset-connection-uuid>'
train_dataset_id = '<train-dataset-uuid>'
# first, upload the artefacts which we want to associate with the BYOM model version
import_id = client.trained_model_artefacts().upload_byom_model(language, filename)
import_request = {
"artefactImportId": import_id,
"externalId": "my_model_external_id",
"modelMonitoring": {
"language": language,
"useDefaultEvaluation": True,
"evaluationEnabled": True,
"modelType": "CLASSIFICATION",
"byomColumnExpression": "CAST(CAST(json_report AS JSON).JSONExtractValue('$.predicted_HasDiabetes') AS INT)",
"driftMonitoringEnabled": True,
"datasetId": train_dataset_id,
"datasetConnectionId": dataset_connection_id,
},
}
job = client.models().import_byom(model_id, import_request)
# wait until the job completes (if the job fails it will raise an exception)
client.jobs().wait(job["id"])
# now you can list the artefacts which were uploaded and linked to the model version
trained_model_id = job["metadata"]["trainedModel"]["id"]
artefacts = client.trained_model_artefacts().list_artefacts(trained_model_id)
client.models() and client.trained_models() now yield typed Model / TrainedModel objects (model.id, model.name, tm.status, ...) instead of plain dicts. Dict-style access keeps working (model["sourceId"], model["source_id"], .get(), in, keys(), items()); any response key that is not a core field stays accessible. str()/to_json()/to_dict() return the original API keys. Note: the objects are not dict instances (isinstance(x, dict) is false, use to_dict() for json.dumps); find_by_* and other direct lookups still return dicts. They compare equal to the equivalent dict and keep explicit null fields in to_dict()/keys().@functional (FeatureMetadata, Variable, Metadata, ...) now have a readable recursive repr/str (e.g. FeatureMetadata(database='db', table='tbl', monitoring_group='default')) instead of <... object at 0x...>. Added monitoring_group to FeatureMetadata.DatasetTemplate.feature_metadata always being empty for templates fetched from the API; featureMetadata (database, table, monitoringGroup) is now parsed from the response.CatalogType, CatalogBodyType, DataType, TypeEnum, Scope, JobAutomationMode, JobRunnerMode, JobRunnerEngine, EntityType) now share a ValueEnum base (str subclass) that displays the member value instead of Class.MEMBER, e.g. print(template.catalog_type) shows NONE and entity reprs show catalog_type='NONE'. Enums also compare equal to their raw string value. Note: str(enum) no longer returns Class.MEMBER; to_json()/to_dict() output is unchanged.dataType such as string ('string' is not a valid DataType). string is now mapped to varchar, and any other unsupported data type logs a warning and falls back to varchar. Entities that still fail to parse now log a Skipped N of M ... that could not be parsed warning.auth_mode="bearer" returning 401 Unauthorized when auth_bearer is a raw token. The SDK sent the token as the Authorization header without the Bearer prefix; it is now added automatically when missing (tokens already prefixed with Bearer are left unchanged).DataFrameUtils._get_database_names monkey-patch raising TypeError: _get_database_names() missing 1 required positional argument: 'schema_name' on every copy_to_sql/to_sql call once teradataml>=20.0.0.12 is resolved. teradataml 20.0.0.12 changed _get_database_names from a @staticmethod (connection, schema_name) to a regular instance method (self, connection, schema_name); the previous patch always invoked the captured original with the old 2-arg staticmethod shape.teradataml>=20.0.0.12, which guarantees the instance-method _get_database_names shape. The patch no longer needs to detect/support the older @staticmethod shape from teradataml <= 20.0.0.11._get_database_names and DataFrame.to_sql patch installations idempotent. Previously, re-running the module-level patch logic against an already-patched class (e.g. via importlib.reload in tests) captured the existing wrapper as "the original" instead of unwrapping it, causing infinite recursion (RecursionError) on every subsequent call. Both patched functions now carry a reference to the true original, which is unwrapped before re-patching.data_stats.json is stored as a top-level JSON string, preventing TypeError: string indices must be integers, not 'str' in _ensure_backward_compatibility.TypeError: string indices must be integers, not 'str' in record_scoring_stats when data_stats.json stored features or targets as a double-serialized JSON string. _ensure_backward_compatibility now deserializes those fields to dict before processing.teradataml.DataFrame.to_sql at import time so that calling df.to_sql(table_name) directly auto-resolves schema_name from the active tmo_create_context configuration (VMO_CONN_DATABASE env var or teradataml.configure settings), with no changes required in user code.to_sql wrapper in tmo.util.wrappers that mirrors the teradataml.DataFrame.to_sql signature and automatically injects schema_name from the active tmo_create_context configuration (VMO_CONN_DATABASE env var or teradataml.configure settings) when not explicitly provided._DataTransferUtils._validate() calls DataFrameUtils._get_database_names(connection, None) without a None-guard when temporary=True, causing Teradata to reject a NULL bind parameter against dbc.databasesV and raising an InterfaceError. Patched _get_database_names at import time to return [] immediately when schema_name is None. Bug reported to the teradataml team (see bug-report.md).copy_to_sql and to_sql wrappers passing schema_name=None explicitly to teradataml when no schema is configured, which caused dbc.databasesV to be queried with a NULL parameter. Wrappers now omit schema_name entirely when it is None, letting teradataml use its own default.copy_to_sql wrapper in tmo.util.wrappers that mirrors the teradataml.copy_to_sql signature and automatically injects schema_name from the active tmo_create_context configuration (VMO_CONN_DATABASE env var or teradataml.configure settings) when not explicitly provided.execute_sql and execute_sql_in_context from tmo.util.context to tmo.util.wrappers, keeping backward-compatible re-exports via tmo.util.tmo_create_context now reuses an existing Teradata context when the connection parameters (host, database, logmech, credentials) match, avoiding unnecessary reconnections. If parameters differ, the existing context is cleanly removed before creating a new one._is_same_context helper to encapsulate context comparison logic, improving readability and testability of connection management._rename_env_variables overwriting existing non-empty VMO_ environment variables when renaming from AOA_ prefix._is_same_context incorrectly returning False after credentials are sanitized, causing remove_context() to destroy a valid context followed by a KeyError: 'VMO_CONN_USERNAME' on recreation attempts. _is_same_context now returns True immediately when no credentials are available (post-sanitize state), preventing cascading TDML_2054 context-empty errors in downstream tests.authorization_code OAuth2 auth mode with headless flow, token caching/refresh, and consolidated shared token refresh/caching logic.save_plot cropping the title.CatalogType enum not being correctly parsed in some cases which caused errors when creating or parsing Datasets and Dataset Templates.DataFrameGroupBy.apply.developer_experience jupyter notebook to examples.create() function to DatasetTemplateApi to create dataset templates.create() function to DatasetApi to create and link datasets.compute_stats() function to tmo.stats.stats to compute and insert feature metadata into database table.credsEncrypted and log_mech parameters optional for creating dataset connections using API.archived, isChecked and gitCredentials parameters optional for creating projects using API.vmo_url not being set correctly when converting config folder to .vmo from .aoa.AOA_ to VMO_.tmo feature import-stats not working for local statistics file.aoa_create_context in favour of tmo_create_context.aoa legacy references to tmo.run_scoring method for Deployment API.AoaClient to improve developer experience.deployments().find_by_deployment_job_id()jobs().find_by_deployment_id()dataset_connections().validate_connection()describe_current_project()logmech when defining a local Vantage connection.tmo connection create-byom-table logging error.access_token when using OAuth2 Device code grant type.requests dependency.tmo task add and tmo task run.teradataml>=20.0.0.0.WARNING Please recreate statistics metadata if you are using this version. It will produce more accurate results and correct behaviour.
WARNING Please recreate statistics metadata if you are using this version. It will produce more accurate results and correct behaviour.
device_code grant flow.aoa init and aoa add not working due to refactor in 6.1.3.aoa configure.aoa link for linking project to repo locally.aoa feature create-table.aoa feature support for managing feature metadata.aoa add uses reference git repository for model templates.path argument didn't create .aoa/config.yaml in correct directory.path now uses repository name by default.aoa clone respects project branch.Copyright 2025 Teradata. All Rights Reserved.