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
System Requirements
Python version >= 3.10
is required.
Make sure you have the correct Python version installed before proceeding
with the installation of hdxcli
.
Usage
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 previously used
the set
command.
For all other resources, you can use --transform
, --dictionary
,
--source
, etc. Please see the command line help for more information.
Profiles
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.
Listing and showing profiles
Listing profiles:
hdxcli profile list
Showing default profile:
hdxcli profile show
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
You can create and override transforms with the following commands.
Create a transform:
hdxcli transform create -f <transform-settings-file> <transform-name>
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 <project-name> --table <table-name> transform create -f <transform-settings-file>.json <transform-name>
Ingest
Batch Job
Create a batch job:
hdxcli job batch ingest <job-name> <job-settings>.json
job-name
is the name of the job that will be displayed when listing batch
jobs. job-settings
is the path to the file containing the specifications
required to create that ingestion (for more information on the required
specifications, see Hydrolix API Reference).
In this case, the project, table, and transform are being omitted and the
CLI will use the default transform within the project and table previously
configured in the profile with the --set
command. Otherwise, you can add
--project <project-name>, --table <table-name> --transform <transform-name>
.
This allows you to execute the command as follows:
hdxcli --project <project-name>, --table <table-name> --transform <transform-name> job batch ingest <job-name> <job-settings>.json
Commands
- Profile
- list
hdxcli profile list
- add
hdxcli profile add <profile-name>
- show
hdxcli --profile <profile-name> profile show
- list
- Set/Unset
- set
hdxcli set <project-name> <table-name>
- unset
hdxcli unset
- set
- Project
- list
hdxcli project list
- create
hdxcli project create <project-name>
- delete
hdxcli project delete <project-name>
- activity
hdxcli --project <project-name> project activity
- stats
hdxcli --project <project-name> project stats
- show
hdxcli --project <project-name> project show
- settings
hdxcli --project <project-name> project settings
hdxcli --project <project-name> project settings <setting-name>
hdxcli --project <project-name> project settings <setting-name> <new-value>
- list
- Table
- Transform
- Job
- Purgejobs
- Sources
- Dictionary
- Dictionary Files
- Function
- Storage
- Integration
- Migrate
- Version
FAQ: Common operations
Showing help
In order to see what you can do with the tool:
hdxcli --help
Check which commands are available for each resource by typing:
hdxcli [<resource>...] [<verb>] --help
Performing operations against another server
If you want to use hdxcli
against another server, use --profile
option:
hdxcli --profile <profile-name> project list
Obtain indented resource information
When you use the verb show
on any resource, the output looks like this:
hdxcli --project <project-name> project show
{"name": "project-name", "org": "org-uuid", "description": "description", "uuid": "uuid", ...}
If you need to have an indented json version, just add -i
, --indent int
:
hdxcli --project <project-name> project show -i 4
{
"name": "project-name",
"org": "org-uuid",
"description": "description",
"uuid": "uuid",
...,
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file hdxcli-1.0rc69.tar.gz
.
File metadata
- Download URL: hdxcli-1.0rc69.tar.gz
- Upload date:
- Size: 87.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.10.12 Linux/6.8.0-48-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 319a92a2a93c94ff41bc5cb0d890a9a841fb0775c9a9c37fb023bf9a4a2403ee |
|
MD5 | 9a10e8311615d49f34d8c1adc5a7bb0c |
|
BLAKE2b-256 | 52b4354c46a23912e009eea288ff6cb581e98d073cfe4c17e4b1cebb3d46d17d |
File details
Details for the file hdxcli-1.0rc69-py3-none-any.whl
.
File metadata
- Download URL: hdxcli-1.0rc69-py3-none-any.whl
- Upload date:
- Size: 125.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.10.12 Linux/6.8.0-48-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b7edde884e45ae3bd5b185e9fac197e6062f69df480ce26623b795f41e6b5aa |
|
MD5 | 617eb2031716cdadb6b7dd4c8b451550 |
|
BLAKE2b-256 | fc2f744416b5d0f416e40b8c7837b8df1845dd2f7c7332fcdfb3ea448f25ff48 |