Holistics CLI

Command-line interface to Holistics API

Installation

Install gem from RubyGems

$ gem install holistics

Then perform authentication:

$ holistics login [token]
Authenticating token...
Authentication successful. Info:
- ID: 1
- Email: [email protected]

Data Transport commands

List existing data sources:

$ holistics ds_list
Listing all data sources...
| ID | Type       | Name          |
|----+------------+---------------|
| 1  | PostgreSQL | Production DB |
| 2  | Redshift   | Analytics DB  |

Transport data from Redshift to Postgres:

$ holistics rs_to_pg -s <source_id> -d <dest_id> -t <table_name>

Example:

$ holistics rs_to_pg -s 1 -d 2 -t public.users
Submitting transport job ...
Job submitted. Job ID: 738.
[job:738] Status: queued
[job:738] Status: queued
[job:738] Status: queued
[job:738] Status: running
[job:738] Reading schema of table public.users ...
[job:738] Counting table's records ...
[job:738] - Record count: 6,783
[job:738] Creating temporary table public.temp_users_blah on destination ...
[job:738] Getting table data from source ...
[job:738] Loading data into Redshift table public.temp_users_blah ...
[job:738] Hot-swapping with Redshift table public.users ...
[job:738] Done.

Custom table build transport

See samples/clicks_mysql_to_redshift.json for details of transport configs.

$ holistics mysql_to_redshift -c samples/clicks_mysql_to_redshift.json

Mechanism:

  • Submit a POST request to /transports. Will check and return a Job ID.
  • Keep pinging