i want to migrate data from mysql database to mongo database. I'll take a simple example to illustrate my problem. I've got two mysql tables :
And i want this result in MongoDB :
I don't know how to do this. Do you have any idea ?
Thanks for your help
Is your input data JSON field from your mysql DB?
Please have a look at this component reference: TalendHelpCenter:tExtractJSONFields which is used to extract the desired data from JSON fields based on the JSONPath or XPath query.
And then you can generate directly desired result with tMongodbOutput by using 'Generate JSON Document' in advanced settings of tMongodbOutput component.
Feel free to let us know if it is OK with you.
I used a tWriteJsonFields, it worked but now i can't handle exporting the JSON data to Mongo with tMongoDBOutput.
I don't use the tExtractJsonFields component because when the job started, i only have mysql data tables input, and not a json file or json string.