Shared Dimensions Example?

142 views
Skip to first unread message

John Gordon

unread,
Jun 20, 2011, 9:53:21 AM6/20/11
to mondrian-olap
Forgive my newness to the code, but I'm unable to figure out how to
setup a schema in ruby for shared dimensions. Is there an example of
a shared dimension and usage?

I've been working with mondrian using the Pentaho tools for a while
now and already have an xml schema up and working. Is it possible to
use my existing xml schema with my mondrian-olap rails app?

Thanks!

John

Raimonds Simanovskis

unread,
Jun 21, 2011, 3:24:50 AM6/21/11
to mondri...@googlegroups.com
Currently I have not yet added support for shared dimensions but it would be quite easy to do. All schema elements are defined in https://github.com/rsim/mondrian-olap/blob/master/lib/mondrian/olap/schema.rb as SchemaElement subclasses and with attributes and elements methods you specify what attributes and included elements this schema element can have. You can try to fork repository and add it by yourself and submit pull request. Otherwise I plan to add all possible schema elements in nearest future.

Also if you want to use existing XML schema file then when establishing connection instead of :schema => ... parameter pass :catalog => ... parameter with string containing full path to XML schema file.

And also please use latest mondrian-olap version from github (in your Gemfile specify :git source) as I am all the time adding some new features or bug fixes.

Raimonds

John Gordon

unread,
Jun 22, 2011, 9:03:19 AM6/22/11
to mondrian-olap
Using the :catalog param worked perfectly. Thanks for your help with
this--and thanks for the gem!

@olap = Mondrian::OLAP::Connection.create(
:driver => params[:adapter] == 'oracle_enhanced' ? 'oracle' :
params[:adapter],
:host => params[:host],
:database => params[:database],
:username => params[:username],
:password => params[:password],
:catalog => File.expand_path('../Cubes.xml', __FILE__)


On Jun 21, 3:24 am, Raimonds Simanovskis
<raimonds.simanovs...@gmail.com> wrote:
> Currently I have not yet added support for shared dimensions but it would be
> quite easy to do. All schema elements are defined
> inhttps://github.com/rsim/mondrian-olap/blob/master/lib/mondrian/olap/s...
Reply all
Reply to author
Forward
0 new messages