Migrate Data

This project focused on reading YAML configurations to migrate data from MongoDB to MySQL, MySQL to MongoDB, parse CSV and save desired fields in another CSV. 

The YAML configuration consist of source and destination information, on where and what data to access for migration. 

Migrating from MySQL to MongoDB is much easier, since there is structure and relation between columns and rows in a table. All I had to do was extract data from MySQL's desired table according to YAML and then transfer those to MongoDB in JSON format.

Migrating from MongoDB to MySQL was a bit more time consuming, since MongoDB assigns unique ObjectId to each document. So, I had to extract documents from a desired collection based on YAML config and transform data to what was acceptable and insertable in MySQL. I had to convert ObjectId to string and create a list of dictionaries that I could insert into MySQL.