Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#24 - Smarter anonymization #33

Merged
merged 6 commits into from
Jul 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 9 additions & 65 deletions .driver/anonymize.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ anonymize:
street: 123 Main Street
city: Kansas City
postcode: 66073
region: Missouri
country_id: US
region_id: 36
phone: 202-555-0109
ip: 240.36.159.75

Expand All @@ -17,9 +14,6 @@ anonymize:
street: 2475 Cinnamon Lane
city: San Antonio
postcode: 78201
region: Texas
country_id: US
region_id: 57
phone: 202-555-0156
company: Superior Products
ip: 181.226.219.191
Expand All @@ -29,9 +23,6 @@ anonymize:
street: 3931 Jessie Street
city: Arabia
postcode: 45688
region: Ohio
country_id: US
region_id: 47
phone: 202-555-0184
company: SwipeWire
ip: 78.223.172.48
Expand All @@ -41,9 +32,6 @@ anonymize:
street: 184 James Street
city: New York
postcode: 14450
region: New York
country_id: US
region_id: 12
phone: 202-555-0135
company: SecureSmarter
ip: 203.54.176.154
Expand All @@ -53,9 +41,6 @@ anonymize:
street: 4914 Goff Avenue
city: Plainwell
postcode: 49080
region: West Virginia
country_id: US
region_id: 63
phone: 202-555-0115
company: Dwellsmith
ip: 51.113.119.34
Expand All @@ -65,9 +50,6 @@ anonymize:
street: 565 Sampson Street
city: Albany
postcode: 53502
region: New York
region_id: 43
country_id: US
phone: 202-555-0190
company: SalePush
ip: 85.127.2.228
Expand All @@ -77,9 +59,6 @@ anonymize:
street: 1763 Davis Avenue
city: Sacramento
postcode: 95814
region: California
country_id: US
region_id: 12
phone: (244) 949-1729
company: Cloudrevel
ip: 147.199.158.244
Expand All @@ -89,9 +68,6 @@ anonymize:
street: 451 Wildwood Street
city: Akron
postcode: 43308
region: Ohio
country_id: US
region_id: 47
phone: 907-555-0187
company: Crowdstage, Inc.
ip: 152.56.2.51
Expand All @@ -101,9 +77,6 @@ anonymize:
street: 3180 Dancing Dove Lane
city: New York
postcode: 10004
region: New York
country_id: US
region_id: 43
phone: 907-555-0192
company: Acme Brands, Inc.
ip: 53.243.127.225
Expand All @@ -113,9 +86,6 @@ anonymize:
street: 2255 Red Maple Drive
city: Alhambra
postcode: 91801
region: Oregon
country_id: US
region_id: 49
michalbiarda marked this conversation as resolved.
Show resolved Hide resolved
phone: 404-555-0175
company: QuickSpace
ip: 174.146.43.47
Expand All @@ -125,9 +95,6 @@ anonymize:
street: 1367 Lowndes Hill Park Road
city: Sherman Oaks
postcode: 91403
region: Washington
country_id: US
region_id: 62
phone: 404-555-0162
company: Rentoor, inc.
ip: 173.8.26.43
Expand All @@ -137,9 +104,6 @@ anonymize:
street: 674 Cemetery Street
city: Magnolia
postcode: 61336
region: Illinois
country_id: US
region_id: 23
phone: 307-555-0141
company: Jumpsync Products, Inc.
ip: 68.65.218.25
Expand All @@ -149,9 +113,6 @@ anonymize:
street: 3357 Zappia Drive
city: Lexington
postcode: 40507
region: Kentucky
country_id: US
region_id: 27
phone: 307-555-0126
company: VisionSwipe, Inc.
ip: 50.151.191.15
Expand All @@ -161,9 +122,6 @@ anonymize:
street: 3477 Lake Floyd Circle
city: Patuxent Naval Air Test c
postcode: 20670
region: Maryland
country_id: US
region_id: 31
phone: 307-555-0127
company: Shipplier Supplies, Inc.
ip: 87.172.86.188
Expand All @@ -173,9 +131,6 @@ anonymize:
street: 1445 Thompson Street
city: Seal Beach
postcode: 90740
region: California
country_id: US
region_id: 12
phone: 515-555-0164
company: TechTack LLC
ip: 213.56.195.24
Expand All @@ -185,9 +140,6 @@ anonymize:
street: 1247 Heliport Loop
city: Bloomington
postcode: 47408
region: Illinois
country_id: US
region_id: 23
phone: 515-555-0142
company: Digimail For You, LLC
ip: 124.9.254.185
Expand All @@ -197,9 +149,6 @@ anonymize:
street: 2462 Pritchard Court
city: Rio
postcode: 26755
region: West Virginia
country_id: US
region_id: 63
phone: 515-555-0102
company: Kaboom Fireworks
ip: 194.59.122.241
Expand All @@ -209,9 +158,6 @@ anonymize:
street: 1767 Stroop Hill Road
city: Fort Wayne
postcode: 46852
region: Indiana
region_id: 24
country_id: US
phone: 860-555-0172
company: Semicolon Bookstore
ip: 68.162.14.52
Expand All @@ -221,9 +167,6 @@ anonymize:
street: 4474 Brookview Drive
city: San Jose
postcode: 95113
region: California
region_id: 12
country_id: US
phone: 860-555-0178
company: Bent Out of Shape Jewelry
ip: 25.19.163.174
Expand All @@ -234,9 +177,6 @@ anonymize:
street: 720 Scenic Way
city: Warrensburg
postcode: 62573
region: Missouri
region_id: 36
country_id: US
phone: 860-555-0131
ip: 132.60.238.89

Expand All @@ -245,7 +185,6 @@ anonymize:
street: 55, place de Miremond
city: VILLENEUVE-SUR-LOT
postcode: 47300
country_id: FR
company: 9Yards Media
phone: 05.48.01.14.91
ip: 38.28.94.247
Expand All @@ -255,7 +194,6 @@ anonymize:
street: 69, boulevard Aristide Briand
city: Le Bouscat
postcode: 33110
country_id: FR
company: Titan Alarm Group
phone: 05.45.43.97.63
ip: 87.122.192.251
Expand All @@ -265,7 +203,6 @@ anonymize:
street: 59, Avenue des Pr'es
city: MONTIGNY-LÈS-METZ
postcode: 57158
country_id: FR
phone: 03.31.34.92.91
company: Pacific Alarm Group
ip: 171.120.59.109
Expand All @@ -275,7 +212,6 @@ anonymize:
street: Verlengde Koolhoverweg 10
city: Bocholtz
postcode: 6351
country_id: NL
phone: 06-58223374
company: Saga Builders
ip: 249.230.160.198
Expand All @@ -285,7 +221,15 @@ anonymize:
street: De Zaalsteden 70
city: Gieten
postcode: 9461
country_id: NL
phone: 06-40996488
company: Drama Studio
ip: 49.87.75.212

- firstname: Michal
lastname: Biarda
street: 1004 Rabbit Str
city: Lunapark
postcode: 31415
phone: 852-555-0129
company: Hello World, Inc.
ip: 197.45.92.201
2 changes: 2 additions & 0 deletions .driver/commands.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ commands:
class: \Driver\Engines\MySql\Transformation\Anonymize
reduce:
class: \Driver\Engines\MySql\Transformation\Reduce
update-values:
class: \Driver\Engines\MySql\Transformation\UpdateValues
export-data-from-sandbox:
class: \Driver\Engines\MySql\Sandbox\Export
upload-data-to-s3:
Expand Down
54 changes: 29 additions & 25 deletions .driver/pipelines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ pipelines:
sort: 100
- name: anonymize
sort: 200
- name: update-values
sort: 300

- name: repeat-commands
sort: 400
Expand All @@ -56,46 +58,48 @@ pipelines:
- name: setup # pipeline stage
sort: 100
actions:
- name: connect
sort: 100
- name: check-filesystem
sort: 200
- name: start-sandbox
sort: 300
- name: connect
sort: 100
- name: check-filesystem
sort: 200
- name: start-sandbox
sort: 300

- name: import
sort: 200
actions:
- name: export-data-from-system-primary
sort: 100
- name: import-data-into-sandbox
sort: 200
- name: export-data-from-system-primary
sort: 100
- name: import-data-into-sandbox
sort: 200

- name: global-commands
sort: 300
actions:
- name: reduce
sort: 100
- name: anonymize
sort: 200
- name: reduce
sort: 100
- name: anonymize
sort: 200
- name: update-values
sort: 300

- name: repeat-commands
sort: 400
actions:
- name: run-transformations
sort: 100
- name: connect
sort: 200
- name: export-data-from-sandbox
sort: 300
- name: upload-data-to-s3
sort: 400
- name: run-transformations
sort: 100
- name: connect
sort: 200
- name: export-data-from-sandbox
sort: 300
- name: upload-data-to-s3
sort: 400

- name: shutdown
sort: 500
actions:
- name: shutdown-sandbox
sort: 100
- name: shutdown-sandbox
sort: 100

import-s3:
- name: export-s3-db-on-local
Expand All @@ -110,4 +114,4 @@ pipelines:
- name: import-data-from-system-primary
sort: 100

empty: []
empty: [ ]
Loading