Thursday 21 September 2017

SAP HANA: Analytic View

What is Analytic View?

            Analytic View is basically used to represents star models in HANA where the fact table is surrounded by different dimensions (master data). Analytic View is best suited for the scenarios where we need aggregated data from underlying tables that contain large data sets.
In SAP HANA Analytic view, dimension table is joined with the fact table that contains transaction data.
A dimension table contains descriptive data. (E.g. Product, Product Name, Vendor, customer, etc.). Fact Table contains both descriptive data and Measureable data (Amount, Tax, etc.).
SAP HANA Analytic view forms a cube-like structure, which is used for analysis of data.
Analytic views leverage the computing power of SAP HANA to calculate aggregate data, e. g., the number of bikes sold per country, or the maximum power consumed per month.
Optionally, attribute views can also be included in the analytic view definition. In this way, you can achieve an additional depth of attribute data.
You can model the following elements within an analytic view:
1.      Columns
2.      Calculated Columns
3.      Restricted Columns
4.      Variables
5.      Input Parameters
Node:
In the Semantics node, you can classify columns and calculated columns as type attributes and measures. The attributes you define in an analytic view are Local to that view. However, attributes coming from attribute views in an analytic view are Shared attributes.
You can choose to further fine-tune the behavior of the attributes and measures of an analytic view by setting the properties as follows:
·         Filters to restrict values that are selected when using the analytic view.
·         Attributes can be defined as Hidden so that they are able to be used in processes but are not viewable to end users.
·         The Drill Down Enabled property can be used to indicate if an attribute is available for further drill down when consumed.
·         Aggregation type on measures
·         Currency and Unit of Measure parameters (you can set the Measure Type property of a measure, and also in Calculated Column creation dialog, associate a measure with currency and unit of measure)

Creating an Analytic View:


Step 1: Right-click on your package select New and select Analytic View. And Provide the details and click OK.

Step 2: Drag and Drop the required tables in a Data foundation.

Step 3: Here, I used the “TH_EMP_SALARY” Table and EMPLOYEE_DETAILS Attribute View. And make a join between them by using their relationship. Here I make a link based on “EMP_ID”.
Step 4: Click validate and Activate the view.
Step 5: Data Preview result


1 comment: