Quantcast
Channel: SCN : Document List - SAP HANA and In-Memory Computing
Viewing all articles
Browse latest Browse all 1183

Analysing Stats in HANA for Audit or ROI perspective - Part 2

$
0
0

Introduction:

 

This is the second article in the series of Analysing Stats in HANA.  In this article we'll take a deep dive into the details of the HANA models (dimensions, attributes, measures, hierarchy & variables).

 

Here is the link to first part of the series Analysing Stats in HANA for Audit or ROI perspective.

 

 

2. HANA Model: List of Dimensions, Attributes, Measures, Hierarchies & Variables

 

To report various details of the HANA models, we need to explore the following tables under _SYS_BI schema.

 

  • BIMC_ALL_CUBES: General info (ID, Description, Last updated by etc.) of the Attribute, Analytic and Calculation View
  • BIMC_DIMENSIONS: Dimensions of the Analytic & Calculation Views
  • BIMC_PROPERTIES: This is the most important views to explore details. This has the details of attributes, measures, hierarchies
  • BIMC_VARIABLE: Variables (also Input Parameter) details.
  • BIMC_VARIABLE_ASSIGNMENT: Variable assignments (if static list values has been defined for variable)

 

Building the Models:

 

Step 1:  Understanding the dataset: Please spend some time exploring each of the above tables. Follow the table entries for some of the attribute views, analytic view and calculation views you have created. It may be a good idea to create some attribute, analytic and calculation views for the sole purpose of understanding the relation of the dataset in these tables.

 

Step 2:Enhancing the dataset: For easy modelling, I wanted to remove the characters '[]' from the DIMENSION_UNIQUE_NAME column, So I created an auto-generated column.

 

-- Define a Dimension Column

altertable"_SYS_BI"."BIMC_PROPERTIES"

ADD (DIMENSION_NAME VARCHAR(512) generated always asLTRIM(RTRIM(DIMENSION_UNIQUE_NAME,']'),'['));

 

Step 3: Building the data model:

 

Model details.png

 

PROJ_ATVIEW:

 

To derive the list of attributes of Attribute View, Use the following filters on BIMC_PROPERTIES

  • COLUMN_FLAG = "Dimension Key Attribute","Dimension Attribute"
  • CUBE_NAME = $ATTRIBUTE

 

 

PROJ_MEASURES:

 

To derive the list of Measures (of Analytic and Calculation view), use the following filters on BIMC_PROPERTIES

  • COLUMN_FLAG = User Attribute
  • DIEMNSION_UNIQUE_NAME = [Measures]

 

 

c. PROJ_HIERARCHY:

 

To derive the list of Measures (of Analytic and Calculation view), use the following filters on BIMC_PROPERTIES

  • TYPE = 0
  • CUBE_NAME <> $ATTRIBUTE
  • DIEMNSION_UNIQUE_NAME <> [Measures]

 

 

PROJ_PROPERTIES ( used in JOIN_ATTRIBUTES)

 

To derive the list of attributes (of Analytic and Calculation view) Use the following filters on BIMC_PROPERTIES

  • COLUMN_FLAG = Dimension Attribute
  • CUBE_NAME <> $ATTRIBUTE
  • DIEMNSION_UNIQUE_NAME <> [Measures]

 

PROJ_DIMENSION:

 

This is used in the JOIN_ATTRIBUTES node. We are using the BIMC_DIMENSION table to read IS_PRIVATE_ATTRIBUTE column, which signifies if the attribute is coming from the Fact table or not

 

PROJ_VARIABLE: To read the definition of variables from BIMC_VARIABLE

 

PROJ_VARIABLE: To read the variable assignment from BIMC_VARIABLE_ASSIGNMENT



Results:

 

1. List of Measures

List of Measures.png


2. List of Attributes of Analytic/Calculation View


List of Attributes.png

 

3. List of Hierarchies

 

List of Hierarchies.png

 

4. List of Variables & Input Parameters

 

List of Variables.png

 

Update: Next article Analysing Stats in HANA for Audit or ROI perspective - Part 3


Viewing all articles
Browse latest Browse all 1183

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>