Dynamic Elasticubes

By sisense

Changing the Elasticube Before Loading a Dashboard

This add-on gives you the ability to dynamically determine which data source should power a given dashboard. You determine how data sources are selected dynamically through a security settings file or via customizable URL parameters.

You can replace any data source (ElastiCubes, Live models and data sets), while sharing dashboard for a specific group of users. In addition, each data source for each widget can be changed.

To configure the add-on to work with multiple data sources, you need to configure a new data source for dashboards in the `dashboardDatasource` config section and then configure the section `WidgetsDatasources` for each widget (see the security section in the configuration below).

Note: If you want to change only the dashboard's data source, you can delete the `WidgetsDatasources` section.

To install the Dynamic Elasticubes add-on:

  1. Download the add-on.
    For Windows users:
    Extract the `.zip` archive to `C:\Program Files\Sisense\app\plugins`
    – If the folder does not exist, create it before extracting the `.zip` file.
    – Use the alternative plugins folder `C:\Program Files\Sisense\PrismWeb\Plugins` for Sisense versions lower than 7.2.
    – For Linux users:
    – Extract the `.zip` archive to `/opt/sisense/storage/plugins/
    – Use alternative plugins folder on tab `Admin > System Management > File Management` then upload extracted plugin to the `plugins` folder for Sisense versions higher than l8.0.3
  2. Configure the config.js file described below.
  3. Refresh your dashboard.

Implementation

  1. Configure the config.js file (see the Configuration section below).
    Note: After upgrading to Sisense Linux 8.0.5, the config.6.js configuration file is overwritten. Sisense recommends you copy the configuration file before upgrading and then restore the file after upgrading.
  2. The add-on redirects queries to one of the data sources, it is imperative to apply data security rules based on user groups. This can be configured in your Sisense Admin panel.
  3. 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) – allows you to configure URL params(see section ‘Using URL parameters’ below).
  • 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. Default is true.
  • throwErrors(BOOLEAN) – enable if each dashboard in your implementation has to be switched dynamically and errors need to be uncovered in QA. Defaults to false.
    – if set to `false`: hide errors in the browser console
    – if set to `true`: throws errors in the browser console and returns from plugin execution
  • maskDataOnError(BOOLEAN) – leaves data mask on if an error occurs while switching data sources. The default behavior is to show data, even after an error (i.e. the dashboard was 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.”
  • verifyECLocation(BOOLEAN) – enable if your data source migrates between servers.
    – if set to `false`: the add-on will assume the server locations of data source remain unchanged.
    – if set to `true`: an additional API call will be fired to confirm the server location of a datasource
  •  selectMostRecent(BOOLEAN) – if set to `false`: the add-on will work with original functionality, switching via a configuration file or URL parameter.- if set to `true`: the add-on will work with custom logic. For users from Active Directory within an AD Group, the latest created and shared data source for this AD Group will be used as the datasource for the dashboard.
  • mostRecentRolesBlackList(ARRAY OF STRINGS) – would not update data source for specified roles if `selectMostRecent`is enabled. Works only with `selectMostRecent` parameter.
  • security(OBJECT) – nested objects that describe security configuration for dashboard and widgets on a per dashboard basis. The default identifier for each dashboard is OID, but this can be reverted to dashboard titles if desired. For configuring new data sources for dashboard fill fields in the `dashboardDatasource` object. For configuring different data sources for widgets configure `widgetsDatasources` object, replace widgetId by your widget id which should be changed and fill fields `title` and `address`.For configuring multiple data sources:`’dashboardIdOrTitle’: {  – dashboard identifier (id or title)’groupId’: {  – identifier of the group which dashboard should be updated dashboardDatasource: { – section which configures a new data source for the dashboard

    title: ‘dataSourceTitle’, – data source title

    address: ‘dataSourceAddress’, – data source address (can be localhost, live, set or ip of the server where data sources can be imported from). Localhost by default.

    },

    widgetsDatasources: { -section which configure a new data source for the widgets

    ‘widgetId’: { – widget id which should be changed

    title: ‘dataSourceTitle’, – widget title

    address: ‘dataSourceAddress’, – data source address (can be localhost, live, set or IP of the server where data source can be imported from). Localhost by default.

    },

    }

    },

    },

    `

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 data sources. Sisense recommends using the security settings strategy.
  • If using a URL parameter strategy, the add-on will switch data sources for any dashboard it encounters, assuming the URL is correctly formatted.
  • If exporting the dashboard to PDF from the left-side panel (outside of the dashboard itself) and the dashboard hasn’t been opened before, it might take a second attempt to successfully export.
  • When enabling ‘maskDataOnError’, downloads are not disabled.
  • The add-on will not work in Sisense.js.
  • `selectMostRecent` – works only with users from Active Directory, for other users it will be ignored. First AD Group is used to authorize the check of ElastiCube updates.
  • If selected the data source is not shared with a user, an error with the text: “you don’t have access rights” will be displayed. After page refresh error message will be changed to: “something went wrong”.
  • The add-on will not replace the widget data sources if the dashboard’s data source was not changed.

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.

18 August 2020

Bug fixes:

  • Keep filter selection after moving between dashboards
  • Use the correct data source when exporting to PDF
  • Fixed content type for /api/dashboards/DASHBOARD_ID/widgets/WIDGET_ID API call
  • Update the data source correctly for all roles

10 June 2020:

  • Updated the add-on following security enhancements in Sisense

19 June 2019:

  • Added support for 7.4.2

26 June 2019:

  • Fixed null filter members bug

12 September 2019:

  • Fixed compatibility issue with metadata plugin

12 September 2019:

  • Fixed configuration issues

25 October 2019:

  • Fixed reset dashboard/widget filters after switching datasource; Linux support added

12 November 2019:

  • Fixed import dashboards with Pivot widget

13 April 2020:

  • Added support for Multiple Eelasticubes
  • Added support for Multiple Live models
  • Added support for Hybrid dashboards
  • Minor bug fixes