hana views explained from the eye's of a layman !!

11
10/9/2015 View the HANA Views from different angles | SAP Yard http://www.sapyard.com/viewthehanaviewsfromdifferentangles/ 1/11 View the HANA Views from different angles TOPICS: Analytical View Attribute View Calculation Engine Calculation View Different Types Of Views In SAP HANA Join Engine OLAP STAR Schema POSTED BY: SAP YARD OCTOBER 7, 2015 Views are integral part of data modeling in HANA. But what does View mean to a non-technical person? In the language of relational databases, a View is a virtual table i.e., a table which actually does not store Enter email Subscribe We Respect Your Privacy ! SAP YARD YOUR BACKYARD FOR SAP TECHNICAL TIPS AND SOLUTIONS HOME SEE ALL POSTS ASK YOUR QUESTIONS ABOUT ME CONTACT ME

Upload: sapyard

Post on 14-Feb-2017

1.727 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: HANA Views explained from the eye's of a layman !!

10/9/2015 View the HANA Views from different angles | SAP Yard

http://www.sapyard.com/viewthehanaviewsfromdifferentangles/ 1/11

View the HANA Views fromdifferent anglesTOPICS: Analytical View Attribute View

Calculation Engine Calculation View

Different Types Of Views In SAP HANA Join Engine

OLAP STAR Schema

POSTED BY: SAP YARD OCTOBER 7, 2015

Views are integral part of data modeling in HANA. Butwhat does View mean to a non-technical person?

In the language of relational databases, a View is avirtual table i.e., a table which actually does not store

Enter email

Subscribe

We Respect Your Privacy!

SAP YARDYOUR BACKYARD FOR SAP TECHNICAL TIPS AND SOLUTIONS

HOME SEE ALL POSTS ASK YOUR QUESTIONS ABOUT ME CONTACT ME

Page 2: HANA Views explained from the eye's of a layman !!

10/9/2015 View the HANA Views from different angles | SAP Yard

http://www.sapyard.com/viewthehanaviewsfromdifferentangles/ 2/11

any data physically, but shows you data derived fromone or more other tables.

Views allows logical cross-sections of data to begenerated in response to the needs of specificapplications, so that the required data can be directlyand efficiently accessed.

What are the different types of Views in SAPHANA?1. Attribute View2. Analytic View3. Calculation View

Before we go into the nitty-gritty of these types ofViews, let me throw a simple question. Why do weneed these three types of views? Let your brain do somechurning..

Have you heard the argument, from which side (USA orCanada) does the Niagara Fall look better? Oops,what relation does Niagara have with HANA Views..

Why do some folks visit Niagara from the US side whilesome take the trouble to go to Canada and why somevisit it from both sides?

Answer is to ‘View’. Yes, View it from differentangles. View it as per ones choice/ecstasy and performcertain activity along with the View.

If you want to get the gorgeous panorama of theAmerican Falls along with the mighty Horseshoe Falls,then Canadian side of view should be your choice.

But, if you want a cheap parking area and opportunityto get close and personal with the waterfalls (includingAmerican and Bridal Veil Falls, Cave of the Winds),then American side is your bet.

If you want to spend some more buck, then you might

You like this

SAP Yard202 likes

Liked

RECENT POSTS

View the HANA Views fromdifferent anglesDisable UserPersonalization in WebDynpro ScreenLet’s Web Dynpro. Part VIISAP HANA at Ground ZeroSAP HANA from SpaceLevelDelete Foreign Lock Entriesin DebugCreate & Change Variantswithout Fire Fighter

SEARCH …

Page 3: HANA Views explained from the eye's of a layman !!

10/9/2015 View the HANA Views from different angles | SAP Yard

http://www.sapyard.com/viewthehanaviewsfromdifferentangles/ 3/11

want to be little more adventurous and take the ‘Maidof the Mist Boat’ and get the closer detailed View ofthe Fall, which you would not get by just standingnear the edge of the Fall.

The ‘data’ is same i.e. ‘Niagara Fall’. But you viewand appreciate it according to your need, accessibility,choice and preference.

Similarly, we use the Attribute, Analytic andCalculation Views, according to our need, requirementand what we want to do with the data and what we wantto see, show and report.

Also Read : SAP HANA from Space Level

Let’s get back to work after our excursion to Niagara.

Attribute View:If you want to see only text and numeric characters(not quantity/amount), then Attribute is your view.Usually in SAP, the material number or customer id orvendor id are present in one master table and theircorresponding texts like name, address, contactinformation are there in different table. For example,material id is in MARA, while material description isin MAKT table. When you want to join these two mastertables to display the dimensions (textattributes/characteristics) of the material number,Attribute Views are created.

Please do not confuse numeric characters to numberslike quantity, amount, currency value.Material/Vendor/Customer number may be ‘1000101’,but it is still character/text (NUMC). So, you can use

SQL Server PerformanceIdentify Bottlenecks & Wait Types. DBA Performance Tools. Free Trial.

Page 4: HANA Views explained from the eye's of a layman !!

10/9/2015 View the HANA Views from different angles | SAP Yard

http://www.sapyard.com/viewthehanaviewsfromdifferentangles/ 4/11

them in Attribute view. Attribute view can also be madeto view transactional data but it does not make sense tohave an Attribute view of non quantifiable transactionalfields.

Numbers are not for Attribute View.

Analytic View:If you want to play with numbers, quantities andcurrencies, then Analytic View should be your choice.G/L amount 1,000,101.00$ is for Analytic View. POquantity 10.00 EA of value 4500.00 $ is also forAnalytic View.

According to SAP, Analytical views are themultidimensional views that analyze values from thesingle fact table (like sales, deliveries, accounting etc)which contains transactional data. In simple word,Analytic view is typically used for analyzingnumerical data and figures.

But, numbers alone do not make sense. If the retailsshop says, 143.00$ value was sold, it does not give anyrelevant info. But it they tell, 143.00$ worth ofmaterial id ‘PV10001’, material name ‘PVC Pipes 1 in’were sold to customer id ‘900499’ customer name‘SAPYard Groups’.

In the above hypothetical example, 143.00$ is themeasure or fact or transactional data, while material id‘PV10001’, material name ‘PVC Pipes 1 in’andcustomer id ‘900499’ and customer name ‘SAPYardGroups’ are dimensions, characteristics or attributedata.

Page 5: HANA Views explained from the eye's of a layman !!

10/9/2015 View the HANA Views from different angles | SAP Yard

http://www.sapyard.com/viewthehanaviewsfromdifferentangles/ 5/11

Fact Table + Attribute Views  and/or Tables = AnalyticView 

Again, Attribute View might contain material id andname. Similarly, vendor id and name can be anotherAttribute View.

So, we can safely say, Analytic view can be derivedfrom a fact table along with single table or joinedtables and attribute views.

Analytic views are highly optimized for aggregating massdata.

Calculation View:If you are ready to go an extra mile and do somecomplicated and/or simple calculations/mathematics(usually custom), then Calculation View should beyour area of play. Say, you want to calculate thenet value of the PO (4500.00$) after giving a 10.00percent discount, then you need to do somemathematics (4500 – (10/100*4500)) to get a figure of4050.00$.

Calculation views can be referred as combination oftables, attributes views, analytical views and even othercalculation views to deliver a complex businessrequirement. Calculative View can logically link two ormore Analytic Views.

Usually, when the modeling requirement cannot be metusing attribute view and analytical view, or when we

Page 6: HANA Views explained from the eye's of a layman !!

10/9/2015 View the HANA Views from different angles | SAP Yard

http://www.sapyard.com/viewthehanaviewsfromdifferentangles/ 6/11

need to use two or more analytical view and derive aresultant set, Calculation view comes into picture.

Just like attribute view has a limitation of using non-numeric data, similarly, one analytical view cannotconsume another analytic view. When we have acomplex need to use multiple analytic view, thenCalculation view is the only respite.

In simple terms, Calculation View are view with SQLScript inside (with the calculation logic). It hasGraphical & Script based editor.

Hope with the above explanations, you would be in aposition to defend, why HANA has these three types ofView.

Also Read : SAP HANA at Ground Zero

SAP coined the Views very smartly using their literalmeaning.

Attribute = Characteristic/Dimension/Trait =>Master Data (Material/Customer/Vendor etc. Doesnot change very often)

Analytic = Fact/Measure/Quantity/Numbers =>Transaction Data (Sales Orders/PurchaseOrders/Delivery Quantity/Accounting Documents etc.Gets created and changed everyday. The data setgrows at a faster rate)

Page 7: HANA Views explained from the eye's of a layman !!

10/9/2015 View the HANA Views from different angles | SAP Yard

http://www.sapyard.com/viewthehanaviewsfromdifferentangles/ 7/11

Calculation = Mathematics/Derived Numbers =>Custom Calculated Data (Find the net price afterdeducting the tax)

With the above fundamental, you might have somequality doubts and questions like below.

Q. Why should we link attribute view totransactional table (fact) to create Analytic view?What is the advantage? Why not just join tablesdirectly to transactional table?A. Yes, technically, we can join tables directly to facttables. But creating Attribute view has more advantagesand HANA adovcates modelling objects like attributeviews instead of tables.

Reasons:i) Reusability: Attribute views are reusable buildingblocks and would be useful in future developments. .

ii) Maintenance: Any change in the dimension orcharacteristic of the field in Attribute view would flowdownstream to all developed objects and models. Wedo not need to change/update each and everydevelopment.

iii) Coherence : If we always use attribute viewinstead of adding the base tables, we can ensure thatall our developments are coherent.

iv) Analysis: HANA does not have ‘where-used’search to find the tables. But we can do the ‘where-used’ of HANA modeling objects. So, it is easier to findthe views and then figure out the tables when wewant to do some analysis or investigating something.

Q. Can there be calculative field/column inAnalytical View or Attribute View?A. Yes, we can. But any Attribute/Analytic Viewcontaining a calculation attribute would automatically

Page 8: HANA Views explained from the eye's of a layman !!

10/9/2015 View the HANA Views from different angles | SAP Yard

http://www.sapyard.com/viewthehanaviewsfromdifferentangles/ 8/11

become a Calculation View.

Q. Attribute Views do not store data, then howdoes it display the output?A. When Attribute Views are called for output, theJoin Engine takes care of processing the data andproviding the output.

Q. Which engine is responsible for Analytic View?A. OLAP (Online Analytical Processing) engineprocesses the Analytical View.

Q. How does Calculation View work?A. Once the Calculation view is successfullygenerated, a column view is generated in _SYS_BICSchema. This column view is available to HANAreporting tools.

Q. Is Calculation View directly available forreporting?A. No. But, Calculation view can be made available forreporting, by enabling MultiDimensional Reportingunder the Semantics section. Once it is enabled, theexecution occurs using CE (Calculation Engine)functions in the Index Server at the database level.

Q. Between Calculation View and Analytic View,which view has better performance?A. Analytic View. Calculation View is executed in CE(Calculation Engine) while Analytic View in OLAP.Calculation View is not as fast as an Analytical View.Please note:Analytic views with calculated attributes and Calculationviews both run in Calculation Engine.Analytic Views (without derived columns or calculatedcolumns) use the OLAP Engine

Q. Views analogy with SAP BW terminologyA. Attribute View is like BW Dimension which can bereused throughout the system and not just one model.

Page 9: HANA Views explained from the eye's of a layman !!

10/9/2015 View the HANA Views from different angles | SAP Yard

http://www.sapyard.com/viewthehanaviewsfromdifferentangles/ 9/11

Info Cubes or Info Sets in SAP BW are the closestcousins to Analytic View.

Q. Analytic view can have attribute view. So willthe join engine of attribute would trigger or OLAPof analytic view?A. During activation of the analytic views, the joins inthe attribute views get ‘flattened’ and included in theanalytic view run time object. Only the OLAP enginewill be used thereafter.

The famous Engine diagram to conclude this post.

Hopefully by now, you have your free HANA CloudPlatform access along with Eclipse. If not, refer to ourearlier post to set it up in simple steps. In the nextpost, we would use all these theories and performhands on exercise on the different views.

If you want to get practical issues and resolutionsstraight to your inbox, please SUBSCRIBE. We respectyour privacy and take protecting it seriously.

If you liked this post, please hit the share button atthe left side of your screen.

Thank you very much for your time!!

Series on SAP HANA

Page 10: HANA Views explained from the eye's of a layman !!

10/9/2015 View the HANA Views from different angles | SAP Yard

http://www.sapyard.com/viewthehanaviewsfromdifferentangles/ 10/11

BE THE FIRST TO COMMENT

ON "VIEW THE HANA VIEWS FROM DIFFERENT ANGLES"

1. SAP HANA from Space Level

2. SAP HANA at Ground Zero

3. View the HANA Views from different angles

4. ‘ABAP for SAP HANA’ Points to remember

to be updated..

 

 

Image source : http://www.world-of-waterfalls.com/

Previous post

Leave a commentYour email address will not be published.

Name *Friend

Email *[email protected]

Website

Comment

Page 11: HANA Views explained from the eye's of a layman !!

10/9/2015 View the HANA Views from different angles | SAP Yard

http://www.sapyard.com/viewthehanaviewsfromdifferentangles/ 11/11

Post Comment

COPYRIGHT 2015 | SAPYARD BY WWW.SAPYARD.COMALL PRODUCT NAMES ARE TRADEMARKS OF THEIR RESPECTIVE COMPANIES. SAPYARD.COM IS NOT AFFILIATED TO SAP AG.