Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
jvesely
Contributor II
Contributor II

Mongo - copy collection(s) with data from source MongoDb to target MongoDb

Hi,

Definitely new to Talend, so please let me know if the details I supply aren't enough.

Input:

  • SourceDB name, IP, port.
  • TargetDB name, IP, port
  • List of collections

Ask:

  • Connect to source
  • For each collection in the list
    • Create collection in target DB
    • Copy all data from source to target

I guess the questions are:

1. Can this be done in Talend without having to specify the schema for each collection that has to be copied, so basically "taking the data as it comes" / dynamic schema?

2. If this can be done, is Talend even the best choice for this or would I be forcing circles into squares?

Thanks a lot,

Jan

Labels (2)
1 Reply
jvesely
Contributor II
Contributor II
Author

Found a solution:

 

  • Create Talend job to parse all the parameters
  • Create a Java routine to handle to collection copying, including documents and indexes
  • Let the job call the routine