How can I create a query object (instance of class org.olap4j.query.Query), knowing that I have already created the object selectNode (org.olap4j.mdx.SelectNode) containing the structure validated the MDX query ??
so, Firstly I have this:
MdxParserFactory parserFactory = olapConnection.getParserFactory();
MdxParser parser = parserFactory.createMdxParser(olapConnection);
SelectNode select = parser.parseSelect("SELECT {[Measures].[Unit Sales] } on columns, \n"+ " {[Product].members} on rows \n"+ " FROM [Sales]");
MdxValidator validator = parserFactory.createMdxValidator(olapConnection);
select = validator.validateSelect(select);
Secondly I have this:
Query query=new Query("myQuery",c); // In my programm c is the cube Sales
How can I link between : query and select??
Please help me![]()


Reply With Quote