Reputation: 341
I am trying to create an SSAS cube based on a single table. Unfortunately, running the services in tabular mode is not an option since we already have the instances running in Analysis server mode.
I read a couple of other posts where folks mentioned it is indeed possible to create a cube based off a single table or view.
Question though is: How and where do I specify the dimensions and measures when creating based off single source?
I created a data source view, but wasnt sure how I would specify the dimensions and measures. Thought I'd ask here for help.
Thanks in advance, Bee
Upvotes: 0
Views: 1238
Reputation: 1405
For your dimension keys to be unique, you'd have to base your dimensions (for example, a Country dimension) on a
SELECT DISTINCT Country[,... other things] FROM TheSingleTable
query.
There are disadvantages to this method. The dimension is never materialised outside the cube itself, which can make it very difficult to analyse problems when the dimension data seems to be wrong. For the same reason, creating a slowly-changing dimension is impossible.
The advantage is that you don't have to do any ETL work to detect new dimension members and populate a dimension table when new data comes in. The disadvantage is that, unless every dimension is based on a single column only from the table, it'll become incoherent.
If a dimension is based on more than one column, as in:
SELECT DISTINCT CountryCode,CountryName FROM TheSingleTable
then, if there are no constraints on the single table or the ETL process to guarantee that the two columns range of values map exactly 1 to 1 to each other, then new data will upset your dimension membership.
For example, you have an existing member with CountryCode "USA", CountryName "United States". If just one new fact row comes into the table, with CountryCode "USA", CountryName "Uited States" (or NULL), this will be interpreted as a new dimension member. You'll either get dimension processing duplicate key errors (if you're lucky), or spurious multiple dimension members.
It's so easy for new data to upset this kind of design, that I'd recommend against it unless it's a really small, simple project, and you have time to intensively analyse incoming updates and think through what consequences they might imply.
Upvotes: 1
Reputation: 8120
Just create them like you create normal dimensions.
Kind of hard to maintain, obviously, but it's certainly possible.
Upvotes: 1