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.
- Make 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
. - Make sure that the correct server is used for the connection. The server connected to for the REST API is done via DNS entries. This means that the login would be done using the cluster address rather than going through the local configured interface's address. This could cause the login to be done with an incorrect server.
-
You can now run Sisense commands in the format
si <group name> <command> <parameters>
.Example
If 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
.Note
Be 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:
|
|
create |
Create a new data group. Example:
|
Mandatory: name Optional: connector-mode |
rename |
Rename a data group. Example:
|
Mandatory: name |
update |
Update a data group. Example:
|
Mandatory:
name Optional: connector-mode |
assign |
Assigns an ElastiCube to a data group. Example:
|
Mandatory:
name |
attach |
Attaches a node to a data group. Example:
|
Mandatory:
name |
detach |
Detaches a node to a data group. Example:
|
Mandatory:
name |
delete |
Deletes a data group. Example:
|
Mandatory:
name |
Elasticube
Commands | Description | Parameters |
---|---|---|
list |
Displays a list of all ElastiCubes. Example:
|
|
start |
Starts an ElastiCube. Example:
|
Mandatory: name |
stop |
Stops an ElastiCube. Example:
|
Mandatory: name |
delete |
Deletes an ElastiCube. Example: si elasticubes delete -name example |
Mandatory:
name |
detach |
Detaches an ElastiCube. Example:
|
Mandatory:
name Optional: delete |
attach |
Attaches an ElastiCube. Example:
|
Optional:
path |
build |
Builds an ElastiCube. Example:
|
Mandatory:
type Optional: sync |
import |
Import an ElastiCube. Example:
|
Optional: path |
reset |
Deletes all ElastiCubes from a database and storage Example:
|
|
export |
Exports an ElastiCube. Example:
This command exports the to /opt/sisense/storage/backups/EC3.sdata Parameters
|
Optional: name |
console |
Starts mclient console for a specific Elasticube. Example:
|
Optional: language |
Deployment
Commands | Description | Parameters |
---|---|---|
list |
Displays a list of all nodes. Example:
|
Optional:
id |
add |
Adds a node to the system. Example:
|
Mandatory: id |
remove |
Removes a node from the system. Example:
|
Mandatory: id |
instances |
Lists all instances in the deployment. Example:
|
|
version |
List all the deployment nodes' versions. Example:
|
Datasources
Commands | Description | Parameters |
---|---|---|
list |
Displays a list of all data sources. Example:
|
Optional:
id |
query |
Query JAQL on data source. Example:
|
Mandatory: name Optional: format |
sql |
Executes an SQL query on data source. Example:
|
Mandatory: name |
System
Commands | Description | Parameters |
---|---|---|
list |
Displays versions of your services. Example:
|
|
Backup |
Backs up Sisense metadata stored in the Sisense application database, system configuration information, and if you include your farms, Sisense data is backed up. The command below generates an archive of all these files in the following location: /opt/sisense/storage/system_backups/sisense_assets_collector_[date] Note: Files you configured on shared storage, such as automated emails, plugins, language files, branding files and custom connectors are not backed up.
To a log of the back up, enter the following command:
|
|
Restore |
Restores Sisense from an archive file created with the Back UP command described above.
|
Configuration
Commands | Description | Parameters |
---|---|---|
get |
Gets the configuration value. Example:
|
Mandatory:
key Optional: type |
set |
Sets a configuration value. Example:
|
Mandatory: key |
reset |
Resets a configuration to the default value if possible. Example:
|
Optional: key |
.r.