set_config_params | Teradata Package for Python - set_config_params - Teradata Package for Python

Teradata® Package for Python User Guide

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Teradata Package for Python
Release Number
20.00
Published
March 2024
Language
English (United States)
Last Update
2024-04-09
dita:mapPath
nvi1706202040305.ditamap
dita:ditavalPath
plt1683835213376.ditaval
dita:id
rkb1531260709148
Product Category
Teradata Vantage

Use the set_config_params function to set the configurations in Vantage.

Alternatively, you can set the configuration parameters independently using the teradataml.configure module.

Optional arguments "kwargs" specifies keyword arguments:
  • auth_token: Specifies the authentication token to connect to VantageCloud Lake.
    Authentication token will expire after a specific time. You can get the new authentication token and set it again.
  • ues_url: Specifies the URL for User Environment Service in VantageCloud Lake.
  • certificate_file: Specifies the path of the certificate file, which is used in encrypted REST service calls.
  • default_varchar_size: Specifies the size of varchar datatype in Vantage.

    The default size is 1024.

  • vantage_version: Specifies the version of the Vantage system teradataml is connected to.
  • val_install_location: Specifies the database name where Vantage Analytic Library (VAL) functions are installed.
  • byom_install_location: Specifies the database name where Bring Your Own Model (BYOM) functions are installed.
  • sandbox_container_id: Specifies the id of the sandbox container that will be used by the Script.test_script() method.
  • database_version: Specifies the database version of the system teradataml is connected to.
  • read_nos_function_mapping: Specifies the function mapping name for the READ_NOS table operator function.
  • write_nos_function_mapping: Specifies the function mapping name for the WRITE_NOS table operator function.

Example 1: Set configuration parameters using set_config_params() function

>>> from teradataml import set_config_params
>>> set_config_params(auth_token="abc-pqr-123",
            
                      ues_url="https://teracloud/v1/accounts/xyz-234-76085/open-analytics",
                      certificate_file="cert.crt",
                      default_varchar_size=512,
                      val_install_location="VAL_USER",
                      sandbox_container_id="bgf1233csdh123",
                      read_nos_function_mapping="read_nos_fm",
                      write_nos_function_mapping="write_nos_fm")
True

Example 2: Set configuration parameters using configure module

>>> from teradataml import configure
>>> configure.auth_token="abc-pqr-123"
>>> configure.ues_url="https://teracloud/v1/accounts/xyz-234-76085/open-analytics"
>>> configure.certificate_file="cert.crt"
>>> configure.default_varchar_size=512
>>> configure.val_install_location="VAL_USER"
>>> configure.sandbox_container_id="bgf1233csdh123"
>>> configure.read_nos_function_mapping="read_nos_fm"
>>> configure.write_nos_function_mapping="write_nos_fm"