So I am trying to use Mondrian 3.14 in Java 1.8, so I did something like this :
String catalogFilePath = "<path>/mdx_schema.xml";
String connectUrl = "Provider=mondrian;" +
"Jdbc=jdbc:postgresql://example.com:5432/database?user=user&password=pass;" +
"JdbcDrivers=org.postgresql.Driver;" +
"Catalog=file:" + catalogFilePath + ";";
Connection connection = DriverManager.getConnection(connectUrl, null);
String qs = "<query>";
Query q = connection.parseQuery(qs);
Result r = connection.execute(q);
However, as stated here, Connection::execute
is deprecated :
Deprecated. This method is deprecated and will be removed in mondrian-4.0. It operates by internally creating a statement. Better to use olap4j and explicitly create a statement.
So, what should I use in olap to execute the query ?
So I actually found the answer here :