Command-Line Interface
The tdk command runs a workflow configuration against your databases from a terminal, a script or a CI job, without Governor. It connects to the input and output databases itself, from the machine where it runs.
To install it, see CLI installation.
Requirements
-
Java 17 or later. Check with
java --version. -
A license key, in the
SYNTHESIZED_KEYenvironment variable or in~/.synthesized/key. Without one, the CLI runs in free mode. See Set your license key.
Usage
tdk [options] [command] [command options]
Options come before the command. With no command, tdk runs the transformation that the configuration file describes:
tdk --config-file workflow.yaml \
--input-url "jdbc:postgresql://db.example.com:5432/production" \
--input-username tdk --input-password "$INPUT_PASSWORD" \
--output-url "jdbc:postgresql://db.example.com:5432/testing" \
--output-username tdk --output-password "$OUTPUT_PASSWORD"
Quote JDBC URLs that contain ; or &, so the shell doesn’t split the command.
Options
| Option | What it sets | Environment variable |
|---|---|---|
|
The workflow configuration file. |
|
|
An inventory file with the input and output connections. It takes precedence over the connection options below. |
|
|
The JDBC URL of the input database. See JDBC URL Examples. |
|
|
The input database user. |
|
|
The input database password. |
|
|
The input user, as a reference to a secret. See Secrets. |
|
|
The input password, as a reference to a secret. |
|
|
The JDBC URL of the output database. |
|
|
The output database user. |
|
|
The output database password. |
|
|
The output user, as a reference to a secret. |
|
|
The output password, as a reference to a secret. |
|
|
Shows the help and exits. |
|
|
Shows the version and exits. |
The environment variables are read by the CLI Docker image. See CLI Docker Environment Variables.
Secrets
The -secret options take a JSON reference to a secret in a secret manager, instead of the value itself. Turn on the secret manager first with its application property. For example, with SECRETS_AWS_SECRET_MANAGER_ENABLED=true:
tdk --config-file workflow.yaml \
--input-url "jdbc:postgresql://db.example.com:5432/production" \
--input-username tdk \
--input-password-secret '{"type": "aws", "secret": "prod/tdk/input-password"}' \
...
The fields for AWS, GCP and Vault are in Secret managers.
Commands
| Command | Alias | What it does |
|---|---|---|
(none) |
Runs the transformation. |
|
|
|
Checks the configuration file against the JSON schema. |
|
|
Prints the effective configuration, with defaults filled in, instead of running. It prints to the console, or to the file given with |
|
|
Prints the built-in default configuration, including the rules that pick transformers. Your configuration can override any of it. |
|
|
Prints the JSON schema of the configuration file, for editor autocompletion and validation. |
|
|
Prints the matchers report. |
|
|
Collects a summary of the input database, without sensitive data, for troubleshooting. See Diagnostic tool. |
|
|
Releases the lock that a run holds on the output database. Use it only when no run is using that output. See Locking. |
|
|
Prints the expiry date of the license key. |
|
Shows the help for a command, such as |
Examples:
# Check a configuration file
tdk --config-file workflow.yaml validate-config
# Print the effective configuration to a file
tdk --config-file workflow.yaml \
--input-url "jdbc:postgresql://db.example.com:5432/production" \
--input-username tdk --input-password "$INPUT_PASSWORD" \
dry-run -ec effective.yaml
# Release the lock on an output database
tdk --output-url "jdbc:postgresql://db.example.com:5432/testing" \
--output-username tdk --output-password "$OUTPUT_PASSWORD" \
release-lock
Settings
The CLI also reads application properties, as environment variables or from an application.properties file. They turn on secret managers, the working directory, and cloud integrations and licensing. See Application Properties.
To set the JVM heap or other Java options, see Performance.
Full help output
tdk --help
Usage: tdk [-hV] [-c=<config-file>] [-i=<inventory-file>]
[-ip=<input-password>] [-ips=<input-password-secret>]
[-iu=<input-url>] [-iU=<input-username>]
[-iUs=<input-username-secret>] [-op=<output-password>]
[-ops=<output-password-secret>] [-ou=<output-url>]
[-oU=<output-username>] [-oUs=<output-username-secret>] [COMMAND]
TDK
-c, --config-file=<config-file>
Configuration file
-h, --help Show this help message and exit.
-i, --inventory-file=<inventory-file>
Inventory file with information about using data sources
-ip, --input-password=<input-password>
Input password, default to null
-ips, --input-password-secret=<input-password-secret>
Input password secret in JSON format, default to null
-iu, --input-url=<input-url>
Input database URL
-iU, --input-username=<input-username>
Input username, default to null
-iUs, --input-username-secret=<input-username-secret>
Input username secret in JSON format, default to null
-op, --output-password=<output-password>
Output password, default to null
-ops, --output-password-secret=<output-password-secret>
Output password secret in JSON format, default to null
-ou, --output-url=<output-url>
Output database URL
-oU, --output-username=<output-username>
Output username, default to null
-oUs, --output-username-secret=<output-username-secret>
Output username secret in JSON format, default to null
-V, --version Print version information and exit.
Commands:
help Display help information about the specified command.
diagnostic, dg Collect diagnostic information
default-config, dc Print built-in default configuration (can be
overridden in the user config)
dry-run, dr Print the effective configuration instead of running
the transformation to the console (by default) or
to the file (specified as `-ec` parameter value)
json-schema, js Print json schema for configuration YAML file
license-expiration, le Print the expiration date of the license key
matchers-report, mr Print matchers report
release-lock, rl Release lock that is hold by TDK for output database
validate-config, vc Validate YAML config using json schema