Skip to main content

Hydrolix command line utility to do CRUD operations on projects, tables, transforms and other resources in Hydrolix clusters

Project description

hdxcli is a command-line tool to work with hydrolix projects and tables interactively.

Common operations such as CRUD operations on projects/tables/transforms and others can be performed.

Hdx-cli installation

You can install hdxcli from pip:

pip install hdxcli

Using hdxcli command-line program

hdxcli supports multiple profiles. You can use a default profile or use the --profile option to operate on a non-default profile.

When trying to invoke a command, if a login to the server is necessary, a prompt will be shown and the token will be cached.

Command-line tool organization

The tool is organized, mostly with the general invocation form of:

hdxcli <resource> [<subresource...] <verb> [<resource_name>]

Table and project resources have defaults that depend on the profile you are working with, so they can be omitted if you used the set command.

For all other resources, you can use --transform, --dictionary, etc. Please see the command line help for more information.

Projects, tables and transforms

The basic operations you can do with these resources are:

  • list them
  • create a new resource
  • delete an existing resource
  • modify an existing resource
  • show a resource in raw json format
  • show settings from a resource
  • write a setting
  • show a single setting

Working with transforms and batch jobs

In order to use a transforms, you need to:

  1. create a transform
hdxcli transform create -f atransform.json atransform

Where atransform.json is a local file and atransform is the name for the transform that will be uploaded to the cluster. Remember that a transform is applied to a table in a project, so whatever you set with the command-line tool will be the target of your transform.

If you want to override it, do:

hdxcli --project <the-project> --table <the-table> transform create -f atransform.json atransform
  1. ingest a batch job
hdxcli job batch ingest <job-name> <job-url>

The job-name is the job name you will see if you list the job batch. job url can be either a local url or a url to a bucket for which the cluster has at lease read access to.

Listing and showing your profiles

Listing profiles:

hdxcli profile list

Shogin default profile

hdxcli profile show

FAQ: Common operations

Showing help

In order to see what you can do with the tool:

hdxcli --help

Listing resources

To list projects:

hdxcli project list

To list resources on a project:

hdxcli --project <project-name> table list

You can avoid repeating the project and table name by using the set command:

Set/unset project and table

hdxcli set <your-project> <your-table>

Subsequent operations will be applied to the project and table. If you want to unset it, just do:

hdxcli unset

Creating resources

hdxcli project create <project-name>

Peforming operations against another server

If you want to use hdxcli against another server, use --profile option:

Working with resource settings

Show settings for a resource:

hdxcli project <myprojectname> settings
hdxcli table <mytablename> settings
hdxcli --transform <mytransform transform settings

Modify a setting:

hdxcli table <mytablename> settings key value

Show a single setting:

hdxcli table <mytablename> settings key value

Getting help for subcommands

Check which commands are available for each resource by typing:

hdxcli [<resource>...] [<verb>] --help

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hdxcli-1.0rc12.tar.gz (21.8 kB view hashes)

Uploaded Source

Built Distribution

hdxcli-1.0rc12-py3-none-any.whl (32.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page