anlek / mongify

Mongify allows you to map your data from a sql database and into a mongodb document database.
http://github.com/anlek/mongify
MIT License
317 stars 82 forks source link

how to write a code in translation.rb file , if i want to copy entire table into specific mongo collection #133

Open Komalil opened 7 years ago

Komalil commented 7 years ago

Hi Friends,

Please help me to to resolve the issue ASAP.

joandvgv commented 7 years ago

Hi! Can you please provide us some more info?

The collection is already created and populated?

Mongify provides a pretty specific documentation. You just need to execute the following command:

mongify translation database.config > translation_file.rb

It'll translate your database.config file to a translation_file.rb

Once done, you can start migrating your data.

anlek commented 7 years ago

@joandvgv Thanks for jumping in. 👍

anlek commented 7 years ago

The problem is that Mongify requires instructions on how to translate the tables.

If you run mongify translation database.config > translation.rb and it produces 4000+ tables in the file, you can quickly comment or delete all the tables you don't need. This way it will leave only the tables you want to move over.

Hope that helps!

Komalil commented 7 years ago

Thanks for the reply anlek..

Komalil commented 7 years ago

In future, is there enhancement to mongify tool related to this issue? (Mean to say, Adding specific tables , instead of deleting or commenting unnecessary tables in translation.rb file ). Thanks for your support.