Calculation views
Calculation views are HANA’s primary, flexible modeling artifact: reusable views that combine, aggregate and transform data with high performance. They are the workhorse of native HANA data modeling.
Calculation views are consumed by SQL, reporting tools and applications.
- A calculation view defines a data model, sources, joins, aggregations, calculated columns, filters, that HANA executes efficiently…
- Layer calculation views (reusable base views consumed by higher ones), push filters and aggregation down toward the sources…
- Dimension: master-data-like, for attributes/lookups.
- Watch out: Monolithic views instead of layered/reusable.
What a calculation view is
A calculation view defines a data model, sources, joins, aggregations, calculated columns, filters, that HANA executes efficiently in-engine. Modern HANA unifies the older attribute/analytic view types into calculation views, which can be built graphically (a flow of nodes) or with SQLScript for complex logic.
Dimension vs cube (data category)
- Dimension: master-data-like, for attributes/lookups.
- Cube (with star join): analytical, with measures and aggregation, for reporting.
Building well
Layer calculation views (reusable base views consumed by higher ones), push filters and aggregation down toward the sources, minimise expensive joins, and expose only needed columns. Good design keeps them fast and reusable; poor design (huge single views, late aggregation) makes them slow.
Consumption and CDS
Calculation views are consumed by SQL, reporting tools and applications. In the SAP application world, CDS views are often preferred for application data (they integrate with ABAP and generate optimised HANA execution), while calculation views serve broader native-HANA and data-warehouse scenarios.
Common pitfalls
- Monolithic views instead of layered/reusable.
- Late aggregation hurting performance.
- Exposing unnecessary columns/joins.