123456789101112131415161718192021222324252627 |
- def _pseudonymize_csv(
- input_csv_path: str,
- identifier_unit_id_type: Union[str, None],
- measure_unit_id_type: Union[str, None],
- job_id: str
- ) -> str:
- if identifier_unit_id_type and not measure_unit_id_type:
- logger.info('Pseudonymizing identifier')
- return _pseudonymize_identifier_only(
- input_csv_path, identifier_unit_id_type, job_id
- )
- elif measure_unit_id_type and not identifier_unit_id_type:
- logger.info('Pseudonymizing measure')
- return _pseudonymize_measure_only(
- input_csv_path, measure_unit_id_type, job_id
- )
- elif identifier_unit_id_type and measure_unit_id_type:
- logger.info('Pseudonymizing identifier and measure')
- return _pseudonymize_identifier_and_measure(
- input_csv_path,
- identifier_unit_id_type,
- measure_unit_id_type,
- job_id
- )
- else:
- logger.info('No pseudonymization')
- return input_csv_path
|