Exporting and Importing Data Models
You can export and import your ElastiCube data and live data models into Sisense. Models can be exported as .smodel files. The .smodel file contains the design of your model’s schema and its connection settings to its sources.
Note:
All .smodel files created in earlier versions of Sisense are compatible with later versions. However, you can't import .smodel files from later versions of Sisense into earlier versions.
Exporting a Data Model
To export a model:
-
Open the Data page.
-
For the relevant ElastiCube or Live model, select >Export Model.
You're prompted to download the schema in an .smodel file.
Importing a Data Model
To import a model:
-
Open the Data page.
-
Click Import Model.
-
Drag your .smodel file to the Import dialog box.
OR
Click Browse. Navigate to the relevant .smodel file and select it.
-
If a model with the same name already exists, either rename the model or overwrite the existing model with the one you're importing.
The schema is displayed and the model is added to the Data page. Build the model (in the case of ElastiCube s) and publish the model (in the case of a live model) so you can work with it in your dashboard.
Export and Import a Data Model with the API
You can export and import a data model using the Sisense API, but the connection parameters - including the password - are encrypted. For exporting, decrypt the connection parameters and password. For importing to Sisense , you'll need to encrypt the connection parameters and password.
"connection": {
"id": "<ID>",
"provider": "<DATA SOURCE, SUCH AS POSTGRESQL>",
"parameters": "qkSH7KtgPqA3l16Bc4PMfY8aBq6T8NwbcbsRJALbCbrxl7AZHrHYCVegTY5Xw8f7RUzVk2PvOXe0kbDTI=DvjQ1nJaJc8sQRGcVMWjXwPPsHXJ=0uDpZH3hoWgR76MvW4QRCkMtWUrQ1ZSfrFRKfbgTM1vW=N9Ahf3uAe2lCylhRwFIyDemMeDVa7ThBcWWzmbR=GMrUHarwwvummwfY4xlvyEbWPvptrAOByHsOabhIoegKTxkRyBlrfo0AtqvCFfy1lAmgRUFvdaO3KkO9pXSD”,
"schema": "public",
"fileName": null,
"timeout": 300,
"autoRefresh": null,
"refreshRate": null,
"resultLimit": null,
"protectedParameters": [
"Password"
],
"uiParams": {},
"globalTableConfigOptions": {}
}
In all versions of Sisense for Windows version 8.1.1 and later you can use # GET api/v1/encryption/decrypt to decrypt the hashed parameters string:
-
From the Admin tab, in the menu under System Configuration, click REST API.
-
Make sure Version 1.0 is open and click encryption.
-
To decrypt the AES key value, click GET /encrypt/decrypt.
-
Click Try it out.
-
In the value field, enter the encrypted parameters string.
-
Click Execute.
The response body shows all of the decrypted parameters, except for the password, which is still encrypted.
To decrypt the password, copy the encrypted password hash and decrypt it in the same way.
Once you have this information, you can replace the password in the .smodel file and import it into Sisense.
Note:
You can send the connection parameters in the “parameters” value pair, and not as “protectedParameters” (which still needs to be sent as an empty array).
For example:
"connection": {
"id": "<ID>",
"Parameters":{
"Server":"<SERVER ADDRESS>",
"Database":"<DATABASE NAME>",
"UserName":"<USER NAME>",
"Password":"<PASSWORD>"
},
"provider": "<DATA SOURCE, SUCH AS POSTGRESQL>",
"schema": "public",
"fileName": null,
"timeout": 300,
"autoRefresh": null,
"refreshRate": null,
"resultLimit": null,
"protectedParameters":[],
"uiParams": {},
"globalTableConfigOptions": {}
.r.