MongoSluice Can Keep MongoDB and the RDBMS of Your Choice In Sync

by | Dec 21, 2018 | Case Studies

The Goal: Sync Data Between MongoDB and RDBMS Via “Apply Deltas”

A convenient feature of MongoSluice is its ability to quickly sync changed or new data without doing any additional work such as investigating a schema or rewriting documents.  MongoSluice does this with its applyDeltas parameter which can be found in the docs here.

The Data

For this demonstration, we are using a simple dataset with 200 documents called students.  A link to the dataset can be found here.  Here is a sample document from the collection:

{
“_id” : 1,
“name” : “Corliss Zuk”,
“scores” : [
{
“score” : 67.03077096065002,
“type” : “exam”
},
{
“score” : 6.301851677835235,
“type” : “quiz”
},
{
“score” : 66.28344683278382,
“type” : “homework”
}
]
}

In Action

After pushing students to MySQL once with MongoSluice, we updated one of the values of students in MongoDB.  Here, you can see that we changed the value of the field “name”  to “Jacob” in a students document.

Then we run MongoSluice again with the following command:

./mongosluice pushToSql –jobId 7 –mongoConnectionName testdatasets –sqlConnectionName testdatasets –mongoDBName testdatasets20181203 –mongoCollection students –applyDeltas true

Since the schema is not being investigated and the only change in MySQL is a single update, the job is finished very quickly.  Here, the change can be noticed in MySQL:

Summary

In closing, MongoSluice is more than just a very effective tool for easily transferring data from MongoDB to RDBMS, it is also convenient for frequent use so that you are able to update your data multiple times a day in order to keep track of frequent changes.

 

 

About MongoSluice

MongoSluice is the most complete solution for leveraging your data in MongoDB in BI application and other RDBMS systems.

Guarantee

We guarantee satisfaction.
Zero hassles.