PAT Support | VantageCloud Lake - PAT Support in XRMigrationTool - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

To make tdextroutine calls, users need to authenticate using a personal access token (PAT). To generate this PAT, a key is used whose private key is stored by the user and the public key is uploaded while creating PAT. For successful authentication, the user needs to pass the PAT along with the private key path.

To create a PAT, see Creating a Personal Access Token.

The XRMigrationTool supports PAT to make the tdextroutine commands ready to run. The PAT and the private key path can be specified in the following ways:
  • PAT and key path can be passed as options in the call to XRMigrationTool. For example,
    XRMigrationTool.exe -d input_dir -o output_dir -s source_dir -t pat_token -p key_path
    The migrated calls to tdextroutine for creating a UDF resembles this format:
    .os tdextroutine.exe --verbose -t 9op908F8ioPzLMNiYq7JKan5K -p keys\user.pem udf create -a output_dir\SQLToPayload\udf_1\Archive.zip function_name
  • Set PAT and key path values in the config.yml file for Migration Tool. During migration, XRMigrationTool selects the values from config.yml and put them in the tdextroutine calls. For example, the config.yml resembles this format:
    Systemcall: .os
    tdext-path: tdextroutine.exe 
    verbose: y 
    pat: 9op908F8ioPzLMNiYq7JKan5K 
    key_path: keys\user.pem
    The migrated calls to tdextroutine for creating a UDF resemble this format:
    .os tdextroutine.exe --verbose -t 9op908F8ioPzLMNiYq7JKan5K -p keys\user.pem udf create -a output_dir\SQLToPayload\udf_1\Archive.zip function_name
  • Set the environment variable TDEXTROUTINE_PAT_TOKEN and TDEXTROUTINE_KEY_PATH. With this approach, there is no need to pass PAT to XRMigrationTool. After migration, while calling the tdextroutine command the respective values are selected from the environment. Adding them in the config.yml for tdextroutine follows the same process. The migrated calls to tdextroutine for creating a UDF resemble this format:
    .os tdextroutine.exe --verbose udf create -a output_dir\SQLToPayload\udf_1\Archive.zip function_name
If the PAT is provided through all these approaches, then the value is selected from the XRMigrationTool options first, followed by the config.yml file, and then the environment variables.