Teradata Package for Python Function Reference | 20.00 - set_context - Teradata Package for Python - Look here for syntax, methods and examples for the functions included in the Teradata Package for Python.

Teradata® Package for Python Function Reference - 20.00

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Teradata Package for Python
Release Number
20.00.00.03
Published
December 2024
ft:locale
en-US
ft:lastEdition
2024-12-19
dita:id
TeradataPython_FxRef_Enterprise_2000
Product Category
Teradata Vantage
teradataml.context.context.set_context = set_context(tdsqlengine, temp_database_name=None)
DESCRIPTION:
    Specifies a Teradata Vantage sqlalchemy engine as current context.
 
PARAMETERS:
    tdsqlengine:
        Required Argument.
        Specifies Teradata Vantage sqlalchemy engine object that should be used to establish a Teradata Vantage connection.
        Types: str
        
    temp_database_name:
        Optional Argument.
        Specifies the temporary database name where temporary tables, views will be created.
        Types: str
 
RETURNS:
    A Teradata Vantage connection object.
 
RAISES:
    TeradataMlException
 
EXAMPLES:
    set_context(tdsqlengine = td_sqlalchemy_engine)