Version 0.9

Skip to end of metadata
Go to start of metadata

Sisense supports executing ElastiCube related commands using the Windows command line. The Sisense Shell allows you to automate Sisense tasks that you can then implement as part of your application.

The Sisense Shell is installed by default when you install Sisense. To access the Sisense Shell, you should open the Command Prompt as an administrator:

Next, navigate to Sisense the Shell directory by entering the following:

cd "C:\Program Files\Sisense\Prism\"

 

The table below lists the Sisense Shell commands, descriptions, related parameters, examples, and notes if similar functionality is included in Sisense’s REST APIs.

Available Commands

The commands listed below are available in the latest version of Sisense. If commands that are listed here are not available in your version of the PSM, you may need to upgrade to the latest version. 


Note

The attributes and their examples below are case sensitive.


CommandDescriptionParameters
ecube attach

Attaches an ElastiCube folder to the local server.

Example:

psm ecube attach path=s:\ElastiCubedata\acheck1 serverAddress=192.168.1.xxx

path: Defines the full path of the folder you want to attach to a server.

serverAddress: Defines the address of a remote server. If the address is not a remote server or no value is entered, the default value localhost is used.

sync: Determines whether to execute this synchronously or asynchronously. Optional. By default, the value is False, asynchronously.

ecube build

Builds an ElastiCube from an ecube file or server-hosted ElastiCube.

Example:

Full Build, Local Server

psm ecube build filename="c:\mycube.ecube" serverAddress=localhost

Accumulative Build, Remote Server 

psm ecube build filename="c:\mycube.ecube" serverAddress=192.168.1.134 mode=restart

Note: You can access similar functionality in the REST API. See /elasticubes/{server}/{elasticube}/startBuild for more information.

filename: Defines the name of the ecube file. The ecube file contains the ElastiCube schema and data connection settings required for building the ElastiCube on the target server.
name: Defines the name of an existing ElastiCube in an ElastiCube server. Use the name parameter when you want to rebuild the ElastiCube.
serverAddress: Defines the target server address on which the ElastiCube should be built.
mode: Defines the how the ElastiCube should be built. Possible values include: 

  1. mode=restart: Rebuilds the ElastiCube entirely.
  2. mode=full: Rebuilds the ElastiCube and accumulates data for tables marked as accumulative. This mode should only be used for accumulative builds.
  3. mode=changes: Rebuilds from scratch tables that have changed in the ElastiCube schema.
  4. mode=metadataonly: Updates the ElastiCube server with the ElastiCube schema, without building.

OrchestratorTask Id: Optional. The default value is none. This parameter is relevant for high availability configurations. For more information, see High Availability.

ecube convert

Converts ElastiCube XMLs files or encrypted ElastiCube XMLs files into ElastiCube files or ElastiCube files into ElastiCube XMLs (unencrypted).

The converted file is created in the same folder as the source file.

Example:

Ecube to XML

psm ecube convert name="c:\mycube.ecube"

XML to Ecube

psm ecube convert name="c:\mycube.xml"

name: Address and filename of the source file.

ecube create

Creates an empty ElastiCube.

Example:

psm ecube create serverAddress=localhost name=TestCube 

serverAddress: Defines the target server address on which the ElastiCube should be built.

 name: Defines the name of the new ElastiCube.

ecube delete

Delete an ElastiCube from the target server.

Example:

psm ecube delete name="mycube" serverAddress=localhost

name: Defines the name of the ElastiCube to be removed from the target server.

serverAddress: Defines the target server address from which the ElastiCube should be removed.

ecube detach

Detaches an ElastiCube from the local server. When you detach an ElastiCube, the ElastiCube can no longer be accessed, but is saved in your ElastiCube folder in case you want to attach and reuse the ElastiCube again.

Example:

psm ecube detach name="mycube" serverAddress=localhost

name: Defines the name of the ElastiCube you want to detach.

 serverAddress: Defines the address of a remote server. If the address is not a remote server or no value is entered, the default value localhost is used.

 sync: Determines whether to execute this synchronously or asynchronously. Optional. By default, the value is False, asynchronously. 

ecube edit fields addCustomField

Adds a custom field to a specified table in an ElastiCube.

Example:

psm ecube edit fields addCustomField serverAddress=localhost cubeName="Sample ECommerce" 
tableName=MyTable fieldName=MyField sqlExpression="SELECT 1"


serverAddress: The target server address where the ElastiCube is hosted. The default value is LocalHost.

cubeName: The name of the ElastiCube.

tableName: The name of the table where a new custom field will be added.

fieldName: The name of the table.

sqlExpression: The SQL expression of the new custom field.

ecube edit fields getListOfFields

Retrieves a list of all fields from a table.

Example:

psm ecube edit fields getListOfFields serverAddress=localhost cubeName="Sample ECommerce" tableName=MyTable isCustom=false

serverAddress: The target server address where the ElastiCube is hosted. The default value is LocalHost.

cubeName: The name of the ElastiCube.

tableName: The name of the table.

isCustom: Indicates if the table is custom when set to true.

ecube edit fields getSqlOfCustomField

Retrieves the SQL string of a custom field in a table in the specified ElastiCube.

Example:

psm ecube edit fields getSqlOfField serverAddress=localhost cubeName="Sample ECommerce" tableName=MyTable fieldName=MyField 

serverAddress: The target server address where the ElastiCube is hosted. The default value is LocalHost.

 cubeName: The name of the ElastiCube.

 tableName:The name of the table.

 fieldName: The name of the custom field.

ecube edit fields removeField

Removes a field from a specific table from an ElastiCube.

Example:

psm ecube edit fields removeField serverAddress=localhost cubeName="Sample ECommerce" tableName=MyTable fieldName=MyField 

serverAddress: The target server address where the ElastiCube is hosted. The default value is LocalHost.

cubeName: The name of the ElastiCube.

tableName:The name of the table.

fieldName: The name of the custom field.

ecube edit fields updateSqlStatementOfField

Modifies the SQL statement of a field.

Example:

psm ecube edit fields updateSqlStatementOfField serverAddress=localhost cubeName="Sample ECommerce" 
tableName=MyTable fieldName=MyField  sqlExpression="SELECT 2" 


serverAddress: The target server address where the ElastiCube is hosted. The default value is LocalHost.

cubeName: The name of the ElastiCube.

tableName: The name of the table.

fieldName: The name of the custom field.

sqlExpression: The new SQL expression.

ecube edit rename

Renames local ElastiCube files.

Example:

psm ecube edit rename ecube="c:\test.ecube" name="mycube”

ecube: Address and filename of the .ecube file.

name: The new name of the ElastiCube file.

backup: (Optional) Boolean value that creates a .bak file of the ecube when renaming it. The backup file created has the format name.ecube.bak. By default, this value is false.

ecube edit connection refresh

Refreshes all tables within an ElastiCube. 

Example:

psm ecube edit connection refresh ecube="C:\test.ecube"

ecube: Address and filename of the .ecube file.

ecube edit tables addCustomTable

Adds a new custom table to the specified ElastiCube.

Example:

psm ecube edit tables addCustomTable serverAddress=localhost cubeName="Sample ECommerce" 
tableName=MyTable sqlExpression="SELECT * FROM [category]"

serverAddress: The target server address where the ElastiCube is hosted. The default value is LocalHost.

 cubeName: The name of the ElastiCube.

 tableName:The name of the table.

 sqlExpression: The new SQL expression.

ecube edit tables addTable

Adds a new Base table to the specified ElastiCube.

Example:

psm ecube edit tables addTable serverAddress=localhost cubeName="Sample ECommerce" provider=MySql 
connectionString="data source=10.50.1.40;UID=admin;password=Ad!234qw;database=testdb" 
schemaName=testdb tableName=currency customTableName="MyTable" sqlExpression=""

serverAddress: The target server address where the ElastiCube is hosted. The default value is LocalHost.

 cubeName: The name of the ElastiCube.

 provider: The name of the provider. Currently supported providers and their usage:

MsSql - "sql",
MySql - "MySql"
Amazon Redshift - "RedShift"
PostGreSQL - "PostgreSQL"
Oracle - "Oracle"

 

 connectionString: The name of the ElastiCube where the table is to be added.

 schemaName: The schema name of new table to be added.

 tableName: The name of new table to be added.

 customTableName: An optional custom name for the new table to be added.

 sqlExpression: An SQL expression for the new Base table.

ecube edit tables deleteTable

Deletes a table from the specified ElastiCube.

Example:

psm ecube edit tables deleteTable serverAddress=localhost cubeName="Sample ECommerce" tableName=MyTable


serverAddress: The target server address where the ElastiCube is hosted. The default value is LocalHost.

cubeName: The name of the ElastiCube.

tableName: The name of the ElastiCube table.

ecube edit tables getConnectionStringOfTable

Retrieves the connection string of a table from an ElastiCube.

Example:

psm ecube edit tables getConnectionStringOfTable serverAddress=localhost cubeName="Sample ECommerce" tableName=MyTable

serverAddress: The target server address where the ElastiCube is hosted. The default value is LocalHost.

cubeName: The name of the ElastiCube.

tableName: The name of the ElastiCube table.

ecube edit fields getListOfFields

Retrieves a list of all custom tables from an ElastiCube.

Example:

psm ecube edit fields getListOfFields serverAddress=localhost cubeName="Sample ECommerce" 
tableName=MyTable isCustom=true

serverAddress: The target server address where the ElastiCube is hosted. The default value is LocalHost.

cubeName: The name of the ElastiCube.

tableName: The name of the ElastiCube table.

isCustom: Set to true to return only custom fields.

ecube edit tables getListOfTables

Retrieves a list of all tables from an ElastiCube.

Example:

psm ecube edit tables getListOfTables serverAddress=localhost cubeName="Sample ECommerce" isCustom=false

serverAddress: The target server address where the ElastiCube is hosted. The default value is LocalHost.

cubeName: The name of the ElastiCube.

isCustom: Set to true to return only custom tables.

ecube edit tables getProviderOfTable

Retrieves the provider string of a specific table from an ElastiCube.

Example:

psm ecube edit tables getProviderOfTable serverAddress=localhost cubeName="Sample ECommerce" tableName=MyTable

serverAddress: The target server address where the ElastiCube is hosted. The default value is LocalHost.

cubeName: The name of the ElastiCube.

tableName: The name of the ElastiCube table.

ecube edit tables getSqlOfTable

Retrieves the SQL string of a specific table from an ElastiCube.

Example:

psm ecube edit tables getSqlOfTable serverAddress=localhost cubeName="Sample ECommerce" tableName=MyTable


serverAddress: The target server address where the ElastiCube is hosted. The default value is LocalHost.

cubeName: The name of the ElastiCube.

tableName: The name of the ElastiCube table.

ecube edit tables updateSqlStatementOfTable

Modifies the SQL statement of a table.

Example:

psm ecube edit tables updateSqlStatementOfTable serverAddress=localhost cubeName="Sample ECommerce" 
tableName=MyTable sqlExpression="SELECT * FROM accounts360.account" isCustom=false

serverAddress: The target server address where the ElastiCube is hosted. The default value is LocalHost.

cubeName: The name of the ElastiCube.

tableName: The name of the ElastiCube table.

sqlExpression: The new SQL expression.

isCustom: Set to true if the table is a custom table.

ecube edit relations createRelation

Creates a new relationship between two fields in an ElastiCube.

Example:

psm ecube edit relations createRelation serverAddress=localhost cubeName="Sample ECommerce" sourceTable=category 
sourceField="Category ID" targetTable=brand targetField="Brand ID"


serverAddress: The target server address where the ElastiCube is hosted. The default value is LocalHost.

cubeName: The name of the ElastiCube.

 sourceTable: The name of the relationship source table.

sourceField: The name of the relationship source field.

targetTable: The name of the relationship target table.

targetField: The name of the relationship target field.

ecube edit relations deleteRelation

Deletes a relation between two fields.

Example:

psm ecube edit relations deleteRelation serverAddress=localhost cubeName="Sample ECommerce" 
sourceTable=category sourceField="Category ID" targetTable=brand targetField="Brand ID"


serverAddress: The target server address where the ElastiCube is hosted. The default value is LocalHost.

cubeName: The name of the ElastiCube.

sourceTable: The name of the relationship source table.

sourceField: The name of the relationship source field.

targetTable: The name of the relationship target table.

targetField: The name of the relationship target field.

ecube edit relations getRelationsOfTable

Retrieves a list of all relations of a specified table in an ElastiCube.

Example:

psm ecube edit relations getRelationsOfTable serverAddress=localhost cubeName="Sample ECommerce" tableName=MyTable


serverAddress: The target server address where the ElastiCube is hosted. The default value is LocalHost.

cubeName: The name of the ElastiCube.

tableName: The name of the ElastiCube table.

ecube editModifies the the database connection attributes.

The following data sources are supported:
  • MS SQL Server
  • Oracle
  • MySQL
  • PostgreSQL
  • DB2
  • Teradata
  • Salesforce
  • Zendesk
  • Splunk


Example:

psm ecube edit connection database ecube="c:\users\myuser\documents\mycube.ecube" server="10.0.0.1" 
database="tracking" newserver="localhost" newdatabase="trackingX" newusername="mynewuser" newpassword="newpassword"

ecube: Defines the ecube file name to edit.

server: Defines the source server to modify (leave empty to modify all databases in server).

database: Defines the source database to modify.

newserver: Defines the new server address (leave empty to keep previous value).

newdatabase: The new database (leave empty to keep previous value).

newusername: Defines the new username (leave empty to keep previous value).

newpassword: Defines the new password (leave empty to keep previous value).

backup: Indicates if the ElastiCube file should be backed up (defaults is true).

ecube info

Returns information about the ElastiCube such as its build history and current status.

Example:

psm ecube info name="mycube" serverAddress=localhost

name: Defines the name of the ElastiCube.

serverAddress: Defines the target server address of the ElastiCube.

ecube restart

Restarts an ElastiCube on the target server.

Example:

psm ecube restart name="mycube" serverAddress=localhost

Note: You can access similar functionality in the REST API. See /elasticubes/{server}/{elasticube}/restart for more information.

name: Defines the name of the ElastiCube to be restarted.

serverAddress: Defines the target server address on which the ElastiCube should be restarted.

ecube scaleanalysis

Performs a scale analysis of ElastiCubes or tables within an ElastiCube without building a new ElastiCube.

The scale analysis returns two CSV files, Columns and Tables, which provides data regarding the type, size and standard deviation of the data within the files.

Scale analysis is supported for MySQL, PostGreSQL, and Oracle-based tables.

Example:

psm ecube scaleanalysis name="C:\My ElastiCubes\mycube.ecube" 

name: Address and filename of the .ecube file.

 table: The name of the table to be analyzed. When this parameter is blank all the tables are analyzed.

ecube start

Starts an ElastiCube on the target server.

Example:

psm ecube start name="myCube" serverAddress="localhost"

name: Defines the name of the ElastiCube to be started.

serverAddress: Defines the target server address on which the ElastiCube should be started.

ecube stop

Stops an ElastiCube on the target serving. Stopping an ElastiCube reduces the amount of system resources Sisense uses. When you stop an ElastiCube, the ElastiCube can longer be queried.

Example:

psm ecube stop name="myCube" serverAddress="localhost"

name: Defines the name of the ElastiCube to be started.

serverAddress: Defines the target server address on which the ElastiCube should be stopped.

doc changedatasource

Changes the data source behind a psm to another data source.

Note: This is a legacy command used with Sisense version 4. Note: You can access similar functionality in the REST API. See /dashboards/{server}/{title}/replaceDatasource for more information.

file: Prism document file name to open and convert.

prev: Previous data source that is being updated.

new: New data source.

ecs start

Starts the ElastiCube server.

Example:

psm ecs start

Note: You can access similar functionality in the REST API. See /elasticubes/{server}/{elasticube}/start for more information.

 
ecs stop

Stops the ElastiCube server.

Example:

psm ecs stop

Note: You can access similar functionality in the REST API. See /elasticubes/{server}/{elasticube}/stop for more information.

 
sysinfo

Returns system information (server hardware) and ElastiCube details (number of cubes, size, etc.).

Example:

psm sysinfo

Note: You can access similar functionality in the REST API. See /settings/system for more information.

 
ecdata 62downgrade

Downgrades ElastiCube data files created and encrypted in Sisense version 6.2 to ElastiCube files compatible with versions prior to 6.2 without encryption. This is useful if you have created ElastiCubes in 6.2 and wish to downgrade while still using all of your ElastiCubes.

Example:

psm ecdata 62downgrade filename="C:\Program Files\test62.ecdata"
filename: The filename and location of the ecdata file.

 

 

  • No labels