In the area of data modeling on the SAP HANA database, many users benefit from the ability to use calculation views. Here the data model is implemented using a graphic modeling. As soon as a calculation view has been created and activated, it can still be used as a data provider/source (e.g. as a source in a composite provider)..
It has proven effective when modeling a calculation view not to use the predefined structure of a calculation view, but instead to add an aggregation/projection and a union behind the semantics/aggregation/projection (see Figure 2).
This allows the developer to filter attributes directly in the “Aggregation_1“ later when running or testing the calculation view for testing and debugging purposes. But now we will see why the union makes sense. One major problem in the modeling of calculation views is changes or extensions of the model. Here we’re not talking about a simple name change, or the addition/removal of an attribute or the creation/change of a calculated column. The problems arise when adding or extending the model with new data or when removing a join. For example, here the mapping in Figure 1 would be deleted and all the names and aggregations would be lost, resulting in a creation of a new name or the change of a name (see Figure 3).
By using the union mentioned above, although the mapping and the union of “2_18_Join” is deleted, the upward structure remains and does not have to be renamed or edited (see Figure 4).
Over time, inserting the union mentioned above has proven effective in avoiding extra work when making changes. For newly developed products, it therefore always makes sense to create unions the same way as a buffer between individual joins.
This process is useful and makes sense for newly developed products, but what can the developer do for previously existing calculation views that were not modeled this way and need to be changed? An answer is provided in the second part of this blog, where we show how you can greatly simplify or get around the new modeling and mapping.