Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3273

Re: Difference between a view and calculation view

$
0
0

Here's a quick rundown on calculation views:

 

A Calculation View can perform complex calculations not possible with other views and uses SQLScript. It has at least one measure. It is defined as graphical view (modeled with SAP HANA Information Modeler) or scripted view (SQLScript procedures).

 

There are two types of calculation views:

 

1: Graphical View

2: SQL Script

 

Advantages of using a graphical view:

 

1: No SQL/SQL Script coding needed.

 

2: Can consume other Analytical Views, Attribute Views, Calculation Views & tables.

 

3 :Union, Join, Projection nodes provided, enhance existing view functionality.

 

4: With the Graphical view, the user does not need to know SQL language in depth.

 

5: When modelling the graphical view, in the background, there is a CE script being created.

 

 

 

The Graphical calculation view consists of blocks of 4 types:

 

1: Projection is used for selecting particular columns from source table, filtering data and adding calculated columns. A projection improves performance because it narrows the results set. The user can define additional fields in the projection ex: you can preform calculations before aggregation. At every step of the process the user can define calculations, be it in the Analytical view itself, the projection or the output.

 

2: Aggregation is used to aggregate data sets. For each aggregated field you have to choose aggregation type

 

3: Join is used for connecting two data sets row to row using keys and conditions. In Join block you have to specify connecting fields.

 

4: Union is used for combining two data sets with the same fields to one. In Union block for each source field you have to specify destination field. For coding Calculation views you can use classic SQL Script or highly optimized Calculation Engine functions -Calculation Engine functions should not be mixed with standard SQL statements due to better optimization and parallelization. CE functions usually show much better performance results than calculation view via classic SQL Script.

 

For a lot of SQL constructions you can find more effective CE functions alternatives. So to sum it up, we do not recommended only to use graphical views but due to better optimization and parallelization CE functions usually show much better performance results than calculation view via classic SQL Script.

 

 

I am far from an expert with HANA data modelling and this information may be outdated now with new innovations in SQL and HANA but I hope this helps.

 

Regards,

Michael


Viewing all articles
Browse latest Browse all 3273

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>