Teradata Python Package Function Reference - 16.20 - set_context - Teradata Python Package

Teradata® Python Package Function Reference

prodname
Teradata Python Package
vrm_release
16.20
created_date
February 2020
category
Programming Reference
featnum
B700-4008-098K
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)