Using tenant data connector overrides
This walkthrough shows you how to use data connector overrides to allow multiple tenants to share the same dashboard but have it display data that is specific to each tenant.
2. A typical multi-tenancy scenario
Dundas BI provides built-in support for SaaS (software-as-a-service) and multi-tenant deployment scenarios. This capability lets you provide viewing access to the same Dundas BI project and its dashboards across multiple tenants (where each tenant is one of your clients) using a single instance of Dundas BI. In this scenario, each tenant accesses the same dashboards but the data that is displayed is specific to the tenant. This is accomplished by having each tenant maintain its own database which contains the underlying data for the dashboards. All of the tenant databases have the exact same schema but different data values. At viewing-time, the correct database is referenced according to which tenant the viewer belongs to. This is possible because of data connector overrides which are configured per-tenant by the Dundas BI system administrator beforehand.
3. Set up tenant data sources
Create a SQL Server database with a single table for the first tenant as follows:
- Database name: DatabaseA
- Table name: Products
- Column: ProductID, int
- Column: ProductName, nvarchar(50)
- Column: ListPrice, decimal(18,2)
Create a SQL Server DatabaseB for the second tenant with the exact same schema (but different data) as above.
4. Create a new project and dashboard
Log on to Dundas BI as an administrator and create a new project (Project1) which will be accessible to all tenants. Make sure Project1 is the active project.
Create a new data connector (DataConnector1) using the SQL Server data provider for DatabaseA.
Then create a new dashboard (Dashboard1) by dragging the ListPrice and ProductName columns from DataConnector1 to the dashboard canvas.
A table visualization is displayed, showing values from DatabaseA.
Right click on Dashboard1 in the Explore window and check it in.
Go to the main menu and click Admin. Expand the SaaS / Multi-Tenancy section and click Tenants. (If you don't see this option, it means you aren't licensed for this feature.)
In the Tenants dialog on the right, click Add tenant.
In the Add Tenant dialog, enter the tenant name as TenantA. Then add 5 reserved license seats for a Standard User.
Click Submit to add the tenant.
Repeat the above steps in order to add TenantB. The Tenants screen is updated with the list of tenants.
Next, go to the Admin screen, expand Account Service and click Accounts. Add a new account (UserA) and set its Tenant field to TenantA.
Similarly, add a new account (UserB) and set its Tenant field to TenantB. The list of accounts looks like this now:
As an aside, go to the Groups list. You'll see two groups corresponding to each tenant. You can edit the membership of a Tenant Administrators group in order to assign a user account as a tenant administrator. Tenant administrators have the ability to add new accounts to the tenant and assign available license seats to those accounts.
6. Add data connector overrides
Go back to the Tenants list and edit TenantB. Click Add data connector override.
In the Open File dialog, select DataConnector1 and then click Submit.
In the DataConnector1 dialog, scroll down and update the settings required to connect to the SQL Server DatabaseB.
Click Submit. The data connector override is added to TenantB details.
7. View the dashboard as a tenant user
Log out of Dundas BI and log back on as UserA.
View Dashboard1 and observe that it displays the correct data from DatabaseA.
Log out again and log back on as UserB.
View Dashboard1 and observe that it displays the correct data from DatabaseB.
8. See also
- Administration Overview
- Add an account
- Add a new group
- Manage projects and the file system
- Connect to data and view it on a dashboard
- Using custom attributes to filter data by user
- Using security hierarchy to filter data by user