You are not logged in.

Unanswered posts



Important! This site has been replaced. All content here is read-only. Please visit our brand-new community at https://community.talend.com/. We look forward to hearing from you there!



#1 2017-03-30 17:42:59

mwr0707
Member
22 posts

mwr0707 said:

TDM Architecture

A common use case in NoSQL databases such as MongDb is to store multiple (JSON for example) documents with the same complex nesting structure in a single collection.
When using tHMap in a DI job feeding documents to such a collection, it seems that any single subjob executing 1 tHmap can produce only 1 output document for MongoDb built from the multiple rows fed to tHMap, for example:
tOracleInput->(multiple rows)->tHMap->(never more than 1 row)->tMongoOutput
Is this correct?
If so, what is the best way to output multiple JSON documents of the same type to a single Mongo collection with tHMap/TDM?
This is easy to do with tWriteJSONField instead of tHMap IF only 1 loop element is needed.  I have more than 1 loop element which is why I'm using TDM/tHMap.
I've seen an example of how this could be done with tHmap by pre-grouping the input data, and then iterating over the top-level group (each group contains the data for one JSON document) to invoke tHMap interatively for each top-level group.  Is this what is intended by the TDM product developers as the best practice for loading multiple documents into the same Mongo collection?

Last edited by mwr0707 (2017-03-31 14:19:37)

Offline

Board footer

Talend Contributor Agreement - Talend Website Privacy Policy