You can use the command line to control several elements related to connectors.


td connector:guess

Run guess to generate a connector config file

usage:

$ td connector:guess [config]

options:

command

description

-type[=TYPE]

(obsoleted)

-access-id ID

(obsoleted)

-access-secret SECRET

(obsoleted)

-source SOURCE

(obsoleted)

-o, --out FILE_NAME

output file name for connector:preview

-g, --guess NAME,NAME,...

specify list of guess plugins that users want to use

example:

$ td connector:guess config.yml -o td-load.yml

example config.yml:

in: type:
  s3 bucket: my-s3-bucket
  endpoint: s3-us-west-1.amazonaws.com
  path_prefix: path/prefix/to/import/ 
  access_key_id: ABCXYZ123ABCXYZ123
  secret_access_key: AbCxYz123aBcXyZ123
out:
  mode: append

td connector:preview

Show a subset of possible data that the data connector fetches

usage:

$ td connector:preview <config>

options:

command

description

-f, --format FORMAT

format of the result rendering (tsv, csv, json or table. default is table)

example:

$ td connector:preview td-load.yml

td connector:issue

Runs connector execution one time only

usage:

$ td connector:issue <config>

 options:

command

description

-database DB_NAME

destination database

-table TABLE_NAME

destination table

-time-column COLUMN_NAME

data partitioning key

-w, --wait

wait for finishing the job

-auto-create-table

Create table and database if doesn't exist

 example:

$ td connector:issue td-load.yml

td connector:list

Shows a list of connector sessions

usage:

$ td connector:list

options:

command

description

-f, --format FORMAT

format of the result rendering (tsv, csv, json or table. default is table)

example:

$ td connector:list

td connector:create

Creates a new connector session

usage:

$ td connector:create <name> <cron> <database> <table> <config>

 options:

command

description

-time-column COLUMN_NAME

data partitioning key

-t, --timezone TZ

name of the timezone.

Only extended timezones like 'Asia/Tokyo', 'America/Los_Angeles' are supported, (no 'PST', 'PDT', etc...). When a timezone is specified, the cron schedule is referred to that timezone. Otherwise, the cron schedule is referred to the UTC timezone. E.g. cron schedule '0 12 * * *' will execute daily at 5 AM without timezone option and at 12PM with the -t / --timezone 'America/Los_Angeles' timezone option

-D, --delay SECONDS

delay time of the schedule

 example:

$ td connector:create connector1 "0 * * * *" connector_database connector_table td-load.yml

td connector:show

Shows the execution settings for a connector such as name, timezone, delay, database, table

usage:

$ td connector:show <name>

example:

$ td connector:show connector1

td connector:update

Modify a connector session

usage:

$ td connector:update <name> [config]

options:

command

description

-n, --newname NAME

change the schedule's name

-d, --database DB_NAME

change the database

-t, --table TABLE_NAME

change the table

-s, --schedule [CRON]

change the schedule or leave blank to remove the schedule

-z, --timezone TZ

name of the timezone.

Only extended timezones like 'Asia/Tokyo', 'America/Los_Angeles' are supported, (no 'PST', 'PDT', etc...). When a timezone is specified, the cron schedule is referred to that timezone. Otherwise, the cron schedule is referred to the UTC timezone. E.g. cron schedule '0 12 * * *' will execute daily at 5 AM without timezone option and at 12PM with the -t / --timezone 'America/Los_Angeles' timezone option

-D, --delay SECONDS

change the delay time of the schedule

-T, --time-column COLUMN_NAME

change the name of the time column

-c, --config CONFIG_FILE

update the connector configuration

--config-diff CONFIG_DIFF_FIL

update the connector config_diff

example:

$ td connector:update connector1 -c td-bulkload.yml -s '@daily' ... 

td connector:delete

Delete a connector session

usage:

$ td connector:delete <name>

example:

$ td connector:delete connector1

td connector:history

Show the job history of a connector session

usage:

$ td connector:history <name>

options:

command

description

-f, --format FORMAT

format of the result rendering (tsv, csv, json or table. default is table)

example:

$ td connector:history connector1

td connector:run

Run a connector session for the specified time option

usage:

$ td connector:run <name> [time]

 options:

command

description

-w, --wait

wait for finishing the job

example:

$ td connector:run connector1 "2016-01-01 00:00:00"
  • No labels