Open Analytics Framework is available only for VantageCloud Lake.
- Complete the setup in Setting Up VantageCloud Lake for Open Analytics to run open analytics in a VantageCloud Lake system.
- Establish a connection to Database Engine 20.
>>> import getpass >>> from teradataml import create_context >>> create_context(host = getpass.getpass(‘host’), username= getpass.getpass(‘username’), password = getpass.getpass(‘password’))
- Authenticate with VantageCloud Lake to access the Open Analytics Framework environment.The following authentication options use set_auth_token API.
- Option 1: OAuth device flow.
OAuth device flow must be activated for your system environment. If this is not activated, an error will occur; device_code grant not allowed for this client.
>>> from teradataml import set_auth_token >>> set_auth_token(ues_url=getpass.getpass('ues_url'))You get can a new token and set it again upon token expiration. - Option 2: Personal Access Token (PAT) and access key (pem file).
Generate a PAT token and access key (pem file) using VantageCloud Lake Console. This task is unique for each user.
See Create a Personal Access Token.
>>> from teradataml import set_auth_token >>> set_auth_token(ues_url=getpass.getpass("ues_url : "), pat_token=getpass.getpass("pat_token : "), pem_file=getpass.getpass("pem_file : "))Teradata recommends not to change the name of the file generated from VantageCloud Lake Console. If the name of the file is changed, then authentication token generated from this function will not work.
- Option 1: OAuth device flow.