This project has moved and is read-only. For the latest updates, please go here.

Add new dimension programmaticly to a SSAS project

Topics: Resolved
Nov 11, 2009 at 10:21 PM

Hello BIDS developers,

I'm currently thinking about develop an extension for VS to add a new dimension to a project file. Background: I want to have a single SSAS database hosting all my conformed dimensions (and no cubes at all). When team members creating a new SSAS project they should resuse exactly these dimension without doing all the work (attribute releatioships, sorting, hierarchies, etc.) again. I don't want to use linked dimensions due to performance, different processing intervalls and some other issues. I don't want to have the copied diemensions only in the deployed database; I want to have them in the VS project.

What I'm thinking about is an extension which allows the developer to open an window an select the source database where to import (and in a futer release maybe sync) the dimension from. Then the extension should read the definition (pherhaps check if the DataSources and DataViews are existing) and create a new dimension in the project based on the extracted definition. I can do excactly what I described when I code a commandline app and create the dimension directly in the deployed database but I'm having problems to add a dimension object to an VS project. It seems to me, that I can olny add a file instead of an object. Must I serialize the dimension to XML/A, save it in the project folder and then add it as a normal file?

Perhaps someone can give me a hint.

Regards Mic

Nov 12, 2009 at 8:47 PM

I don't think I would do this with code at all. I would just create a "template" project and then when you start a new project you would take a copy of the "template" and delete what you don't need. 

I would also only do this if I was deploying similar databases to different servers (say at different client sites) I would not want to have multiple databases with the same dimensions on the one server. However I would be careful not to over do this approach on a single server. You really want to keep the number of copies of a dimension to a minimum (down to a single copy if you can). The more copies you have, the more maintenance and processing overhead you create.