Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tiagostutz/anonymazing
Deadly simple SQL generation based data anonymization command-line utility
https://github.com/tiagostutz/anonymazing
Last synced: 22 days ago
JSON representation
Deadly simple SQL generation based data anonymization command-line utility
- Host: GitHub
- URL: https://github.com/tiagostutz/anonymazing
- Owner: tiagostutz
- License: mit
- Created: 2021-02-21T04:09:01.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-02-22T02:22:15.000Z (over 3 years ago)
- Last Synced: 2023-03-10T20:27:37.692Z (over 1 year ago)
- Language: Go
- Size: 14.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Anonymazing
Deadly simple SQL generation based data anonymization command-line utility
## Overview
For example, given the following data on a Postgres table:
| Name | Email |
| ----------------------------- | --------------------------- |
| Abner Fiorelli Lyara | [email protected] |
| Abner Krystine Tramm Ariadna | [email protected] |
| Abraão Cássio Tallis Ruas | [email protected] |
| Abraão Sthefanny Delmondes | [email protected] |
| Acácia Claudiva Kauane | [email protected] |
| Acácia Craveiro Cecília Silva | [email protected] |
| Acácia Farmácia Victoria | [email protected] |
| Acácia Mickaelle Maboni | [email protected] |
| Acácia Rogéria | [email protected] |
| Acácia Vasco Panuce Fraporti | [email protected] |After running:
```sh
$ ./anonymazing --postgres-connection-string=postgresql://postgres:123456@localhost:5432/my_database?sslmode=disable --database-table=pessoa --database-columns=name,email --output=./anonymizer_script.sql
```The following SQL will be generated at the `anonymizer_script.sql` file.
```sql
UPDATE pessoa SET nome='Tandara Padilha' WHERE nome='Abner Fiorelli Lyara';
UPDATE pessoa SET email='[email protected]' WHERE email='[email protected]';
UPDATE pessoa SET nome='Gaspar Edfisica3 Roberta' WHERE nome='Abner Krystine Tramm Ariadna';
UPDATE pessoa SET email='[email protected]' WHERE email='jayda.o"[email protected]';
UPDATE pessoa SET nome='Claudinei Luna Tozi' WHERE nome='Abraão Cássio Tallis Ruas';
UPDATE pessoa SET email='[email protected]' WHERE email='[email protected]';
UPDATE pessoa SET nome='Raiane Aquino Roque' WHERE nome='Abraão Sthefanny Delmondes';
UPDATE pessoa SET email='[email protected]' WHERE email='[email protected]';
UPDATE pessoa SET email='[email protected]' WHERE email='[email protected]';
UPDATE pessoa SET nome='Janaína Thais Naiara Fantinato' WHERE nome='Acácia Claudiva Kauane';
UPDATE pessoa SET nome='Flávio Fraga Romulo Nicaelle' WHERE nome='Acácia Craveiro Cecília Silva';
UPDATE pessoa SET email='[email protected]' WHERE email='berneice.o"[email protected]';
UPDATE pessoa SET nome='Hariane Santos' WHERE nome='Acácia Farmácia Victoria';
UPDATE pessoa SET email='[email protected]' WHERE email='[email protected]';
UPDATE pessoa SET nome='Marcello Reiter' WHERE nome='Acácia Mickaelle Maboni';
UPDATE pessoa SET email='aron.o"[email protected]' WHERE email='[email protected]';
UPDATE pessoa SET nome='Kelcia Psico2 Arroyane' WHERE nome='Acácia Rogéria';
UPDATE pessoa SET email='[email protected]' WHERE email='[email protected]';
UPDATE pessoa SET nome='Yanca Sartori' WHERE nome='Acácia Vasco Panuce Fraporti';
```## Building
Just as simples as:
```
go build .
```