UPDATE: Tim has just let me know that he’s posted up a demo of CubeSlice which uses Federal Election Commission data, which you can download here:
http://www.cubeslice.com/fecsharefile.htm
Clever marketing move on his part, I think – there’s nothing like relevant data (well, relevant for all of you in the US at least) to catch people’s interest.
Time Utility Hierarchies (again) and Attribute Overwrite
CREATE
MEMBER CurrentCube.[Date].[Calendar Date Calculations].[Previous Period] AS([Date].[Calendar Date Calculations].DefaultMember, [Date].[Calendar].CurrentMember.PrevMember);
select
{([Date].[Calendar Date Calculations].[Previous Period], [Measures].[Internet Sales Amount])}on 0,
[Date].[Calendar].members on 1
from
[Adventure Works]
with member measures.test as ([Measures].[Internet Sales Amount],[Date].[Calendar Date Calculations].[Previous Period])
select
{[Measures].[Internet Sales Amount], measures.test}
on 0,
[Date].[Calendar].members on 1
from
[Adventure Works]
with
member measures.test as([Measures].[Internet Sales Amount],[Date].[Calendar Date Calculations].[Previous Period],[Date].[Date].Currentmember)
select
{[Measures].[Internet Sales Amount], measures.test}
on 0,
[Date].[Calendar].members on 1
from
[Adventure Works]
SAP BI Accelerator
Creating local cubes from relational sources using XMLA
- Design a server database/cube (not using any features like partitions or distinct count, which aren’t supported in local cubes) in BIDS. Deploy it but don’t process it.
- In SSMS script the database you’ve just created to a new query editor window.
- Still in SSMS, right-click on the database again and select Process, select ‘Process Full’ then instead of clicking OK click the Script button and choose to script to a new query editor window.
- You now have the two XMLA commands you need to create and process your local cube, you just need to combine them into one. Select all of the Create statement generated when you scripted the database and paste it into the Batch statement generated from the Process dialog, immediately after the first line (containing the ‘Batch’ command) and before the XMLA that actually does the processing.
- Copy the new statement, open up MDX Sample app, connect to the path of the new local cube file, paste the statement into MDX Sample app and then run it. And voila, your local cube will be built direct from the relational data source.
Many-to-Many Dimension White Paper
Creating AS2005 Local Cubes with XMLA
- Open MDX Sample app – yes, this is another one of those areas where SQLMS won’t do the job. Connect to the Adventure Works database
- Paste a CREATE GLOBAL CUBE statement into a query pane. Don’t run it yet though…
- Start a new Profiler trace on your target database
- Run the CREATE GLOBAL CUBE statement, then stop the trace
- Inside your trace, you’ll see the CREATE GLOBAL CUBE statement appear twice followed by a statement which begins with something like this: "CREATE GLOBAL CUBE statement. FILENAME|c:\MyfileName.cub|DDL|" and is followed by an XMLA batch statement
- Copy the XMLA batch statement out to MDX Sample App (if you find you can’t do this, you might need to save the trace as an XML file and open it in Notepad or something) and
- Close the connection to your server cube in MDX Sample app, then reconnect to the path you want to create your new cub file at, eg "c:\cubtest.cub" (instead of supplying the name of your server in the connection dialog box).
- Run the Batch statement, and your local cube is created!
The problem with local cubes in AS2K were numerous: they were hard to create, the creation process was so buggy/difficult that you could never be sure you’d succeed, and the query performance of local cubes greater than around 100Mb was atrocious. AS2005 local cubes have, in my understanding, been completely rewritten though and apart from the new way of creating them they’re also a lot more functional (see http://sqljunkies.com/WebLog/mosha/archive/2006/03/08/local_cube_password.aspx for example – they now have security!) and I recently did some testing on query performance that showed that a local cube of approx 230Mb actually performed better than the equivalent server cube. Unfortunately I also found out that trying to build a larger cube – at least with the cube design I had – led to some unpleasant crashes: https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=189679.
But perhaps in a few service packs time local cubes will be ready for use. I guess local cubes have also been neglected because the promise of 100% network connectivity has always been just around the corner, so the thinking has been that there’s no point investing in local cubes when in a few years everyone will always be able to connect to a server cube. Increasingly, though, the fact that imperfect connectivity will be a fact of life at least in the medium term is sinking in and new tools are appearing which deal with this – think of the kind of BI solutions you could build with local cubes and Groove 2007, for example, where you could build you local cubes centrally and distribute them to your sales force using Groove’s file synchronisation features (which I assume is possible – I’ve not tested this!).
This might also be a good point to link to Tim Peterson’s site on local cubes:
http://www.localcubetask.com/
When I last talked to him, he mentioned that he was working on an AS2005 version of localcubetask and it seems that there was indeed a release earlier this year.