简体   繁体   中英

Retrieving Multiple CellSets with MDX

We have a data cube hosted via SQL SSAS. Currently, we have users that can open an Excel spreadsheet, plug in a customer ID, and the spreadsheet will return pertinent cube information based on that customer... such as Sales To Date, last sale, etc.

The issue I have is.. Im trying to web enable this report interface via ASP.NET. I'm using ADOMD.NET to read multi-axes cellsets, but that was just to pull one particular value to display on the page.

In the Relational\\SQL world, I would try to pull all this data as one query.. store it in a stored procedure.. and invoke that to pull all my data. How would I go about doing something similar in a multi-dimension world? In short, if I have to pull 10 different cell values from cubes, I dont want to make 10 separate trips to SSAS to get my data.

Thanks in advance for any guidance you can provide!

---EDIT 1--- OK, wondering if theres a way for me to "compile" all the data i need into a 2 dimensional view? If I know I need 10 different cube values, can I generate these values, store them as a view, and then look up against that table at runtime?

There are two approaches but in the multi-dimensional world this can be a tad tricky.
1) If the cell values you are getting belong to the same axes, you could always specify the exact cells you want to obtain (eg [Dimension].[Level].[A], [Dimension].[Level].[B], etc.)

2) Another approach based on your edit is to run the query as you suggested and store it into a SQL table for example. You could use an OpenQuery statement that has a linked server connection to your SSAS cube to run the MDX query, and place the results into a table for you to get a later time (sort of like a poor-man's cache).

HTH!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM