Skip to content

One-line bootstrap

When TDFS4DS_* and TDML_* are set in a .env next to your notebook, the preamble fits in three lines.

import teradataml as tdml, tdfs4ds, os
from dotenv import load_dotenv

load_dotenv()
tdml.create_context(host=os.getenv('TDML_HOST'),
                    user=os.getenv('TDML_USERNAME'),
                    password=os.getenv('TDML_PASSWORD'))
tdfs4ds.connect(database=os.getenv('TDML_DATABASE'), create_if_missing=True)

tdfs4ds reads TDFS4DS_SCHEMA, TDFS4DS_DATA_DOMAIN, and the LLM / embedding config from the same .env automatically — no further setup needed before calling upload_features, document_process, or launching the consumer agent.