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)