-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.py
24 lines (18 loc) · 850 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import sqlite3
from db import create_schema, create_users_mapping_schema
from import_data import import_meetup_data, import_meetups
meetups_file = "./import/meetups_list.csv"
meetup_export = "./import/meetup_dump.csv"
attendees_without_rsvp = "./import/attendees_without_rsvp.csv"
# Anonymize users data first
anon_db = sqlite3.connect('./dataset/sensitive-data.db')
create_users_mapping_schema(anon_db)
# Process meetups details
dataset_db = sqlite3.connect('./dataset/ethereumba-dataset.db')
create_schema(dataset_db)
print("[main] Importing meetups list")
import_meetups(meetups_file, dataset_db)
print("[main] Importing meetups attendance")
import_meetup_data(path=meetup_export, dataset_db=dataset_db, anon_db=anon_db)
import_meetup_data(path=attendees_without_rsvp, dataset_db=dataset_db, anon_db=anon_db)
print("[main] Import finished")