GoodData.CN: Workspace Provisioning


Userlevel 1

Introduction

One of GoodData.CN’s core functionalities is the ability to create dedicated client workspaces based on pre-existing template workspace(s) - a concept we call Workspace Provisioning. In your template(s), you can create a standard LDM with a set of measures, insights, and dashboards to roll out to some subset of your clients’ workspaces. Your clients can then customize their individual workspaces without affecting both the master template, nor any other workspaces.

 

In GoodData.CN, workspace provisioning is best achieved using two features: workspace hierarchies and data filtering. Workspace hierarchies define a “parent” template workspace with some number of “child” workspaces that will inherit features and matching data from the parent. These hierarchies can be multi-level, which offers a lot of flexibility on how analytics can be split up. Data filtering can then be applied to each child workspace to ensure only data specific to that workspace can be analyzed. We’ll go into more detail about setting these up later.

 

If used appropriately, workspace provisioning greatly simplifies and accelerates scaling your analytic solution to each of your existing and incoming clients.

 

Who should use Workspace Provisioning?

Through the flexibility of workspace provisioning, GoodData.CN users can scale their analytics solutions in a number of different paths: geographical and organizational splits, pricing options, multi-tenant client splits, and much more. We’ve illustrated out a list of a few options, but please note that this list does not encompass all potential use cases that workspace provisioning may solve for. 

  1. Geographical Splits

    1. Let’s say you’re a food chain with franchise locations across the country. Through workspace provisioning, you can provide each store with a workspace filled with insight into their specific sales and performance metrics. Above that, you can have region or national level workspaces that amalgamate the data for all franchises in a given region or the entire country, respectively. 

  2. Organizational Splits

    1. You want to provide insight into your company’s internal performance metrics, but need to change how much information is available based on the user’s position in the company. Using a multi-level hierarchy of workspaces, you can build out templates that deploy a personalized workspace for each of your executives, directors, and managers, each loaded with data and insights appropriate for their information access privilege.

  3. Pricing Options

    1. Provisioning offers a scalable solution for those who want to offer multiple tiers of their analytics solution to their clients (ie. free, introductory, premium). You can create multiple hierarchies for each offering, each with their own distinct set of templated insights which can be quickly and easily rolled out for new client workspaces.

  4. Multi-tenant Client Solution

    1. Maybe you’re a company that tracks credit card transactions for small businesses, and you want to offer an analytics package to your customers on their data. With workspace provisioning and data filtering, you can create workspaces for each of your client businesses loaded with common insights and dashboards pre-filtered to analyze only their own data.

 

We’d love to hear more about how you have used GoodData.CN, so please let us know on GoodData Community!

 

Workspace Hierarchies

As mentioned earlier, workspace provisioning can be achieved through implementing workspace hierarchies from which a single, “parent” workspace will template a common LDM, and set of measures, insights and dashboards to distribute across its “child” workspaces. For instructions on how to create a workspace hierarchy in GoodData.CN, see here

 

While each child workspace then has the freedom to add additional dashboards, insights, measures, and datasets, GoodData.CN will prevent edits being made to those items inherited from the parent workspace. This ensures that if edits are made to the parent template, the client’s customizations are not lost as those updates are inherited by each child workspace. Please note that adding datasets to an LDM will require connecting to new tables unused by the parent LDM. Depending on the scale of the LDM update, it may also warrant creating the workspace as a new “parent” or an independent workspace.

 

For workspaces in a defined hierarchy, changes made to a parent workspace will immediately be applied to its child workspaces, and any subsequent lower workspaces. As a result, we suggest any edits to your template workspaces be made in a Development or QA environment prior to releasing the change to Production for reduced release risk.

 

Multi-level Hierarchies

GoodData.CN also supports multi-level hierarchies, which can be a great way of organizing workspaces based on increasing levels of data granularity. The below image illustrates how a retailer with multiple store locations may break down their workspace hierarchy:
 

Head Office

  |---> West

    |---> California

    |---> Washington

    |---> Oregon

  |---> East

  |---> South

    |---> Georgia

    |---> Florida

 

In the example, we see three levels: Head Office, Regions, and States. In this hierarchy, data filters (talked about in depth in the next section) will be applied to each of the child workspaces to limit the data available to that workspace. For each subsequent level, the data filter is inherited from the parent, and a more granular filter can be applied. Also note that each branch can maintain different sets of levels. 

 

Child workspaces will inherit updates from all of its predecessors. So for example, if updates were made in both the “Head Office” and “West” workspaces, the “California”, “Washington” and “Oregon” workspaces would see both sets of those updates.

 

We will come back to setting up this example in your own GoodData.CN instance later.

 

Data Filtering

As mentioned earlier, by using workspace hierarchies, child workspaces will also inherit data from their parent workspace. Users can set data filter(s) on any workspace, child or parent, through the GoodData.CN APIs to limit the data that gets mapped into that workspace (see here for instructions). For example, here are the data filters applied to the previous geographical hierarchy example: 

 

  • Head Office - none

    • West - Region == ‘West’

      • California - State == ‘California’

      • Oregon - State == ‘Oregon’

      • Washington - State == ‘Washington’

    • East - Region == ‘East’

    • South - Region == ‘South’

      • Georgia - State == ‘Georgia’

      • Florida - State == ‘Florida’

 

In the above illustration, we are assuming that columns Region and State exist in your data model (they exist in the Get Started docker image provided here). Workspaces in hierarchy will also pass down its data filters to its child workspaces (ie. the Region == ‘West’ filter is also applied to workspaces California, Oregon, and Washington). If no data filter is applied, then all data available to the parent workspace will be inherited by the child workspace(s).

 

Please note that GoodData.CN will filter all data associated with the data filter criteria as specified in the LDM. However, let’s say that you have set a data filter on Transactions made in Nebraska, USA, and you have a dataset in your LDM, “Manufacturer”, that is not at all connected to Nebraska, USA. In this case, all data from “Manufacturer” will be visible in the child workspace.

 

Multi-tenant Solutions

Data filtering is also a great way to set-up a multi-tenant analytic solution through GoodData.CN. In this case, you might set-up a parent workspace that displays a set of insights to make available to all of your clients. Create a child workspace for each Client, and apply a data filter ie. Client_ID == ‘client_A’. 

 

With a multi-tenant solution, we understand that your clients’ data may come from multiple different sources. The good news is that GoodData.CN does allow for connecting multiple data sources within a single workspace. If using multiple data sources, please note that when designing the LDM, you will need distinct datasets for each data source (ie. if both Source 1 & 2 have the dataset “Orders”, you will need two datasets in your LDM if connecting both sources).

 

For performance and design simplicity considerations, it may help to pre-aggregate the data from multiple sources into a single data source (we would recommend including a column(s) for differentiating where the data comes from). This way, you can connect a single data source with a unified LDM. Then, use data filtering to segment the data into each workspace.

 

Workspace Provisioning Example

Let’s go through setting up workspace provisioning for the previous example using the data model provided in the GoodData.CN tutorial docker image. We’ve gone ahead and prepared a layout file that you can use to set up insights, dashboards, and measures for your workspaces.

 

  1. You will need to download and run the docker image once ready. Once running, you can login and see a screen like this:
    4328hPZpG6Ij0Efp0m1rhsvrKrhj_Qo39Y8dSPrr5oFXEJki6xx7PPAwnUL4Fikx4qX7WkZiAmjpwj2s4WxQ-vNJ3i8qKUq0ERc9yD_J6QrKKLe2e6zYSTzANmNX4ZX194l61J7X

  2. Create you top-level workspace “Home Office” using the following command:

    curl http://localhost:3000/api/entities/workspaces \
    -H "Content-Type: application/vnd.gooddata.api+json" \
    -H "Accept: application/vnd.gooddata.api+json" \
    -H "Authorization: Bearer YWRtaW46Ym9vdHN0cmFwOmFkbWluMTIz" \
    -X POST \
    -d '{
    "data": {
    "attributes": {
    "name": "Head Office"
    },
    "id": "head_office",
    "type": "workspace"
    }
    }'

    LgnXkCByeNmzFRfHL3nBE_87jCi4cYmGx1M1BdVuzIgMuOiD6AU_HC5oGV5v5e-UaQPTW9qhs2DSC-at86DmjiJyHJNIx50yk41C7l8a0z6v-O0DJR6P4C2yi34aFAK73AntspBs

    1. Connect the data source provided in the Docker image, and create the LDM.

    2. Apply this layout to build a suite of dashboards, insights, and measures:
      freelayout.json

      curl http://localhost:3000/api/layout/workspaces/head_office \
      -H "Content-Type: application/json" \
      -H "Accept: application/json" \
      -H "Authorization: Bearer YWRtaW46Ym9vdHN0cmFwOmFkbWluMTIz" \
      -X PUT \
      -d @freelayout.json

      jjkw4C6B7PJNcXmehFjFEKVluwlqRAQCs04zBc62d91n5h_1rXsSY7fZM9zzBXiJehwidX2e56WvPmBn41pcCWPY1PkzQcXWA8t_BXWQU8SCRBlHt3ZPNvHIhecUoL3SG7rPQXBZ

  3. Pull out the domain layout json:

    curl http://localhost:3000/api/layout/workspaces \
    -H "Authorization: Bearer YWRtaW46Ym9vdHN0cmFwOmFkbWluMTIz" \
    -o ws-layout.json

    This command should create a file “ws-layout.json” in your local repository.

  4. Build child workspaces: Update the ws-layout.json file that was generated by adding the following to the “workspaces” array

    {
    "id": "West",
    "model": {
    "analytics": {
    "analyticalDashboards": [],
    "filterContexts": [],
    "metrics": [],
    "visualizationObjects": []
    },
    "ldm": {
    "datasets": [],
    "dateInstances": []
    }
    },
    "name": "West",
    "parent": {
    "id": "head_office",
    "type": "workspace"
    }
    },
    {
    "id": "South",
    "model": {
    "analytics": {
    "analyticalDashboards": [],
    "filterContexts": [],
    "metrics": [],
    "visualizationObjects": []
    },
    "ldm": {
    "datasets": [],
    "dateInstances": []
    }
    },
    "name": "South",
    "parent": {
    "id": "head_office",
    "type": "workspace"
    }
    },
    {
    "id": "East",
    "model": {
    "analytics": {
    "analyticalDashboards": [],
    "filterContexts": [],
    "metrics": [],
    "visualizationObjects": []
    },
    "ldm": {
    "datasets": [],
    "dateInstances": []
    }
    },
    "name": "East",
    "parent": {
    "id": "head_office",
    "type": "workspace"
    }
    },
    {
    "id": "California",
    "model": {
    "analytics": {
    "analyticalDashboards": [],
    "filterContexts": [],
    "metrics": [],
    "visualizationObjects": []
    },
    "ldm": {
    "datasets": [],
    "dateInstances": []
    }
    },
    "name": "California",
    "parent": {
    "id": "West",
    "type": "workspace"
    }
    },
    {
    "id": "Oregon",
    "model": {
    "analytics": {
    "analyticalDashboards": [],
    "filterContexts": [],
    "metrics": [],
    "visualizationObjects": []
    },
    "ldm": {
    "datasets": [],
    "dateInstances": []
    }
    },
    "name": "Oregon",
    "parent": {
    "id": "West",
    "type": "workspace"
    }
    },
    {
    "id": "Washington",
    "model": {
    "analytics": {
    "analyticalDashboards": [],
    "filterContexts": [],
    "metrics": [],
    "visualizationObjects": []
    },
    "ldm": {
    "datasets": [],
    "dateInstances": []
    }
    },
    "name": "Washington",
    "parent": {
    "id": "West",
    "type": "workspace"
    }
    },
    {
    "id": "Geogria",
    "model": {
    "analytics": {
    "analyticalDashboards": [],
    "filterContexts": [],
    "metrics": [],
    "visualizationObjects": []
    },
    "ldm": {
    "datasets": [],
    "dateInstances": []
    }
    },
    "name": "Georgia",
    "parent": {
    "id": "South",
    "type": "workspace"
    }
    },
    {
    "id": "Florida",
    "model": {
    "analytics": {
    "analyticalDashboards": [],
    "filterContexts": [],
    "metrics": [],
    "visualizationObjects": []
    },
    "ldm": {
    "datasets": [],
    "dateInstances": []
    }
    },
    "name": "Florida",
    "parent": {
    "id": "South",
    "type": "workspace"
    }
    }

    This json defines which child workspaces to provision, and defines their parent workspace.

  5. Post the ws-layout.json to your GoodData.CN instance:

    curl http://localhost:3000/api/layout/workspaces \
    -H "Authorization: Bearer YWRtaW46Ym9vdHN0cmFwOmFkbWluMTIz" \
    -H "Content-Type: application/json" \
    -X PUT -d @./ws-layout.json

    Child and Grandchild workspaces should now be established.
    RM6l72qev0rDVYMLn6hX0uQHtRhfYmU-gsdhMm43mEPLiJeeWeZ3Uw7YjhLq6Aba6IvWlo39GaLqZkV1lRvJa_fV-HFc5oeOj0ZezAdl4lN5txaSYmnh1jnWWHYtIn209pkzhffj

  6. Set data filters on child workspaces: Again, we will update the ws-layout.json file, but this time adding to the “workspaceDataFilters” array found at the end of the file:

    {
    "id": "region",
    "title": "Customer Region",
    "columnName": "region",
    "dataSourceId": "demo-ds",
    "workspace": {
    "id": "head_office",
    "type": "workspace"
    },
    "workspaceDataFilterSettings": [
    {
    "id": "region-west",
    "title": "Western States",
    "filterValues": [
    "West"
    ],
    "workspace": {
    "id": "West",
    "type": "workspace"
    }
    },
    {
    "id": "region-east",
    "title": "Eastern States",
    "filterValues": [
    "East"
    ],
    "workspace": {
    "id": "East",
    "type": "workspace"
    }
    },
    {
    "id": "region-south",
    "title": "Southern States",
    "filterValues": [
    "South"
    ],
    "workspace": {
    "id": "South",
    "type": "workspace"
    }
    }
    ]
    },
    {
    "id": "west-state",
    "title": "Customer West States",
    "columnName": "state",
    "dataSourceId": "demo-ds",
    "workspace": {
    "id": "West",
    "type": "workspace"
    },
    "workspaceDataFilterSettings": [
    {
    "id": "california",
    "title": "California",
    "filterValues": [
    "California"
    ],
    "workspace": {
    "id": "California",
    "type": "workspace"
    }
    },
    {
    "id": "oregon",
    "title": "Oregon",
    "filterValues": [
    "Oregon"
    ],
    "workspace": {
    "id": "Oregon",
    "type": "workspace"
    }
    },
    {
    "id": "washington",
    "title": "Washington",
    "filterValues": [
    "Washington"
    ],
    "workspace": {
    "id": "Washington",
    "type": "workspace"
    }
    }
    ]
    },
    {
    "id": "south-state",
    "title": "Customer South States",
    "columnName": "state",
    "dataSourceId": "demo-ds",
    "workspace": {
    "id": "South",
    "type": "workspace"
    },
    "workspaceDataFilterSettings": [
    {
    "id": "georgia",
    "title": "Georgia",
    "filterValues": [
    "Georgia"
    ],
    "workspace": {
    "id": "Georgia",
    "type": "workspace"
    }
    },
    {
    "id": "florida",
    "title": "Florida",
    "filterValues": [
    "Florida"
    ],
    "workspace": {
    "id": "Florida",
    "type": "workspace"
    }
    }
    ]
    }

     

  7. Post the ws-layout.json to your GoodData.CN instance:

    curl http://localhost:3000/api/layout/workspaces \
    -H "Authorization: Bearer YWRtaW46Ym9vdHN0cmFwOmFkbWluMTIz" \
    -H "Content-Type: application/json" \
    -X PUT -d @./ws-layout.json
    1. Note: Workspace “East” will display no data as there was no transaction data linked to the East region.

 

Note that the same curl command is used in Step 5 & 7. Reposting the ws-layout.json file will overwrite the previously posted layout, so this command can be re-run as often as needed. Updates can be made to child workspaces and data filters easily by reconfiguring this ws-layout.json file.

 

 

If you are interested in GoodData.CN, please contact us.

Alternatively, test a trial version of GoodData Cloud:

Start Your GoodData Analytics Trial — Commitment-Free


0 replies

Be the first to reply!

Reply