af.controller.anonymization package

Submodules

af.controller.anonymization.PreProcessingStage module

class af.controller.anonymization.PreProcessingStage.PreProcessingStage(data_config)[source]

Bases: object

Class used by the BaseAlgorithm to prepare the complete scenario before anonymizing.

clean_previous_work()[source]

If an anonymized db from a previous session exists, then delete it. db_location contains the path where the new db will be created

create_additional_information_table()[source]

Each algorithm that transforms the data, can leave related information about the process. This information is to be saved on a new table on the same db file.

create_db_copy()[source]

Takes the original DB and creates a new copy ready to be manipulated and modified. It preserves the state of the db with the raw data.

initial_db_location: contains the original path to the raw db. controller: given the original db extension, it creates an instance of a db controller capable of querying the db.

preprocess()[source]

Method that calls all the necessary steps before a data transformation

remove_identifiable_attributes()[source]

Given a list of identifiable attributes, it suppreses them, as they are forbidden to appear in any form once the data is anonymized.

identifiable_list: contains all those attributes from the data config that were selected as Identifiable. supression_value: default string based on the supression node (‘******‘) query: simple update query, to set values to supression_value for all identifiable attributes.

set_indexes_over_qi()[source]

In order to make queries more efficients, we set indexes over each attribute selected as Quasi-identifable, and a composite index over all of them.

Module contents