SAP HANA Information Views
- One way of approaching the code-to-data paradigm is to make use of view modelling capabilities through SAP HANA column views. Modelling such views lead to more reusable results and less programming.
- If the computations are too complex to be modeled using SAP HANA views, an alternative approach is to implement by using the store procedure in SAP HANA SQL script.
- Modeling views (Information views) are used to create the virtual data model based on the data that resides in the SAP HANA database.
- The purpose of modeling views is to organize the data from the individual transnational tables, and to perform the variety of data calculation, in order to get the meaningful set of measures and dimensions/attributes to answer the specific reporting need.
- These modeling views can be consumed via Java or HTML based applications or SAP HANA native applications. You can also use SAP tools like SAP Lumira or Analysis Office to directly connect to HANA and report modeling views. It is also possible to use 3rd party tools like MS-Excel to connect to HANA and create your report.
- At run-time these views make implicit use of optimized SAP HANA In-Memory calculation engines and thus enable for best performance.
- HANA Data Modeling is only possible for Column Tables i.e. Information Modeler only works with column storage tables.
Attribute View:
- Attribute views are dimensions, BW characteristics or master data.
- In most cases used to model master data like entities (like Product, Employee, Business Partner)
- Highly re-used and shared in Analytic- and Calculation Views
- May contain filters
- May have columns with simple calculation
Example: An attribute view "FLIGHT" can show together Airline Code, Airline Connection Number and flight Date into one Object. This attribute view can be used in analytic and calculation views where entities are relevant.
Generally attribute views represent master data. But, however technically there is no restriction and it's possible to make attribute views on transaction data.
Analytic View:
- Analytic views are fact tables that join with attribute views.
- In the language on SAP BW analytical views can be roughly compared with Info Cubes or Info Sets.
- 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.
Calculation View:
- Calculation views are composite views used on top of analytical and attribute views.
- It can perform complex calculations not possible with other views.
- Can be created graphically or based on script (SQL Script, CE Functions).
- SAP HANA supports 3 main types of Graphical Calculation Views:
- Dimension:
- Equivalent to an attribute view.
- Dimension calculation views do not allow measures. Any numeric columns will be treated as attributes.
- Default upper node is Projection (can be reduced by grouping or filtering).
- Cube:
- Designed for data analysis with multidimensional reporting.
- Default upper node is Aggregation. The column engine supports aggregation expressions (MIN/MAX/COUNT/SUM/AVERAGE...)
- Cube with Star Join:
- Similar to Cube Calculation View but the upper node is Star Join where you join all the attributes (Dimension)
You want to create your first calculation view to grasp this concept better, refer to this article: http://sap-evernotes.blogspot.com/2016/08/build-your-first-graphical-calculation.html
Caution: Attribute Views and Analytic Views are now deprecated and replaced by Dimension Calculation View and Cube with Star Join Calculation View correspondingly.
From ABAP Application, you can access a view by execute this SQL statement:
SELECT carrid, connid, fldate, cat_seatsocc
FROM _SYS_BIC."yha400.secdb.demo/AT_BOOKINGS_COUNT"
WHERE mandt = '800'
_SYS_BIC: schema
yha400.demo: full package path
AT_BOOKINGS_COUNT: views
* Use "" if view or packages names have lower case characters
Consuming SAP HANA Views using Native SQL
SELECT carrid, connid, fldate, cat_seatsocc
FROM _SYS_BIC."yha400.secdb.demo/AT_BOOKINGS_COUNT"
WHERE mandt = '800'
_SYS_BIC: schema
yha400.demo: full package path
AT_BOOKINGS_COUNT: views
* Use "" if view or packages names have lower case characters
SAP HANA Modeling View Processing
SAP HANA has mainly 3 types of engines that are used based on the views required by the model.
Join Engine: Used for Attribute Views, Dimension Calculation View (without numeric columns)
OLAP Engine: Used for Analytic Views, CUBE Calculation Views (with calculated columns)
Calculation Engine: Used for Analytic views with calculated attributes, Calculation views
No comments:
Post a Comment