Using Sisense CLI Commands
  • 18 May 2022
  • 4 Minutes to read
  • Contributors
  • Dark
    Light
  • PDF

Using Sisense CLI Commands

  • Dark
    Light
  • PDF

In addition to the REST API, Sisense includes a CLI (Command Line Interface) for executing various Sisense-related commands.

To access the Sisense CLI:

  1. Connect to your Linux host using SSH (in multinode instances, this can be on the bastion host where Sisense was deployed).

  2. Check that the home directory of the install user contains a file "add_completion-ns-sisense.sh".
    add-completion-ns.png

  3. Run the command: source add_completion-ns-sisense.sh.

  4. 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.

    Login_CLI.png

  5. 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

  6. 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.

  7. Complete the login process.

    Login_success.png


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
index-size
default
query-instances
query-cpu-limit
query-cpu-request
query-memory-limit
query-memory-request
query-cores-usage-percentage
build-cpu-limit
build-cpu-request
build-memory-limit
build-memory-request
build-cores-usage-percentage
enable-recycler

rename

Rename a data group.

Example:

si datagroups create -name example -new-name example

Mandatory:

name
new-name

update

Update a data group.

Example:

si datagroups update -name example

Mandatory:

name

Optional:

connector-mode
index-size
default
query-instances
query-cpu-limit
query-cpu-request
query-memory-limit
query-memory-request
query-cores-usage-percentage
build-cpu-limit
build-cpu-request
build-memory-limit
build-memory-request
build-cores-usage-percentage
enable-recycler

assign

Assigns an ElastiCube to a data group.

Example:

si datagroups assign -name example -cube examplecube

Mandatory:

name
cube

attach

Attaches a node to a data group.

Example:

si datagroups attach -name example -node myhost -roles BUILD,QUERY

Mandatory:

name
node
roles

detach

Detaches a node to a data group.

Example:

si datagroups detach -name example -node myhost

Mandatory:

name
node

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
title

build

Builds an ElastiCube.

Example:

si elasticubes build -name example -type full -sync true [< ecm_model.json]

Mandatory:

type

Optional:

sync
name

import

Import an ElastiCube.

Example:

si elasticubes import from-local -path /opt/sisense/storage/resources/Sample.sdata

Optional:

path
start

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 to /opt/sisense/storage/backups/EC3.sdata

Parameters

  • (Mandatory) name <CubeName>
  • (Optional) file <FileName>

Optional:

name
path
file

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
name

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
hostname
roles

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 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.

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
new-value

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


Was this article helpful?