Create a Calculation View with Differential Privacy in SAP Web IDE
- How to create Calculation View of type Cube using SAP Web IDE
- How to configure differential privacy to add noise to a column
- This tutorial is designed for SAP HANA service for SAP Business Technology Platform. Consider newer tutorials designed for SAP HANA Cloud.
- You have completed the previous tutorials to load data into the table
>**This tutorial cannot be completed with a trial account.**
- Step 1
Create a new folder called models under
db/src. Create a new Calculation View and call it
Click on the
anonymizationnode and then click on the white canvas to drop it.
Use theon the node to add a table as a data source. Choose
- Step 2
Double click on the
Anonymize_1node. This will open the mapping. Double click on
TGT_SALARIESto add all of the columns to the output
Click Details and switch
k-anonymityto Differential Privacy
Configure the following parameters for anonymity
- Sequence Column: ID
- Epsilon: 0.1
- Sensitivity: 15000
- Noised Column: SALARY
For more information about these parameters check the SAP HANA Security Guide
- Step 3
Anonymize_1node to the Aggregation node.
Double-click on the name of the node to move all the fields into the output columns.
Go into the Semantics node and switch
- Step 4
Save and Build the calculation view
Right-click on it and choose Data Preview
Click Raw Data and you will see the anonymized data:
See the negative salaries? The added noise guarantees privacy while keeping sum and average results similar to the original dataset.
Use the Analysis tab and drag the
REGIONfields to the label axis and
IDto the Value axis.
Change the aggregation for
COUNTto answer the question below.
- Step 5
If you have a tenant in SAP Analytics Cloud or a reporting tool such as Analysis for Office, you can configure the SAP HANA Analytics Adapter. The adapter is a Java application that exposes Calculation Views for consumption through Information Access (or
Follow the steps in the following blog post if you want to set up the HANA Analytics Adapter: https://blogs.sap.com/2019/04/24/connecting-the-sap-hana-service-on-cloud-foundry-to-sap-analytics-cloud-the-lazy-approach-pt1/