I need to extract a list of all dimensions and their levels from all dimensions and hierarchies in a cube.
Im assuming that an XMLA query would do the trick...
The reason is that in converting from SAS 2000 to SAS2005, most of our virtual dimensions became member hierarchies in existing dimension, and now we have a large number of saved MDX queries that need to be updated to have the new dimension names. It will be a simple process if I can start from the known dimension and level names
For example the virtual dimension [Product Class] is now referenced as [Item].[Product Class], so now it and all levels of it's hierarchies need to be updated in all saved queries that used it. I have the search/replace but need to build a from/to list quickly
Any suggestions? sample scripts?
Thanks in advance,
Hi Clayton,
You can try this Discover XML/A query, which returns all levels in the AW cube:
<Discover xmlns="urn:schemas-microsoft-com:xml-analysis">
<RequestType>MDSCHEMA_LEVELS</RequestType>
<Restrictions>
<RestrictionList>
<CATALOG_NAME>Adventure Works DW</CATALOG_NAME>
<CUBE_NAME>Adventure Works</CUBE_NAME>
</RestrictionList>
</Restrictions>
<Properties>
<PropertyList>
<Catalog>Adventure Works DW</Catalog>
<Format>Tabular</Format>
</PropertyList>
</Properties>
</Discover>
No comments:
Post a Comment