Dimension name from the role using discoverxmlmetadatafull

Topics: User Forum
Sep 2, 2015 at 3:31 PM
Hi all,

I currently have the following, which lists all of the permissions on the dimensions:

call assp.discoverxmlmetadatafull("\Database\Dimensions\Dimension|Name\DimensionPermissions\DimensionPermission|RoleID\AttributePermissions\AttributePermission", "<DatabaseID>MyCube</DatabaseID>")

It includes the columns DimensionName and DimensionID.

I also have the following, which lists all of the permissions of the cube permissions:

call assp.discoverxmlmetadatafull("\Database\Cubes\Cube\CubePermissions\CubePermission|RoleID\DimensionPermissions\DimensionPermission\AttributePermissions\AttributePermission", "<DatabaseID>MyCube</DatabaseID>")

However, it has a column for AttributeID but doesn't include the dimension it's against.

Is it possible to include the dimension name in the output? I tried adding |Name after dimensionPermission but it didn't work.

Any help would be much appreciated.

kind regards,
Sep 2, 2015 at 8:48 PM
Unfortunately the best you can do at the moment is to get the dimension ID by getting the CubeDimensionID attribute ff the DimensionPermission element:

call assp.discoverxmlmetadatafull("\Database\Cubes\Cube\CubePermissions\CubePermission|RoleID\DimensionPermissions\DimensionPermission__|CubeDimensionID__\AttributePermissions\AttributePermission", "", "<DatabaseID>AdventureWorks</DatabaseID>")

Then you could look up the list of dimension IDs & Names to get the Name

call assp.discoverxmlmetadatafull("\Database\Dimensions\Dimension", "", "<DatabaseID>AdventureWorks</DatabaseID>")

This function only works with a single path at a time and the Dimension name is in a different "branch" of xml nodes to the CubeDimension permissions so it requires 2 queries.
Sep 3, 2015 at 10:49 AM
That's perfect dgosbell! Thanks very much.

Kind regards,