AnsweredAssumed Answered

MongoDB: Migrating a collection between servers

Question asked by Daniel Lee on Nov 16, 2018

Using Kettle 8.1, I'm piloting a MongoDB migration of collections via MongoDB Input/Output steps as below:

 

Screenshot 2018-11-16 14.43.34.png

 

Since the keys of the documents are variable, I checked the "Output single JSON field" as below:

Screenshot 2018-11-16 14.46.41.png

 

The MongoDB Output step simply reads the "json" output field from the source step.

 

Then, the migrated collection added a wrapper key, _id, for each document as below:

 

Source:

Screenshot 2018-11-16 14.48.49.png

 

Target:

 

What's the best way to migrate the source collection to the target as it is?

 

Thank you!

Daniel

Outcomes