In what cases model.getCellSet should return null?

15 views
Skip to first unread message

Pablo S

unread,
Aug 7, 2016, 8:10:18 AM8/7/16
to pivot4j-list
            
Hi Xavier, when running the MDX statement below getCellSet returns null; the only difference with a statement that works is the number of axes (with two axes it works fine). Is this correct behavior? Shouldn't getCellSet allow me to get the columns only?

Also, if there are no axes such as in "select from [Sales]" what would model.getCellSet return?

Thanks
Pablo 

           
            val model
= getModel(configuration)
            model
.setMdx("select [Product].[All Products].Children ON COLUMNS from [Sales]")
            model.initialize()
           
            val cellSet
= model.getCellSet
            println
(cellSet == null)

            val axes = cellSet.getAxes
            val columns = axes.get(0)


Pablo S

unread,
Aug 7, 2016, 5:28:36 PM8/7/16
to pivot4j-list
I think I know the answer, I tried the MDX in pivot4j-analytics application and got:


You need to put at least one level or measure on Columns and Rows for a valid query. You can drag elements from the cube structure and drop them on either axes in the pivot structure view.


So there's a restriction to have both columns and rows in the query. This shouldn't be an issue since 95% of the queries have both axes, but still it would be nice to see this included down the road as this functionality is supported by Jpivot.

Xavier Cho

unread,
Aug 16, 2016, 8:29:49 PM8/16/16
to pivot4j-list
I agree that it could be a useful feature, but we need to modify Olap4J itself to implement it. The reason why JPivot supported this feature is that it has its own equivalent of Olap4J API, which is not as elegant as Olap4J but still has some extra features like this one.

Regards,
Xavier

2016년 8월 8일 월요일 오전 6시 28분 36초 UTC+9, Pablo S 님의 말:
Reply all
Reply to author
Forward
0 new messages