[Mondrian] RolapUtil.executeQuery

Luc Boudreau lucboudreau at gmail.com
Wed Jun 13 14:56:19 EDT 2012


Try this:

               return Locus.execute(
                mondrianConnection,
                "Description",
                new Locus.Action<Void>() {
                    public Void execute()
                    {
                        // Do anything here.
                        return null;
                    }
                });

... where MondrianConnection is a RolapConnection object. May I ask why you
need to use the private API?

Luc


On Wed, Jun 13, 2012 at 2:52 PM, Kleyson Rios
<kleysonrios at saude.go.gov.br>wrote:

> I am trying to understand some things and in the
> mondrian.rolap.SqlTupleReader we have:
>
> protected void prepareTuples(
>         DataSource dataSource,
>         TupleList partialResult,
>         List<List<RolapMember>> newPartialResult)
>     {
>                 (...)
>
>                 stmt = RolapUtil.executeQuery(
>                     dataSource, sql, types, maxRows, 0,
>                     new SqlStatement.StatementLocus(
>                         Locus.peek().execution,
>                         "SqlTupleReader.readTuples " + partialTargets,
>                         message,
>                         SqlStatementEvent.Purpose.TUPLES, 0),
>                     -1, -1);
>
>                 (...)
> }
>
> And when I run stmt I got the following exception at
> Locus.peek().execution: "throw new EmptyStackException();"
>
> I would expect get a result from the sql.
>
> Parameters:
> dataSource: org.apache.commons.dbcp.PoolingDataSource at 1def85
>
> sql: select "CUSTOMER_W_TER"."TERRITORY" as "c0" from "CUSTOMER_W_TER"
> as "CUSTOMER_W_TER" group by "CUSTOMER_W_TER"."TERRITORY" order by CASE
> WHEN "CUSTOMER_W_TER"."TERRITORY" IS NULL THEN 1 ELSE 0 END,
> "CUSTOMER_W_TER"."TERRITORY" ASC
>
> types: [null]
>
> maxRows: 0
>
>
> Any idea ?
>
> Regards.
>
> --
> Kleyson Rios
> Gestor de TI
> Coordenador de BI / Banco de Dados
> Gerência de Tecnologia da Informação
> Secretaria de Estado da Saúde de Goiás
> (62) 3201-3707
>
> Se não pode vencer pelo talento, vença pelo esforço. (Dave Weinbaum)
>
> _______________________________________________
> Mondrian mailing list
> Mondrian at pentaho.org
> http://lists.pentaho.org/mailman/listinfo/mondrian
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20120613/24b29213/attachment.html 


More information about the Mondrian mailing list