SAP Home Learn Build Integrate Model Operate Extend with AI ConnectTutorial navigator Knowledge Graph API Devtoberfest Developer Advocates App Space

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
β€’ Open full site

Create an Anonymized View Using L-Diversity

Add another layer of protection to k-anonymity by using l-diversity to protect sensitive data in SAP HANA Cloud, SAP HANA database.

Overview

🎓 beginner 5 min. SAP HANA CloudBeginnerSAP HANA CloudSAP HANA Database

You will learn

  • βœ”How to create an anonymized view using l-diversity
  • βœ”How to run a sample scenario based on l-diversity
  • βœ”About the advantage of using l-diversity in an anonymized view
Hui Li H Hui Li January 31, 2025
Created by August 29, 2021
Contributors

Prerequisites

Prerequisites

  • It’s recommended that you complete the previous tutorial.
  • If you would like to run the sample scenario, you need a running instance of SAP HANA Cloud, SAP HANA database in trial or production.

Steps

Intro

Disclaimer

In most cases, compliance with data privacy laws is not a product feature. SAP software supports data privacy by providing security features and specific functions relevant to data protection, such as functions for the simplified blocking and deletion of personal data. SAP does not provide legal advice in any form. The definitions and other terms used in this guide are not taken from any given legal source.


Step 1 Introduction to L-Diversity
β€”

Now that you know how to create an anonymized view using k-Anonymity, you will see in this tutorial how to add another layer of protection by complementing it with L-Diversity, which will take into account sensitive data in your dataset.

The K-Anonymity algorithm generalizes quasi-identifiers and makes groups of individuals indistinguishable because they share the same combination of (anonymized) attributes.

If you want to make sure that the sensitive data of the individuals in these groups is sufficiently diverse, you can add l-Diversity to your anonymization. The l-diversity algorithm will refine the groups in which generalization is applied to ensure that a specified number of individuals =L inside a group have different values. For example, if you set the L-parameter to 4, at least 4 people who share the same quasi-identifying values will have different values in sensitive data columns.

As with k-anonymity, you need to prepare your data anonymization strategy to know what columns contain what types of data. If you are unsure about that, it is recommended that you try the previous tutorial.

Step 2 Create an anonymized view using L-Diversity
+
Step 3 Test yourself
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 3
1. Introduction to L-Diversity 2. Create an anonymized view using L-Diversity 3. Test yourself

Learn more →