Saturday 9 March 2013

SAP HANA MODELING VIEWS


SAP HANA Modeling Views

Before we continue to discuss how to model in SAP HANA, first it is important to understand each of 
the differing SAP HANA modeling view types and their capabilities.

Attribute Views

Attribute views are used to give master data tables context. This context is provided by text tables 
which give meaning to the master data. For example, if our fact table or analytic view only contains 
some numeric ID for each car dealer then we can link in information about each dealer using an 
attribute view. We could then display the dealers’ names and addresses instead of their IDs thus 
providing the context for the master data table. 
Attribute views are used to select a subset of columns and rows from a data table. As it is of little use 
to sum up attributes from master data tables there is no need to define measures or aggregates for 
attribute views.

You can also use attribute views to join master data tables to each other, e. g. joining “Plant” to 
“Material”.

Analytic Views -----

Analytic views are used to build a data foundation based on transactional tables. You can create a 
selection of measures (sometimes referred to as key figures), add attributes and join attribute views.
Analytic views leverage the computing power of SAP HANA to calculate aggregate data, e. g. the 
number of sold cars per country, or the maximum power consumption per day. They are defined on 
at least one fact table, i. e. a table which contains e. g. one row per sold car or one row per power 
meter reading, or more generally speaking, some form of business transaction records. Fact tables 
can be joined to allow access to more detailed data using a single analytic view. Analytic views can be 
defined on a single table, or joined tables.
Analytic views can contain two types of attributes (or columns), so-called measures and normal 
attributes. Measures are attributes for which an aggregation must be defined. If analytic views are 
used in SQL statements (see below) then the measures have to be aggregated e. g. using the SQL 
functions SUM(<column name>), MIN(<column name>), or MAX(<column name>). Normal attributes 
can be handled as regular columns. For them there is no need to be aggregated


Calculation Views

Calculation views are used to provide composites of other views. They are essentially a view which is 
based on the result of an SQLScript. These scripts can join or union two or more data flows or invoke 
built in Calculation engine or generic SQL functions.
Calculation views are defined as either graphical views or scripted views depending on how they are 
created. They can be used in the same way as analytic views, however, in contrast to analytic views it 
is possible to join several fact tables in a calculation view. Calculation views always have at least one 
measure. 
Graphical views can be modeled using the graphical modeling features of the SAP HANA Information 
Modeler. Scripted views are created as sequences of SQLScript statements. In essence they are 
SQLScript procedures with certain propertie







1 comment: