blogs.conchango.com

welcome to the conchango blogging site
Welcome to blogs.conchango.com Sign in | Join | Help
in Search

SSIS Junkie

SSIS/SSAS: Process SSAS dimensions and measure groups individually

On my current project I am implementing SQL Server Analysis Services (SSAS) and recently I was having a problem doing a full process of my cube. I've got many many measure groups in the cube each containing twelve partitions and the cube process was hanging due to lack of resource issues on the Analysis Server.

Those issues needed sorting out but in the meantime my cube was sitting there unprocessed and I needed to process it. Quick. I decided I wanted something that would process all of my dimensions and measure groups individually and hence I built a SSIS package that would do it.

Here's a screenshot of my package. You can see that I treat the dimensions and measure groups seperately.

So what does this do? Well its pretty simple really:

  1. A "Get Dimensions" uses a source script component to connect to an Analysis Server (the server name is stored in a variable) and get a list of all the dimensions in all databases on that server. There is a conditional split transform in there which currently doesn't do anything but can be edited to filter out the dimensions/databases that you don't want to process
  2. I construct the XMLA processing command inside a variable using an expression. I output that XMLA command using a script task as an OnInformation event which means it will get captured by whatever log provider you are using. Also, it will get output to the Visual Studio Output window, and that is very useful indeed.
  3. Fires the XMLA command using the Analysis Services DDL Task.

It then does the same for all the measure groups on that server.

Feel free to download the package from here. I've already used this many times over the past 3 days - I prefer it to just issuing a blanket "process everything" XMLA command because this way you can see what is happening under the covers and you can also filter which objects get processed. It also limits the load on your server because it isn't doing anything in parallel (which is what caused me to build it in the first place).

 

Have fun!!!

 

-Jamie

 

 

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

GBaksh said:

Jamie, this is great. Much better processing time than built in Analysis Services Processing Task. I've couple of questions:

1. What type of processing does this package do? Full or default? I am assuming full. Is it possible to do updates only?

2. Is it possible to change the Data Source properties of the AS 2005 database? For example: My AS 2005 Database exist on ServerA, the data source for it exists on ETLServerA, but at time (usually in testing) I'd like that the all dimensions and measures in my AS 2005 Database get processed from ETLServerB

November 8, 2007 19:03
 

jamie.thomson said:

GBaksh,

1. I honestly can't remember. Take a look and let me know :)

2. Yeah you can do that. Its pretty standard practice. If you're using this package in a production environment then you're probably gonna need to use configurations to do it. If you're just running it o an ad-hoc basis then simply edit accordingly.

-Jamie

November 9, 2007 00:56
 

GBaksh said:

Thanks for your response Jamie.

1. It is full process

2. What I meant to ask was that is there a vb.net code that shows how to change the connection (that is normally defined in SSAS data source) so that I can change that via running a script task?

Thanks for any information that you can provide.

November 9, 2007 01:22
 

jamie.thomson said:

GBaksh,

I'm afraid I don't know of any such code snippet, no.

-Jamie

November 9, 2007 01:57
 

GBaksh said:

So that some one else may benefit out of this, here is what I was asking:

How to Change SSAS db's data source (connection string) programmatically  

I posted this on SSAS forum and got the following reply (after about a week) and it had the answer what I was looking for:

http://forums.microsoft.com/MSDN/showpost.aspx?postid=2389917&siteid=1

Thanks!

November 15, 2007 19:37
 

Edwin said:

Connect a package of SSIS (dtsx) like data source for SSAS (to make cubes)

Hi,

I'm in the following situation:

* I'm using Sharepoint technology which stores the information in binary format and renders the information in xml format.

* I built a package in SSIS 2005 which get this information through a web service and store it in a Data Reader Task or Data Set Task (all in SSIS). (my objective is not use temporal tables stored in SQL Server, it means move the information from the package like data source for SSAS project directly).

* So, I'm here and I'd like to know: how to configure the package, is it necessary?, which provider I have to use (in SSAS)?  or another solution that you have maded.

Thanks,

See you

Edwin

PD: If you have books, related links or samples, please let me know.

December 19, 2007 18:38
 

Keith said:

Jamie,

I don't get where you are setting the expression that is being fired in the process dimension step. I want to simply change the process dimension from Full to Update and when I change the variable and run the package it reverts back to Full.

I see you mention an expression is set but where?

Thanks,

keith

March 19, 2008 03:54
 

Keith said:

As soon as I added my comment I went back one more time and figured it out if you check the properties of the variables I see the expression.

Nice!

March 19, 2008 04:01
 

Andrew said:

I'm getting a really funky error when I try to run this process:

Error: 0x0 at Process Dimension, Analysis Services Execute DDL Task: Either the user, MORGANLEWIS\MP071663, does not have access to the CoreMarketReturn database, or the database does not exist.

Dr. Google doesn't seem to return anything and I'm ignorant of this DB--it seems to be a core database of SSAS....  Any ideas?

July 7, 2008 21:59
 

Andrew said:

Nevermind--saw in Jamie's connection string that I had to change the initial catalogue to my DB...  I know that I'm being thick, but the server is set in a variable, but the DB isn't?

Thanks!!!

July 7, 2008 22:12
 

Bill said:

Jamie,

Can you show an example of how to edit the Conditional Split to filter out a list of dimensions or databases?

I tried the following but it doesn't seem to work:

database_name == "MyDB" && dimension_name == "Date"

TIA.

July 23, 2008 19:11
 

jamie.thomson said:

Bill,

What do you mean by "it doesn't work". You'll have to give me more to go on than that I'm afraid.

-Jamie

July 24, 2008 10:40
 

Bill said:

When executing the package, the process stops at "Loop over dimensions" (it highlights it green but the "Output DimProcessXMLA..." and "Process Dimension" tasks are still white). It seems that the case of the conditional split does not work when I filter on database_name AND dimension_name. When I filter on only database_name then it works as expected (i.e. only processes one db out of the entire server).

July 24, 2008 18:34
 

jamie.thomson said:

Bill,

That sounds weird. I've never heard of extra predicates in the Conditional Split causing this. Have you got any further in working it out?

-Jamie

July 28, 2008 10:39
 

Bill said:

Jamie,

Thanks for your responses. I have not gotten it to work. I will try on a different server. Or I'll try to ask on the SSIS forum so that I don't fill your comments with an issue.

I should mention that I am kind of new to SSIS so I could be doing something wrong. Maybe if you can show us an example that would lead us to the right way, that would be great.

Thanks again,

Bill

July 28, 2008 18:26
 

Jason said:

I do not have the Microsoft.AnalysisServices namespace. Where/How can I get it?

thanks

Jason

July 29, 2008 22:03
 

sn said:

Jamie

It process all the databases in the server. can i limit to just process for one database ?

sn

October 20, 2008 18:42

Leave a Comment

(required) 
(optional)
(required) 
Submit

This Blog

Syndication

News

Powered by Community Server (Personal Edition), by Telligent Systems