With the release of SAP Web IDE SPS07 and HANA 2.0 SPS07, new features in the area of calculation view modeling will become available that had only been released in SAP HANA Cloud before.
Below is a short description of newly released features. For examples of the individual features have a look at the respective project “SPS07_Selected_Calculation_View_Modeling_Features” that can be found here.
Comments in Expressions
Use comments in expressions to better document the intention behind expressions. This will help during later refactoring and improve collaborative working.
Comments can be entered using one of the two styles:
/* comment */
-- comment
Calculation View Snapshots
In tab “Snapshots” you can define individual queries for calculation views. Based on these queries procedures are generated that create, drop and insert into snapshot tables:
This provides a flexible means to store the results of a query at a certain point in time. The life-cycle of these procedures is controlled by the calculation view.
In addition, a calculation view can be generated to easily toggle between online and snapshot data:
With snapshots an easy and flexible option exists to reduce resource consumption and to speed up queries if slightly outdated data are acceptable. See the modeling guide and performance guide for developers for more information.
Median Aggregation
Mask columns based on session user
Masking of columns can be done based on the user who is calling the calculation view which contains the mask definition or based on the session user which is running the SQL query.
In a stacked scenario, the calling user will be the owner of the including calculation view while the session user will be the user who runs the SQL query.
To switch between the different modes, use the view-global setting Mask Mode:
With the new option to mask based on the session user, masking in stacked scenarios becomes significantly easier.
System-Versioned and Application-Time Tables
When using system-versioned or application time-period tables in calculation views, the resulting data can be filtered by certain timestamps or time periods. The relevant selection criteria can be defined for each individual data source using constants, expressions, or input parameters.
This simplifies time-traveling analytics with focus on data as of a certain time-point or period.
Fill time tables using SQL statements
CREATE SCHEMA TIMEDATA;
CALL SYS.UPDATE_TIME_DIMENSION('DAY',2018,2025,0,'TIMEDATA','DAY_GRANULARITY_2018_2025',?);
A similar procedure can be used to fill the fiscal calendar: SYS.UPDATE_FISCAL_CALENDAR.