SAP HANA Information Modeling or the SAP HANA Data Modeling is the core of HANA application development. To create a meaningful report, one can develop modeling views on upper part of database tables and execute business logic. Through Java or HTML based applications or SAP HANA native applications, these modeling views can be used up. SAP Lumira or Analysis Office can be used or third party tools such as MS-Excel can be used to connect to HANA directly and report modeling views.
SAP HANA Modeling
The user refines or slice data in the database table by making information view, basis the business scenario in the SAP HANA Modeling activity. For reporting and decision-making purpose, this information views are used.
To create a model for a business scenario, information view is made from several combinations of content data.
In information view, two types of content data are found:
- Attribute: Attribute is the Non-Measureable and descriptive data. Vendor ID, Vendor Name, City, etc. are some of the examples of attribute.
- Measure: Measure is the type of data that is calculated and quantifiable. Revenue, Quantity Sold and Counters are some of the examples of measure. From analytic and calculation view, the measure is derived. In Attribute view, the measure cannot be created.
Types of Attribute
Three types of attributes are supported by SAP HANA:
- Simple Attribute: From data foundation, simple attribute is derived.
- Calculated Attribute: From one or more existing attributes and constants, calculated attribute is derived. Some of the examples include Arithmetic calculation or from the first and last name, derive the full name.
- Local Attribute: For customizing the behavior of attribute, local attribute is used inside modelling views (analytic View / calculation view). Thus, it cannot be accessed from outside of Modelling view and is local to Modelling view.
Types of Measure
Four types of measures are supported by SAP HANA
- Simple Measure: From data foundation, simple measure is derived.
- Calculated Measure: From one or more exiting measure, constants and function, calculated measure is derived. E.g. Arithmetic calculation.
- Restricted Measure: To filter value based on user-defined rules for attribute values, restricted measure is used.
- Counter: Unique number for attributes Columns (Analytic View/ Calculation View) are displayed by this Special type of the column. To count the one or more attributes columns, counter is used.
Three types of Information Views are there namely:
Read more about Steps to Download and Install SAP HANA Studio
- 1. For master data context, this information view is used.
- 2. These are BW characteristics, dimensions, or master data.
- 3. To link to a dimension, attribute views are used.
- 4. To model master data similar to entities (like Product, Employee, Business Partner) attribute views are used.
- 5. In Analytic- and Calculation Views, these are highly re-used and shared.
- 1. For creating fact tables and similar to Cube of BW, the analytic view is used.
- 2. These are fact tables bounded by extents or star schemas, calculations or restricted measures.
- 3. With Info Cubes or Info Sets, SAP BW analytical views can be compared approximately.
- 4. It influence the computing power of SAP HANA to estimate aggregate data, such as the quantity of cycles sold per country, or the maximum electricity consumed per month.
- 5. To execute star schema queries, analytic view is particularly designed.
- 1. For creating a complex view and similar to multiple Provide in BW, calculation view is used.
- 2. These are complex views used on top of analytical and attribute views.
- 3. Complex calculations are performed by the calculation view along with the other two views.
- 4. Basis in what way they are created, calculation view can be described as either graphical views or scripted views. Using the graphical modeling features of the SAP HANA Modeler, graphical views can be modeled while scripted views are made as categorizations of SQL statements.
- 5. Different analytical views are combined by the calculation views into one source of data for reporting.
These views at run make embedded use of enhanced SAP HANA In-Memory calculation engines. This enables best performance. For Column Tables i.e. Information Modeler, HANA Data Modeling is only possible as it works with column storage tables.
Privileges are required by user in order to work in SAP HANA. Listed below are the privileges required for SAP HANA Modelling –
Privileges Required for Modelling
Security to SAP HANA database can be received from the privileges. This helps the authorized user to get access only to the authorized content.
For providing read/write access on database objects, the SQL privileges such as object privileges are used. For Modelling, the below given object privileges are needed:
- On _SYS_BI Schema, privilege is selected.
- On _SYS_BIC Schema, privilege is selected.
- On REPOSITORY_REST (SYS), privilege is executed.
- On Table Schema, privilege is selected.
Read more about Step-by-Step Guide of SAP HANA Modeling
To authorize action on individual packages, package privileges are needed. For data modeling, listed below are the package privileges that are needed:
- On Root Package REPO.MAINTAIN_NATIVE_PACKAGES privilege are used.
- For Content Objects, REPO.READ, REPO.EDIT_NATIVE_OBJECTS & REPO.ACTIVATE_NATIVE_OBJECTS on package are used.
View Analytic Privileges are needed to access SAP HANA Information.
- "_SYS_BI_CP_ALL" analytic privileges are needed in SAP HANA System for Full data access to all information view. The analytic privileges should be created and assign to the user for restricted data access.
- Provide Grant on Own Schema to _SYS_REPO user as 'GRANT SELECT ON SCHEMA " Schema name" TO _SYS_REPO WITH GRANT OPTION';
- For creating delivery Units use REPO.MAINTAIN_DELIVERY_UNITS.
- For Import / Export of delivery Units use REPO.IMPORT, REPO.EXPORT.
- For work in foreign workspaces use REPO.WORK_IN_FOREIGN_WORKSPACES.
SAP HANA Join Types
To Join table and information view and select values, Join in SAP HANA is used as per the requirement.
To Join SAP HANA tables, following types of Join method are used-
- INNER JOIN
- LEFT OUTER JOIN
- RIGHT OUTER JOIN
- FULL OUTER JOIN
- REFERENTIAL JOIN
- TEXT JOIN
SAP HANA Modeling View Processing:
3 types of engines are used based on the views required by the model.
- Join Engine: For Attribute Views, this is used.
- OLAP Engine: For Analytic Views (without calculated columns), this is used.
- Calculation Engine: For Analytic views with calculated attributes, Calculation views, this is used.
Thus, if want to know more on SAP HANA, it is better to have an idea of the SAP HANA modeling before proceeding.
Read more about Steps to Add New HANA System in SAP HANA Studio