Audit Cube View column/row sharing

Harry
New Contributor II

Hi,

Is there a way to audit (in a report...) for all cube views, which one refers to a column or row cube view template ? 

Harry_0-1657183981579.png

Harry_0-1657184486383.png

 

Thanks.

 

Regards,

Harry

1 ACCEPTED SOLUTION

EricOsmanski
Valued Contributor

Hi Harry,

Here is a query you can throw in a Data Adapter and then into a Gird View (or some other component) on a Dashboard to give you a quick look at all the Cube Views in your app and the Column and Row Sharing assignments.

SELECT
Name
,CAST(REPLACE(CAST(CubeViewItem.XmlData AS NVARCHAR(MAX)),'utf-8','utf-16') AS XML).value('(cubeView/cubeViewNameForSharingAllRows)[1]', 'varchar(max)') AS [Cube View Name For Sharing All Rows]
,CAST(REPLACE(CAST(CubeViewItem.XmlData AS NVARCHAR(MAX)),'utf-8','utf-16') AS XML).value('(cubeView/cubeViewNameForSharingAllRows2)[1]', 'varchar(max)') AS [Cube View Name For Sharing All Rows 2]
,CAST(REPLACE(CAST(CubeViewItem.XmlData AS NVARCHAR(MAX)),'utf-8','utf-16') AS XML).value('(cubeView/cubeViewNameForSharingAllCols)[1]', 'varchar(max)') AS [Cube View Name For Sharing All Columns]
,CAST(REPLACE(CAST(CubeViewItem.XmlData AS NVARCHAR(MAX)),'utf-8','utf-16') AS XML).value('(cubeView/cubeViewNameForSharingAllCols2)[1]', 'varchar(max)') AS [Cube View Name For Sharing All Columns 2]
FROM CubeViewItem

View solution in original post

5 REPLIES 5

NicolasArgente
Valued Contributor

Hi Harry,
The first property you are mentioning is to share columns or rows coming from other cube views. In other words, it is a kind of template to create cube views rows or columns. Then you can open the Object Lookup, and begin typing the desired Cube View Template name, select the Cube View Template, and click Copy to Clipboard. (see design guide page 749).
Hope it helps,
Nic

Connect with me on:
LinkedIn: https://www.linkedin.com/in/nicolas-argente/
Website: https://aiqos.io
If you want to lift yourself up, lift up someone else.

Thanks Nicolas, we are accustomed to create row/column cube views templates to reuse them in cube views...and check where a template is shared... but I was wondering if there was a way to have a comprehensive view that would display in a report all the cube views with a shared row/column template.

Thanks,

Harry

Thanks for the feedback Harry! 

Connect with me on:
LinkedIn: https://www.linkedin.com/in/nicolas-argente/
Website: https://aiqos.io
If you want to lift yourself up, lift up someone else.

EricOsmanski
Valued Contributor

Hi Harry,

Here is a query you can throw in a Data Adapter and then into a Gird View (or some other component) on a Dashboard to give you a quick look at all the Cube Views in your app and the Column and Row Sharing assignments.

SELECT
Name
,CAST(REPLACE(CAST(CubeViewItem.XmlData AS NVARCHAR(MAX)),'utf-8','utf-16') AS XML).value('(cubeView/cubeViewNameForSharingAllRows)[1]', 'varchar(max)') AS [Cube View Name For Sharing All Rows]
,CAST(REPLACE(CAST(CubeViewItem.XmlData AS NVARCHAR(MAX)),'utf-8','utf-16') AS XML).value('(cubeView/cubeViewNameForSharingAllRows2)[1]', 'varchar(max)') AS [Cube View Name For Sharing All Rows 2]
,CAST(REPLACE(CAST(CubeViewItem.XmlData AS NVARCHAR(MAX)),'utf-8','utf-16') AS XML).value('(cubeView/cubeViewNameForSharingAllCols)[1]', 'varchar(max)') AS [Cube View Name For Sharing All Columns]
,CAST(REPLACE(CAST(CubeViewItem.XmlData AS NVARCHAR(MAX)),'utf-8','utf-16') AS XML).value('(cubeView/cubeViewNameForSharingAllCols2)[1]', 'varchar(max)') AS [Cube View Name For Sharing All Columns 2]
FROM CubeViewItem

Harry
New Contributor II

Thank you so much much for sharing Eric .

Regards,

Harry