Commands
Profile⚓︎
There is a 'default' profile that will be used if you omit --profile <profile-name> on each request to the HDXCLI.
List⚓︎
Add⚓︎
One way is to do it interactively:
Or by passing the same information via options:
Show⚓︎
If you omit --profile <profile-name>, 'default' profile will be shown.
Set/Unset⚓︎
hdxcli allows you to save both project name and table name to use as default.
Set⚓︎
Unset⚓︎
From now on, when you see --project <project-name> and --table <table-name>, you know that it can be omitted if the set command was previously used.
User⚓︎
List⚓︎
Delete⚓︎
Show⚓︎
Assign roles⚓︎
You can assign just one or multiple roles to a specific user. The option -r, --role can be used multiple times. It's a required setting.
Remove roles⚓︎
The same as the assign-role command, but instead it removes roles from a user.
Invite⚓︎
List⚓︎
The -p or --pending option can be used to filter the invite list, displaying only pending invitations.
Send⚓︎
The -r or --role option can be used multiple times. It's a required setting.
Resend⚓︎
Delete⚓︎
Show⚓︎
Service Account⚓︎
This command manages Service Accounts. Service Accounts are typically used for programmatic access, automation, or to grant specific, limited permissions to applications or scripts without using individual user credentials. Operations include creating, listing, showing, deleting Service Accounts, managing their roles, and generating access tokens.
List⚓︎
Displays a list of all accessible Service Accounts, showing their names and roles associated.
Create⚓︎
Creates a new Service Account. You must provide a unique name for the new Service Account and specify at least one role to define its permissions.
Options⚓︎
| Name | Type | Description |
|---|---|---|
-r, --role |
string | Role to assign to the Service Account. Use this option multiple times to assign several roles (for example, -r role1 -r role2) (required). |
--gt, --generate-token |
string | If set, a new access token is automatically generated for the Service Account immediately after creation and its details are displayed. |
Show⚓︎
Options⚓︎
| Name | Type | Description |
|---|---|---|
-i, --indent |
flag | Indents the JSON output for improved human readability. |
Delete⚓︎
Options⚓︎
| Name | Type | Description |
|---|---|---|
--disable-confirmation-prompt |
flag | Skips the interactive confirmation prompt before deleting. |
Assign Role⚓︎
Assigns one or more roles to an existing Service Account, granting it additional permissions.
Options⚓︎
| Name | Type | Description |
|---|---|---|
-r, --role |
string | Role to assign to the Service Account. Use this option multiple times to assign several roles (required). |
Remove Role⚓︎
Removes one or more roles from an existing Service Account, revoking specific permissions.
Options⚓︎
| Name | Type | Description |
|---|---|---|
-r, --role |
string | Role to assign to the Service Account. Use this option multiple times to assign several roles (required). |
Generate Token⚓︎
Generates a new access token for a specific Service Account. This token can then be used for authenticating API requests as that Service Account.
Options⚓︎
| Name | Type | Description |
|---|---|---|
-j, --json |
flag | Displays the generated token and its details in JSON format. |
Role⚓︎
List⚓︎
Create⚓︎
There are two ways to create a new role:
- Using options. However, if you choose this method, the role can't have two or more policies.
- Using the interactive method.
Create a role using options⚓︎
-n, --name and -p, --permission are required options to create a new role, and the -p, --permission option can be used multiple times. While a role may or may not have a specific scope, these options are considered optional. The -t, --scope-type expects to receive the name of a resource, such as project, table, transform, and so on, and the -i, --scope-id should be the UUID identifier for that specific resource.
Use the following command to create a new role:
Create a role using interactive method⚓︎
To create a role interactively, use the following command:
Delete⚓︎
Show⚓︎
Edit⚓︎
This is an interactive command that allows you to modify the name of a role and add, modify, or delete policies associated with that role. Before finalizing the operation, it presents a detailed view of the modified role for confirmation or cancellation.
Add users⚓︎
Required. This adds just one user or multiple users to a specific role. The option -u, --user can be used multiple times.
Remove users⚓︎
The same as add-user command but to remove users from a role.
Permissions list⚓︎
This command displays a list of available permissions. Additionally, it allows filtering by type using the option -t, --type (for example -t function), showing only permissions related to that specific type.
Project⚓︎
List⚓︎
Create⚓︎
Delete⚓︎
Display activity⚓︎
Display statistics⚓︎
Show⚓︎
Settings⚓︎
Display all settings⚓︎
Display single setting⚓︎
Modify setting⚓︎
Migrate⚓︎
Table⚓︎
List⚓︎
Create Raw Table (Regular)⚓︎
If creating a regular table, no additional options are required. Use the table create command without specifying any options.
Additionally, an option (--settings-file) exists to set different table settings other than the default. This works for both regular tables and summary tables:
Create Aggregation Table (Summary)⚓︎
When creating summary tables, the following options are necessary:
-
--typeor-t: Specify as summary. -
--sql-queryor-s: Provide the SQL query directly through the command line.
Alternatively, use --sql-query-file to specify a file containing the SQL query.
Example using a SQL query in the command line:
Example using a file containing the SQL query:
Delete⚓︎
Display Activity⚓︎
Display Statistics⚓︎
Show⚓︎
Settings⚓︎
Display All Settings⚓︎
Display Single Setting⚓︎
Modify Setting⚓︎
Migrate⚓︎
Truncate⚓︎
Transform⚓︎
List⚓︎
Create⚓︎
The field ‘name’ in settings will be replaced by
Delete⚓︎
Show⚓︎
Settings⚓︎
Display All Settings⚓︎
Display Single Setting⚓︎
Modify setting⚓︎
Migrate⚓︎
Shadow⚓︎
This command manages shadow tables, which are used to test new or modified transform configurations with a sample of data from an original source table. This is useful to safely verify transform changes before applying them to the main production transform.
To work with shadow tables, you generally need to specify the source context using these global options with the sub-commands:
| Name | Type | Description |
|---|---|---|
--project |
string | Name of the source table where the shadow table will be created. |
--table |
string | Name of the source table. |
--transform |
string | Name of the transform currently associated with the source table. |
Create⚓︎
This command creates a new shadow table. It requires the path to a JSON file containing the settings for the new transform that will be associated with this shadow table.
TRANSFORM_SETTINGS_PATH: Path to the JSON file with the new transform settings for the shadow table (required).
Options⚓︎
| Name | Type | Description |
|---|---|---|
--sample-rate |
integer (0-5) | Percentage of data from the source table to be ingested into the shadow table (required). |
--table-name |
string | Name for the new shadow table. Default: shadow_ + source table name. |
--table-settings |
path | Path to a file containing specific table settings for the shadow table itself. |
--transform-name |
string | Name for the new transform that will be created for the shadow table. Default: shadow_ + source transform name. |
Delete⚓︎
This command deletes a shadow table. It also removes the shadow table's configuration from the source transform.
Start⚓︎
The start command begins or resumes the ingestion of a data sample from the source table into its shadow table. You must specify the percentage of data to sample using the --sample-rate option (a value between 1 and 5).
Stop⚓︎
The stop command halts the ingestion of data from the source table into its shadow table. It effectively sets the sampling rate to 0 on the source transform for that specific shadow table configuration.
Jobs⚓︎
Batch⚓︎
List⚓︎
Ingest⚓︎
It will use the default transform in <project-name>.<table-name> if you don't provide --transform <transform-name>.
Delete⚓︎
Retry⚓︎
Cancel⚓︎
Show⚓︎
Settings⚓︎
Display all settings⚓︎
Display single setting⚓︎
Modify setting⚓︎
Alter⚓︎
List⚓︎
In addition, you can add the following options to filter the result of the alter job list command:
For example, to filter by status running, you would use:
Create⚓︎
There are two ways to create an alter job, each serving a different purpose. The update command allows you to modify the value of a column based on a specified where clause. On the other hand, as you might expect, the delete command provides a way to remove rows based on a where clause. After creating these alter jobs, you must perform a commit on the created alter job to apply the modifications.
Update⚓︎
Delete⚓︎
Commit⚓︎
Cancel⚓︎
Retry⚓︎
Show⚓︎
Delete⚓︎
Purge Jobs⚓︎
This command purge all batch jobs in your org.
Stream⚓︎
Ingest⚓︎
Sources⚓︎
Kinesis / Kafka / SIEM⚓︎
The command structure of these resources is the same, it's only necessary to replace ‘kinesis’ with ‘kafka’ or ‘siem’.
List⚓︎
Create⚓︎
The field ‘name’ in settings will be replaced by <source-name>.
Delete⚓︎
Show⚓︎
Settings⚓︎
Display All Settings⚓︎
Display single setting⚓︎
Modify setting⚓︎
Pool⚓︎
List⚓︎
Create⚓︎
pool-service needs to contain the name of the service (query-head, query-peer, and so on For more information see Hydrolix API Reference). pool-name is the name of the pool, that means the field ‘name’ in settings will be replaced by pool-name.
These options aren't required since they have default values. Override the defaults with these options:
Options⚓︎
| Name | Type | Description |
|---|---|---|
-r, --replicas |
integer | Number of replicas for the workload (default: 1) |
-c, --cpu |
float | Dedicated CPU allocation for each replica (default: 0.5) |
-m, --memory |
float | Dedicated memory allocation for each replica, expressed in Gi (default: 0.5) |
-s, --storage |
float | Storage capacity for each replica, expressed in Gi (default: 0.5) |
An example modifying the default options would be:
Delete⚓︎
Show⚓︎
Settings⚓︎
Display all settings⚓︎
Display single setting⚓︎
Modify setting⚓︎
Dictionary⚓︎
List⚓︎
Create⚓︎
<dictionary-settings> must contain all required fields (for more information on the required specifications, see the Hydrolix API Reference). <dictionary-filename> is the name of the dictionary file previously uploaded to Hydrolix. The field ‘name’ in settings will be replaced by <dictionary-name>.
Delete⚓︎
Show⚓︎
Settings⚓︎
Display all settings⚓︎
Display single setting⚓︎
Modify setting⚓︎
Migrate⚓︎
Dictionary Files⚓︎
List⚓︎
Upload⚓︎
hdxcli supports two formats for <dictionary-file-to-upload>: JSON and CSV.
If the format is ‘json’ you don’t need to specify it.
Otherwise, if the format is ‘csv’ you must use -t verbatim or --body-from-file-type verbatim.
Delete⚓︎
Function⚓︎
List⚓︎
Create⚓︎
There are two ways to create a new function:
-
Passing the function on the command line using
-sor--inline-sqloption: -
Using a JSON file with the function settings via
-for--sql-from-fileoption. The field ‘name’ in settings will be replaced by<function-name>:
Delete⚓︎
Show⚓︎
Settings⚓︎
Display all settings⚓︎
Display single setting⚓︎
Modify setting⚓︎
Migrate⚓︎
Storage⚓︎
List⚓︎
Create⚓︎
There are two available methods to create a new storage: using a file containing the storage configuration or passing the configuration through the command line.
-
Using settings file (
-f,--settings-filename):
Passing the configuration through the command line:
Delete⚓︎
Show⚓︎
Settings⚓︎
Display all settings⚓︎
Display single setting⚓︎
Modify setting⚓︎
Credential⚓︎
List⚓︎
Displays a list of all credentials.
List-types⚓︎
Displays the available credential types.
Create⚓︎
Creates a new credential.
Depending on the credential-type, the required credentials will be requested interactively.
Alternatively, you can provide all the necessary details in a single command line by passing a JSON string to the --details option.
For example:
Delete⚓︎
Deletes a credential.
Show⚓︎
Displays details of a specific credential.
Settings⚓︎
Display all settings⚓︎
Shows all settings associated with a specific credential.
Display single setting⚓︎
Shows the value of a specific setting for a credential.
Query-option⚓︎
Query options operate at org, project or table level. For more information, refer to Query Options Precedence.
List⚓︎
Set⚓︎
An option (--from-file) is also available to configure a bunch of query options at once.
This query option file must be a JSON file with the following structure:
Unset⚓︎
To unset a query option, one only needs to use the following command:
Additionally, there is an option --all that unsets all query options.
Check-health⚓︎
This command checks the integrity of the transforms. Upon completion, it will print a brief report to the standard output.
Both project_name and table_name are optional. If none of them are provided, the validation will run on every transform the user has access to. Otherwise, if project_name is specified, the validation will be limited to the transforms within that project. The same applies to table_name.
Repair⚓︎
The --repair option attempts to automatically fix detected issues in transforms and autoviews. If a conflict is found, the tool will try to repair it when possible. Otherwise, it will notify the user about the issue.
Usage:
Notes:
- If no project or table is provided, the tool will analyze and attempt to repair all transforms accessible to the user.
- Repairs are limited to certain known conflicts, such as datatype or indexing mismatches between the transform and the autoview.
Integration⚓︎
List⚓︎
Allows you to list all transforms available in the repository.
Apply⚓︎
With this command you can create a new transform using the settings of a transform hosted in the repository.
Show⚓︎
Migrate⚓︎
Migrate data table within the same cluster:
Migrate data table to another cluster, using --target-profile:
Or passing cluster information:
To learn more about migrate command, see Data Migration Command for Hydrolix Tables.
Textual User Interface⚓︎
To activate the hdxcli user interface, do as follows: