This documentation is available to agents as Markdown at https://docs.synthesized.io/tdk/latest/user_guide/040_reference/api_reference/command_line_interface.md. For the complete documentation index, see llms.txt.

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_KEY environment 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

--config-file, -c

The workflow configuration file.

SYNTHESIZED_USERCONFIG_FILE

--inventory-file, -i

An inventory file with the input and output connections. It takes precedence over the connection options below.

SYNTHESIZED_INVENTORY_FILE

--input-url, -iu

The JDBC URL of the input database. See JDBC URL Examples.

SYNTHESIZED_INPUT_URL

--input-username, -iU

The input database user.

SYNTHESIZED_INPUT_USERNAME

--input-password, -ip

The input database password.

SYNTHESIZED_INPUT_PASSWORD

--input-username-secret, -iUs

The input user, as a reference to a secret. See Secrets.

SYNTHESIZED_INPUT_USERNAME_SECRET

--input-password-secret, -ips

The input password, as a reference to a secret.

SYNTHESIZED_INPUT_PASSWORD_SECRET

--output-url, -ou

The JDBC URL of the output database.

SYNTHESIZED_OUTPUT_URL

--output-username, -oU

The output database user.

SYNTHESIZED_OUTPUT_USERNAME

--output-password, -op

The output database password.

SYNTHESIZED_OUTPUT_PASSWORD

--output-username-secret, -oUs

The output user, as a reference to a secret.

SYNTHESIZED_OUTPUT_USERNAME_SECRET

--output-password-secret, -ops

The output password, as a reference to a secret.

SYNTHESIZED_OUTPUT_PASSWORD_SECRET

--help, -h

Shows the help and exits.

--version, -V

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.

validate-config

vc

Checks the configuration file against the JSON schema.

dry-run

dr

Prints the effective configuration, with defaults filled in, instead of running. It prints to the console, or to the file given with -ec.

default-config

dc

Prints the built-in default configuration, including the rules that pick transformers. Your configuration can override any of it.

json-schema

js

Prints the JSON schema of the configuration file, for editor autocompletion and validation.

matchers-report

mr

Prints the matchers report.

diagnostic

dg

Collects a summary of the input database, without sensitive data, for troubleshooting. See Diagnostic tool.

release-lock

rl

Releases the lock that a run holds on the output database. Use it only when no run is using that output. See Locking.

license-expiration

le

Prints the expiry date of the license key.

help

Shows the help for a command, such as tdk help dry-run.

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