Skip to main content

Access Data, Connections, and Gateway Address

How TBT receives access data, how connection profiles map to environment variables, how the gateway address gets resolved, and the full list of commands and options.


Basic Principle​

Secret data never goes in commands. Anyone can see a command's contents, since they land in terminal history and often get printed in automated system logs. That's why all secret data is provided through environment variables instead.


Variable Names​

Every connection profile named in the mapping file gets its own variable prefix: the profile name in uppercase, with anything that isn't a letter or digit swapped for an underscore. So the profile prod-corebanking becomes the prefix TBT_PROD_COREBANKING_.

Platform access data (all three are required):

VariableContent
TBT_<PROFILE>_ACCESS_TOKENCreated in the platform, Access Token menu
TBT_<PROFILE>_USER_KEYAccount user key
TBT_<PROFILE>_TENANTTenant name, example default

Database connection (used by the draft command and to connect to the source database):

VariableContent
TBT_<PROFILE>_DB_TYPEmysql, mariadb, postgresql, mssql, oracle, sqlite, or clickhouse
TBT_<PROFILE>_DB_HOSTDatabase address
TBT_<PROFILE>_DB_PORTDatabase port
TBT_<PROFILE>_DB_USERDatabase user name
TBT_<PROFILE>_DB_PASSWORDDatabase password
TBT_<PROFILE>_DB_NAMEDatabase name
TBT_<PROFILE>_DB_SCHEMAFor Oracle and PostgreSQL; written separately from the database name
TBT_<PROFILE>_DB_SSLfalse by default; to enable, set to 1, yes, y, on, require, or required
TBT_<PROFILE>_DB_CERTDatabase CA certificate, if DB_SSL is enabled

Gateway Address​

Just type the gateway host name or IP address. The rest is completed automatically:

What Is TypedWhat TBT Uses
Without http:// or https://https:// is added automatically
Without a path/api is added automatically, unless the host name starts with gw-
Already has a pathUsed as is
  • The gw- prefix is only checked on the host name. Example: gw-dev.example.com:8082 qualifies, while mygw-dev.example.com does not. Development gateways with the gw- prefix are contacted directly, so /api must not be added.
  • The address can be provided through the --gateway option, the TBT_GATEWAY variable, or typed on the menu screen when prompted. Commands without a screen (run, resume, retry, validate, preview) still require an address from one of these methods.
note

TBT tests the address before you type any access data. It calls the gateway's /health endpoint, which needs no access data and responds with {"status":"ok", ...}. A mistyped address usually gets answered by some other web page, which this check catches immediately, before your access token ever gets sent to the wrong place. Test it manually with:

curl -s https://<gateway-address>/api/health

Connection Profiles Saved From the Menu Screen​

Profiles saved from the menu screen live in ~/.config/tbt/connections.yaml (fallback: ./.tbt/connections.yaml), readable only by their owner. This file never stores passwords or platform tokens, and it'll refuse to load if it somehow ends up containing either.


Commands and Menu Screen​

What You Want to DoCommand
Open the menu screen./run.sh (without additional commands)
Check the mapping without changing anything./run.sh validate --mapping m.yaml
View original values and their results without changing./run.sh preview --mapping m.yaml
Run the job./run.sh run --mapping m.yaml
Continue a stopped job./run.sh resume --run <folder> --mapping m.yaml
Reprocess only refused records./run.sh retry --run <folder> --mapping m.yaml
Create a mapping from a table./run.sh pick (screen) or ./run.sh draft --connection c --table t
Save the mapping as a review sheet (CSV)./run.sh export --mapping m.yaml
Apply an edited review sheet./run.sh import --mapping m.yaml --sheet s.csv
View all runs and their final results./run.sh history [--run <folder>]
View the version./run.sh version
note

history only reads run folders. It needs no database, gateway, or access data, so its output can double as proof of execution.

Run TBT without extra commands and it opens the menu screen in this order: 1. Build a mapping from a table, 2. Open a mapping, 3. Continue a stopped run, 4. Retry refused records, 5. History. Menus 3 and 4 only show run folders that still need follow-up: ones with a checkpoint or a failures.jsonl file with content. Finished runs show up in History only.


Additional Options​

All optional. The defaults work fine for most jobs.

OptionDefaultFunction
--mapping—Mapping file (YAML or JSON)
--gatewayvalue of TBT_GATEWAYGateway address
--resultsresultsFolder where run results are stored
--run—Existing run folder, for resume or retry
--batch250Number of rows per group (window)
--concurrency10Number of requests to the gateway running at the same time
--db-connections10Number of connections to each database (intentionally separate from --concurrency)
--pacing0Pause between groups, for busy databases
--rate-limit0Limit of requests to the gateway per second; 0 = unlimited
--sample5Number of sample rows shown by preview
--yesoffSkip confirmation (for automated processes)
--jsonoffResults in JSON format for other programs to read

For how to read run results and avoid data loss, see Run Results and Data Safety.