cubesviewer how to use restrict_cubes options

19 views
Skip to first unread message

Marcello Giovagnoli

unread,
Jun 6, 2017, 8:57:10 AM6/6/17
to Cubes
Hi guys, 

I'm trying cubes and cubesviewer studio but I need a feature which I hope is present now.

I have a multi-organization HRMS (Human Resources Management System)  with one simple denormalized table named costs in which I store the costs of all employee every month.

So I have several cubes, for example:

           organization with levels: organization_id, location, division, role, employee, year, quarter ..etc.

This works perfectly but I would like restrict data, passing a value of organization_id in order to limit tuples only to the desired organization_id.

In my idea it should be done in some way on the client side, for instance when I initialize cubesviewer, doing something like:

     var cubesUrl = "http://localhost:5000";

        cubesviewerStudio.init({
                cubesUrl: cubesUrl,
                restrict_cubes: { [ "organization": "organization_id=100"]}, 
            container: $('#cubesviewer').get(0),
            debug: true
        });
    });

The other way could be using separated tables for each organization but I should need to define different models for each organization and force cubes to load one specific model depending on organization_id.

In this case I have small tables and I'll get more performance but it's hard to manage separated instances of cubes running on separated ports. 

Can you give me a tips or help?

Regards

Marcello
Reply all
Reply to author
Forward
0 new messages