[Mondrian] Mondrian DataSource

Hilario Fernandes hilario.fernandes at cortex-intelligence.com
Fri Jan 24 07:10:56 EST 2014


Hi,

Im using mondrian in my project and i've been trying to find a way to make
mondrian use the defined datasource for the SQL queries it performs.


Currently i'm using the method described in MondrianOlap4jDriver to get a
connection:

Connection connection =DriverManager.getConnection(
    "jdbc:mondrian:Jdbc=jdbc:odbc:MondrianFoodMart;
Catalog=file:/mondrian/demo/FoodMart.xml;
JdbcDrivers=sun.jdbc.odbc.JdbcOdbcDriver");
OlapConnection olapConnection = connection.unwrap(OlapConnection.class);

Then executing queries like:

olapConnection.createStatement()
statement.executeOlapQuery(query)

As i understand like this, I have no control over the number of connections
done to the underlying database. Is there someway to pass the datasource
object to mondrian for it to use when getting connections to perform SQL?

I've read in the documentation about the parameter "PoolNeeded", but this
seems to create a new datasource visible to mondrian which i have no
control over. I've found also the param
mondrian­.­spi­.­dataSourceResolverClass<http://mondrian.pentaho.com/documentation/api/mondrian/olap/MondrianProperties.html#DataSourceResolverClass>
but
i'm not sure how to use it, or if it has anything to do with what i'm
trying to do.

If anyone can point some directions i'd be very grateful.

thanks

-- 
Hilario Fernandes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20140124/88418815/attachment-0001.html 


More information about the Mondrian mailing list