You can specify the tdextroutine options on the command line in two ways:
- Use double dashes and the option name.
Example: --org_key
- Use a single dash and the character for the option.
Example: -k
Instead of specifying the options on the command line, you can define the options in a config YAML file. By default, tdextroutine looks for the config file at ~/.tdextroutine/config.yml. If config.yml exists, tdextroutine uses the default options specified in the file. You can also use the --config option to specify a different config file.
# This is the file ~/.tdextroutine/config.yml org_key: examplecorp account_name: ExampleCorp-Tenant-001
Another way to specify the options is to use the environment variables.
export TDEXTROUTINE_USERNAME=bobby
- Use SET in command prompt
- Use $env in PowerShell
- Use export for Linux and Mac
- Use export in WSL/MobaXterm
SET TDEXTROUTINE_USERNAME=bobby
$env:TDEXTROUTINE_USERNAME=”bobby”
export TDEXTROUTINE_USERNAME=bobby
tdextroutine Top-Level Options and Environment Variables
The following tables list the top-level tdextroutine options.
Option | Environment Variable | Type | Description |
---|---|---|---|
--help | Prints information help and exits. | ||
--version, -v | Prints the version number and exits. | ||
--config, -c | TDEXTROUTINE_CONFIG | FILEPATH | The path to the config YAML file. By default, tdextroutine looks for a config file at ~/.tdextroutine/config.yml. Use this option to specify an alternate config file. |
--verbose | TDEXTROUTINE_VERBOSE | tdextroutine prints detailed information to stdout while running. Default: false |
|
--org_key, -k | TDEXTROUTINE_ORG_KEY | TEXT | Required The name of your organization in lowercase. From the VantageCloud Lake Console, go to Organization. Your organization name is listed in the page heading. You can also get your organization name from the URL used to access the Console. For example, organization_name.innovationlabs.teradata.com. |
--pat_token, -t | TDEXTROUTINE_PAT_TOKEN | TEXT | Required Personal Access Token (PAT) for authentication |
--key_path, -p | TDEXTROUTINE_KEY_PATH | TEXT | Required Path to the private key file used for generating PAT |
Use one of the options (account_name, site_id, ip, or account_id) to specify the environment (account).
- Site ID
- Public IP address
- Account ID (Open Analytics Endpoint)
Option | Environment Variable | Type | Description |
---|---|---|---|
--account_name, -n | TDEXTROUTINE_ACCOUNT_NAME | TEXT | The name of the environment (account). For example, ExampleAcct-T001. |
--site_id, -s | TDEXTROUTINE_SITE_ID | TEXT | The Site ID of the environment. For example, ExampleId0100. |
--ip, -i | TDEXTROUTINE_IP | TEXT | The IP address of the environment. For example, 192.0.2.100. |
--account_id, -a | TDEXTROUTINE_ACCOUNT_ID | TEXT | The GUID version of the Account ID. For example, 01e00f00-d00d-0baf-ab00-e1e0d010bbc0. The GUID Account ID is displayed as the Open Analytics Endpoint in the VantageCloud Lake Console Environment Overview tab. |
Use the --username option to specify the credentials of the Environment database user. If not specified, tdextroutine prompts for it.
- For security reasons, you should not set the username in the config YAML file. Use an environment variable to pass the value instead. For example:
export TDEXTROUTINE_USERNAME=bobby
- DBC user cannot be used for creating UDFs and external stored procedures. Create a different user for this purpose.
Option | Environment Variable | Type | Description |
---|---|---|---|
--username, -u | TDEXTROUTINE_USERNAME | TEXT | The username of the Environment database user. For example, bobby. |
Use the options in the following table to specify whether caching is used, which may improve performance.
Option | Environment Variable | Type | Description |
---|---|---|---|
--cache_dir | TDEXTROUTINE_CACHE_DIR | DIRPATH | The path to the cache directory. By default tdextroutine uses ~/.tdextroutine/ as the directory for cache files. Use this option to specify an alternate directory. |
--cache_account | TDEXTROUTINE_CACHE_ACCOUNT | BOOL | Whether to cache reverse-lookup details for environments (accounts). When specifying an account using account_name, ip, or site_id options, tdextroutine determines the GUID Account ID by getting a list of all accounts from the VantageCloud Lake Console interface and searching for a matching record. If this option is true, tdextroutine saves this information in a local cache file, (~/.tdextroutine/account_cache.json). This may improve performance. Default: true. |