Dynamic Elasticubes

By:
Sisense

Changing the ElastiCube Before Loading a Dashboard

This plugins administrators the ability to dynamically determine which Elasticube or Elasticube Set should power a given dashboard. The changes can be made either though a security settings file or via customizable URL parameters. Note: All ElastiCubes used must have the same schema.

To install the Dynamic Elasticubes add-on:

  1. Download the attachment.
  2. Extract the .zip folder into the plugins folder. If the folder does not exist, create it prior to extracting the .zip file.
    For V7.1 and earlier
    : C:\Program Files\Sisense\PrismWeb\plugins
    For V7.2 and later
    : C:\Program Files\Sisense\app\plugins
  3. Configure the include *config.js* file (read more below)
  4. Refresh your dashboard

Note:  The URL parameters configuration option should only be used for embedded use cases (such as embedding an iframe). Use of the URL parameters configuration option within the native Sisense web application will cause unexpected behavior following certain UI interactions. 

Implementation

  1. Configure *config.js* (see *Configuration* sub-header below).
  2. Configure Elasticube-level security settings via your Sisense Admin panel. Since this plugin simply redirects queries to one elasticube or another, it is imperative to also apply Elasticube-level security based on these user groups.
  3. If desired, allow consumers to modify the dashboard datasources. Only Admin and Designers are generally allowed to do this by default (omitting this step will prevent viewers from properly printing and/or exporting dashboards):
    – Navigate to the PUT request */api/roles/{idOrName}* endpoint in the version 0.9 Rest API
    – Supply the following payload and verify that you receive the 200 status in your response body:
       {        “manifest”: {          “dashboards”: {            “replace_datasource”: true          }

           }

         }

  4. Ensure that Active Directory imported groups are allowed to query the ElastiCube via ‘Admin’ > ‘Data Sources’ > ‘Share’ > Modify group to ‘Can Query’ or ‘Can Edit’

Configuration

  • urlParamName: STRING – if you would like to use URL params, modify here.
  • configureByDashOID: BOOLEAN – default behavior for the security object below is to use dashboard OIDs as the nested object keys, disabling this option will revert to dashboard titles. Defaults to true.
  • throwErrors: BOOLEAN – throws errors in the browser console and returns from plugin execution. Recommended to turn on if each dashboard in your implementation needs to be switched dynamically and errors need to be uncovered in QA. Defaults to false.
  • maskDataOnError: BOOLEAN – Leaves data mask on if error occurs during ElastiCube switch. Default behavior is to show data, even on error (i.e. dash not configured, bad API call, no user groups defined, etc.). This does not affect downloads and users will still be able to download. Defaults to false.
  • security: OBJECT – nested objects that describe security configuration (key: groupIDs, value: elastiCube or elastiCube set titles) on a per dashboard basis. The default identifier for each dashboard is OID, but this can be reverted to dashboard titles if desired.

Using URL parameters

  1. Modify the *mod.urlParamName* variable inside the *config.js* file to your preferred query string variable name.
  2. Navigate to your target dashboard and append the following to your dashboard URL with your own information:
           ?{yourURLParamName}={desiredECubeTitle}

Limitations

  • When using the URL parameter strategy, if the user navigates to another dashboard with the URL parameter still attached, a query error will arise if the schemas aren’t identical. If users need to be able to switch between dashboards and dynamically switch to different datasources, we recommend using the security settings strategy
  • If using URL parameter strategy, plugin will switch datasource for any dashboard it encounters, assuming the URL is correctly formatted
  • Plugin will not work in Sisense.js

Change Log

28 June 2018

 – Added support for Elasticube sets

 – Solved bugs related to various exports, report sharing

 – Added support for 7.1.1 and some backwards compatability

 

18 July 2018

 – Fixed filter behavior bug

This is a free add-on, click here to get it now.
  • Category:
    • User Provisioning
  • Last Updated
    6 months ago
  • Earliest Supported Version
    6.7
  • Latest Supported Version
    7.2
  • Tags
    • data source
    • multi-tenant