I am new to MongoDB and planning to migrate DB2 data (~6TB) to Mongodb. In MongoDB we having some schema changes(not one to one /direct mapping) so we are planning to use Java to migrate the same.
Options I am thinking of:
- Read the data from DB2 and insert the same in MongoDB using Java threads
- Read the data from DB2 and convert to a BSON file using Java threads, store on disk and then use mongo import tool to load data into Mongodb.
Which option is best to migrate the data from db2 to Mongodb (other than tools)?
Please guide me here!
Thanks!