Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Update Dimension Member Expand / Collapse
Author
Message
Posted Tuesday, September 24, 2013 3:53 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, September 30, 2013 1:55 AM
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
Post #1497738
Posted Monday, September 30, 2013 12:59 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, June 18, 2014 3:28 AM
Points: 1,044, Visits: 1,839
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
Post #1499863
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse