Holistics CLI
Command-line interface to Holistics API
Build and Publish
First, open version.rb
and increase the version number. Please also update the changelog too.
Then run the following: $ git tag -a v0.0.3 && git push --tags
$ gem build holistics.gemspec
WARNING: description and summary are identical
WARNING: See http://guides.rubygems.org/specification-reference/ for help
Successfully built RubyGem
Name: holistics
Version: 0.0.3
File: holistics-0.0.3.gem
$ gem push holistics-0.0.3.gem
Installation (for public facing)
Install gem from RubyGems
$ gem install holistics
Then perform authentication:
$ holistics login [token]
Authenticating token...
Authentication successful. Info:
- ID: 1
- Email: [email protected]
To change remote server for testing purpose
$ HOLISTICS_DEV=1 holistics login [token]
# Will point to http://localhost:3000
$ HOLISTICS_STAGING=1 holistics login [token]
# Will point to https://staging.holistics.io
# or custom host
$ HOLISTICS_HOST=https://blah.com holistics login [token]
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 |
Perform a data transport
$ holistics transport -from-ds-id <from_data_source_id> -dest-ds-id <dest_data_source_id> --from-table-name <table_name>
Example:
$ holistics transport -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.
dbt commands
Upload dbt's manifest.json file to Holistics
$ holistics dbt upload --file-path /path/to/manifest.json --data-source demodb
Custom table build transport
See samples/clicks_mysql_to_redshift.json
for details of transport configs.
$ holistics transport -c samples/clicks_mysql_to_redshift.json