Merge documents from multiple branches

Document created by rich_patterson Employee on Oct 15, 2014Last modified by dave_lesshafft on Mar 2, 2016
Version 2Show Document
  • View in full screen mode
Scenario: You have Independent queries on multiple branches, which produce data in the same format ( or can be mapped to a common profile ).  You need to merge this data together before sending out
There are two approaches:

 

Doc Cache:

 

On each branch, you could map the documents into a common profile, and send them into a doc cache.  One element of that profile must be used for the index/key.  Note, every document loaded into that cache, could have the same index/key ...  a static value of '1' for example.

 

On the last branch, you could use the Load From Cache shape, and pull all the documents out of the cache at the same time, merge them together, and send them to your client.

 


Sub Process:

 

Another alternative, is to call a sub process.  From the sub process, separate branches can query the docs, do the mapping, and send the docs back through a return docs shape.  ( You may need to connect each branch to a common return documents shape )

 

From the parent process, the output of the sub process will be treated as a single batch of records
4 people found this helpful

Attachments

    Outcomes