SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Update Dimension Member


Update Dimension Member

Author
Message
magwitch
magwitch
Forum Newbie
Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)

Group: General Forum Members
Points: 6 Visits: 32
I've been tasked with populating the description of all dimensions and measures in our analysis services cubes to then be able to pull this out as a report for the end user to have a data dictionary. The following code will be the basis of the report. Is it possible to run something similar to update the descriptions rather than manually doing this in BIDS and reprocessing? I thought using UPDATE DIMENSION MEMBER might do it, but can't get it to work.

SELECT CUBE_NAME,
CATALOG_NAME,
REPLACE(REPLACE(CAST(DIMENSION_UNIQUE_NAME AS VARCHAR(100)),'[',''),']','') AS Dim_Name,
LEVEL_NAME AS Attribute_Name,
LEVEL_UNIQUE_NAME AS Dimension_Attribute_Level,
LEVEL_CAPTION,
DESCRIPTION AS Description
FROM OPENQUERY("<server>\<db>",
'SELECT * FROM $SYSTEM.MDSCHEMA_LEVELS
WHERE [LEVEL_NUMBER]>0
AND [LEVEL_IS_VISIBLE]')
WHERE CAST(CUBE_NAME AS VARCHAR(255))= 'X'
AND CAST([CATALOG_NAME] AS VARCHAR(255)) = 'X'

Thanks
Raunak Jhawar
Raunak Jhawar
Hall of Fame
Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)Hall of Fame (3.7K reputation)

Group: General Forum Members
Points: 3661 Visits: 1944
CAST & REPLACE are SQL functions and the keyword AS not understood by Analysis Engine. This DMV will not work.

Regards/Raunak
Now a member of Linkedin

Please visit the all new Performance Point Forum
Please visit the all new Data Mining and Business Analytics Forum
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search