US and Worldwide: +1 (866) 660-7555
Results 1 to 3 of 3

Thread: create a model Query with giving SelectNode

  1. #1
    Join Date
    Jan 2010
    Posts
    9

    Question create a model Query with giving SelectNode

    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

  2. #2
    Join Date
    Nov 1999
    Posts
    1,614

    Default

    The query model is incomplete, which means that we can't take a general parse tree (SelectNode) and convert it to a query.

    There have been several discussions how to do this on the olap4j forum and on the PAT list, but so far nothing has been implemented.

  3. #3
    Join Date
    Jan 2010
    Posts
    9

    Default

    jhyde, thank you for your reply

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •