-
Print
-
DarkLight
-
PDF
Using Sisense CLI Commands
In addition to the REST API, Sisense includes a CLI (Command Line Interface) for executing various Sisense-related commands.
To access the Sisense CLI:
-
Connect to your Linux host using SSH (in multinode instances, this can be on the bastion host where Sisense was deployed).
-
Check that the home directory of the install user contains a file "add_completion-ns-sisense.sh".
-
Run the command:
source add_completion-ns-sisense.sh
. -
Follow the prompts to log in.
Note:- The user must be a valid Sisense Admin and have local user credentials.
- Be sure that the Sisense address is accessible via the machine you are running these commands from. You can verify this by running the command:
wget {your sisense URL}
. For example,wget https://bi.sisense.com
.
-
You can now run Sisense commands in the format
si <group name> <command> <parameters>
.ExampleIf your command is part of the DataGroups group, your command would be:
si datagroups list
-
If the si command prompts you to log in, run the following command:
login_sisense {sisense url}
. For example:login_sisense https://bi.sisense.com
.NoteBe sure there is no trailing slash (/) at the end of the URL.
-
Complete the login process.
The tables below list the Sisense commands.
DataGroups
Commands | Description | Parameters |
---|---|---|
list |
Displays a list of all data groups. Example: si datagroups list |
|
create |
Create a new data group. Example: si datagroups create -name example |
Mandatory: name Optional: connector-mode |
rename |
Rename a data group. Example: si datagroups create -name example -new-name example |
Mandatory: name |
update |
Update a data group. Example: si datagroups update -name example |
Mandatory:
name Optional: connector-mode |
assign |
Assigns an ElastiCube to a data group. Example: si datagroups assign -name example -cube examplecube |
Mandatory:
name |
attach |
Attaches a node to a data group. Example: si datagroups attach -name example -node myhost -roles BUILD,QUERY |
Mandatory:
name |
detach |
Detaches a node to a data group. Example: si datagroups detach -name example -node myhost |
Mandatory:
name |
delete |
Deletes a data group. Example: si elasticubes delete -name 'example' |
Mandatory:
name |
Elasticube
Commands | Description | Parameters |
---|---|---|
list |
Displays a list of all ElastiCubes. Example: si elasticubes list |
|
start |
Starts an ElastiCube. Example: si elasticubes start -name example |
Mandatory: name |
stop |
Stops an ElastiCube. Example: si elasticubes stop -name example |
Mandatory: name |
delete |
Deletes an ElastiCube. Example: si elasticubes delete -name example |
Mandatory:
name |
detach |
Detaches an ElastiCube. Example: si elasticubes detach [-name example] [-delete false] |
Mandatory:
name Optional: delete |
attach |
Attaches an ElastiCube. Example: si elasticubes attach -path /path/to/cube/files |
Optional:
path |
build |
Builds an ElastiCube. Example: si elasticubes build -name example -type full -sync true [< ecm_model.json] |
Mandatory:
type Optional: sync |
import |
Import an ElastiCube. Example: si elasticubes import from-local -path /opt/sisense/storage/resources/Sample.sdata |
Optional: path |
reset |
Deletes all ElastiCubes from a database and storage Example: si elasticubes reset |
|
export |
Exports an ElastiCube. Example: si elasticubes export -name EC2 This command exports the Parameters
|
Optional: name |
console |
Starts mclient console for a specific Elasticube. Example: si elasticubes console -name xxx -language sql or elasticube console -name xxx -language mal |
Optional: language |
Deployment
Commands | Description | Parameters |
---|---|---|
list |
Displays a list of all nodes. Example: si deployment list |
Optional:
id |
add |
Adds a node to the system. Example: si deployment add -id myhost -hostname myhost -roles BUILD,QUERY |
Mandatory: id |
remove |
Removes a node from the system. Example: si deployment remove -id myhost |
Mandatory: id |
instances |
Lists all instances in the deployment. Example: si deployment instances |
|
version |
List all the deployment nodes' versions. Example: si deployment version |
Datasources
Commands | Description | Parameters |
---|---|---|
list |
Displays a list of all data sources. Example: si datasources list |
Optional:
id |
query |
Query JAQL on data source. Example: cat myJaql.txt | si datasources query -name myEcube |
Mandatory: name Optional: format |
sql |
Executes an SQL query on data source. Example: echo 'select * from MyTable' | si datasources sql -name myEcube |
Mandatory: name |
System
Commands | Description | Parameters |
---|---|---|
list |
Displays versions of your services. Example: si system |
|
Backup |
Backs up Sisense metadata stored in the Sisense application database, system configuration information, and if you include your farms, Sisense Note: Files you configured on shared storage, such as automated emails, plugins, language files, branding files and custom connectors are not backed up. si system backup [-include-farm] To a log of the back up, enter the following command: kubectl -n sisense logs sisense-backup-[tab] |
|
Restore |
Restores Sisense from an archive file created with the Back UP command described above. si system restore -name [-include-farm] /opt/sisense/storage/system_backups/sisense_assets_collector_[date] |
Configuration
Commands | Description | Parameters |
---|---|---|
get |
Gets the configuration value. Example: si configuration get -key category.entry -type key |
Mandatory:
key Optional: type |
set |
Sets a configuration value. Example: si configuration set -key category.entry -new-value 1412 |
Mandatory: key |
reset |
Resets a configuration to the default value if possible. Example: si configuration reset -key category.entry, or to reset all configuration of a sepecific category: configuration reset -key category, to change all configurations: configuration reset -key ALL |
Optional: key |