Name | hdxcli JSON |
Version |
1.0rc67
JSON |
| download |
home_page | None |
Summary | Hydrolix command line utility to do CRUD operations on projects, tables, transforms and other resources in Hydrolix clusters |
upload_time | 2024-11-01 23:03:55 |
maintainer | None |
docs_url | None |
author | German Diago Gomez |
requires_python | <4.0,>=3.10 |
license | MIT |
keywords |
database
bigdata
hydrolix
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
[![](images/hdxcli.png)](https://github.com/hydrolix/hdx-cli)
`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:
```shell
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:
```shell
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:
```shell
hdxcli profile list
```
Showing default profile:
```shell
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:
``` shell
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:
``` shell
hdxcli --project <project-name> --table <table-name> transform create -f <transform-settings-file>.json <transform-name>
```
## Ingest
### Batch Job
Create a batch job:
``` shell
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:
``` shell
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`
- Set/Unset
- *set*
- `hdxcli set <project-name> <table-name>`
- *unset*
- `hdxcli unset`
- 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>`
- 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:
``` shell
hdxcli --help
```
Check which commands are available for each resource by typing:
``` shell
hdxcli [<resource>...] [<verb>] --help
```
## Performing operations against another server
If you want to use `hdxcli` against another server, use `--profile` option:
``` shell
hdxcli --profile <profile-name> project list
```
## Obtain indented resource information
When you use the verb `show` on any resource, the output looks like this:
``` shell
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`:
``` shell
hdxcli --project <project-name> project show -i 4
{
"name": "project-name",
"org": "org-uuid",
"description": "description",
"uuid": "uuid",
...,
}
```
Raw data
{
"_id": null,
"home_page": null,
"name": "hdxcli",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": null,
"keywords": "database, bigdata, hydrolix",
"author": "German Diago Gomez",
"author_email": "german@hydrolix.io",
"download_url": "https://files.pythonhosted.org/packages/07/14/7690931fa664581450a184759de7ec21660afdf7992a674c65864dc4ece3/hdxcli-1.0rc67.tar.gz",
"platform": null,
"description": "[![](images/hdxcli.png)](https://github.com/hydrolix/hdx-cli)\n\n\n`hdxcli` is a command-line tool to work with hydrolix projects and tables\ninteractively.\n\nCommon operations such as CRUD operations on projects/tables/transforms \nand others can be performed.\n\n# Hdx-cli installation\n\nYou can install `hdxcli` from pip:\n\n```shell\npip install hdxcli\n```\n## System Requirements\nPython version `>= 3.10` is required.\n\nMake sure you have the correct Python version installed before proceeding \nwith the installation of `hdxcli`.\n\n# Usage\n\n## Command-line tool organization\n\nThe tool is organized, mostly with the general invocation form of:\n\n```shell\nhdxcli <resource> [<subresource...] <verb> [<resource_name>]\n```\n\nTable and project resources have defaults that depend on the profile\nyou are working with, so they can be omitted if you previously used \nthe `set` command.\n\nFor all other resources, you can use `--transform`, `--dictionary`, \n`--source`, etc. Please see the command line help for more information.\n\n## Profiles\n`hdxcli` supports multiple profiles. You can use a default profile or\nuse the `--profile` option to operate on a non-default profile.\n\nWhen trying to invoke a command, if a login to the server is necessary, \na prompt will be shown and the token will be cached.\n\n## Listing and showing profiles\n\nListing profiles:\n```shell\nhdxcli profile list\n```\n\nShowing default profile:\n```shell\nhdxcli profile show\n```\n\n## Projects, tables and transforms\n\nThe basic operations you can do with these resources are:\n\n- list them\n- create a new resource\n- delete an existing resource\n- modify an existing resource\n- show a resource in raw json format\n- show settings from a resource\n- write a setting\n- show a single setting\n\n## Working with transforms\n\nYou can create and override transforms with the following commands.\n\nCreate a transform:\n``` shell\nhdxcli transform create -f <transform-settings-file> <transform-name>\n```\n\nRemember that a transform is applied to a table in a project, so whatever \nyou set with the command-line tool will be the target of your transform.\n\n\nIf you want to override it, do:\n\n``` shell\nhdxcli --project <project-name> --table <table-name> transform create -f <transform-settings-file>.json <transform-name>\n```\n\n## Ingest\n### Batch Job\nCreate a batch job:\n\n``` shell\nhdxcli job batch ingest <job-name> <job-settings>.json\n```\n\n`job-name` is the name of the job that will be displayed when listing batch \njobs. `job-settings` is the path to the file containing the specifications \nrequired to create that ingestion (for more information on the required \nspecifications, see Hydrolix API Reference).\n\nIn this case, the project, table, and transform are being omitted and the \nCLI will use the default transform within the project and table previously \nconfigured in the profile with the `--set` command. Otherwise, you can add \n`--project <project-name>, --table <table-name> --transform <transform-name>`.\n\nThis allows you to execute the command as follows:\n``` shell\nhdxcli --project <project-name>, --table <table-name> --transform <transform-name> job batch ingest <job-name> <job-settings>.json\n```\n\n# Commands\n\n- Profile\n - *list*\n - `hdxcli profile list`\n - *add*\n - `hdxcli profile add <profile-name>`\n - *show*\n - `hdxcli --profile <profile-name> profile show`\n- Set/Unset\n - *set*\n - `hdxcli set <project-name> <table-name>`\n - *unset*\n - `hdxcli unset`\n- Project\n - *list*\n - `hdxcli project list`\n - *create*\n - `hdxcli project create <project-name>`\n - *delete*\n - `hdxcli project delete <project-name>`\n - *activity*\n - `hdxcli --project <project-name> project activity`\n - *stats*\n - `hdxcli --project <project-name> project stats`\n - *show*\n - `hdxcli --project <project-name> project show`\n - *settings*\n - `hdxcli --project <project-name> project settings`\n - `hdxcli --project <project-name> project settings <setting-name>`\n - `hdxcli --project <project-name> project settings <setting-name> <new-value>`\n- Table\n- Transform\n- Job\n- Purgejobs\n- Sources\n- Dictionary\n- Dictionary Files\n- Function\n- Storage\n- Integration\n- Migrate\n- Version\n\n# FAQ: Common operations\n\n## Showing help \n\nIn order to see what you can do with the tool:\n\n``` shell\nhdxcli --help\n```\n\nCheck which commands are available for each resource by typing:\n``` shell\nhdxcli [<resource>...] [<verb>] --help\n```\n\n## Performing operations against another server\n\nIf you want to use `hdxcli` against another server, use `--profile` option:\n``` shell\nhdxcli --profile <profile-name> project list\n```\n\n## Obtain indented resource information\n\nWhen you use the verb `show` on any resource, the output looks like this:\n``` shell\nhdxcli --project <project-name> project show\n{\"name\": \"project-name\", \"org\": \"org-uuid\", \"description\": \"description\", \"uuid\": \"uuid\", ...}\n```\n\nIf you need to have an indented json version, just add `-i`, `--indent int`:\n``` shell\nhdxcli --project <project-name> project show -i 4\n{\n \"name\": \"project-name\", \n \"org\": \"org-uuid\", \n \"description\": \"description\", \n \"uuid\": \"uuid\", \n ...,\n}\n```",
"bugtrack_url": null,
"license": "MIT",
"summary": "Hydrolix command line utility to do CRUD operations on projects, tables, transforms and other resources in Hydrolix clusters",
"version": "1.0rc67",
"project_urls": null,
"split_keywords": [
"database",
" bigdata",
" hydrolix"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "fb96dd65820efbd27cfd1b7637fb28c031e55ad7b1ba5be6e2cb3ee202e27eb4",
"md5": "bbd4939d8759437a39b59f7d0ef1d438",
"sha256": "d7191455af07c0377c81c36629d67c79d87e12d48a9f955a378c2e963b113fa9"
},
"downloads": -1,
"filename": "hdxcli-1.0rc67-py3-none-any.whl",
"has_sig": false,
"md5_digest": "bbd4939d8759437a39b59f7d0ef1d438",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 124205,
"upload_time": "2024-11-01T23:03:52",
"upload_time_iso_8601": "2024-11-01T23:03:52.869158Z",
"url": "https://files.pythonhosted.org/packages/fb/96/dd65820efbd27cfd1b7637fb28c031e55ad7b1ba5be6e2cb3ee202e27eb4/hdxcli-1.0rc67-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "07147690931fa664581450a184759de7ec21660afdf7992a674c65864dc4ece3",
"md5": "65a5b58a8b2ec89d2fd183063103f383",
"sha256": "9dd0ea2edb21d2c73e02f05afcdd2a3b524d0a1f845c13733dd467c2c35acabb"
},
"downloads": -1,
"filename": "hdxcli-1.0rc67.tar.gz",
"has_sig": false,
"md5_digest": "65a5b58a8b2ec89d2fd183063103f383",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 87046,
"upload_time": "2024-11-01T23:03:55",
"upload_time_iso_8601": "2024-11-01T23:03:55.135489Z",
"url": "https://files.pythonhosted.org/packages/07/14/7690931fa664581450a184759de7ec21660afdf7992a674c65864dc4ece3/hdxcli-1.0rc67.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-01 23:03:55",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "hdxcli"
}