Reputation: 23
We are migrating from MarkLogic DHF4 to DHF5 (Data Hub Framework)
We are having scenario where for one entity, depending on criteria we need to create more than one harmonize document for a single input document. This scenario was possible in legacy flow where we used to call write:write
method.
But in DHF5 implementation we are supposed to return only one content for one input document getting processed in main module main.sjs.
Is there a way where we can create multiple harmonize document as required from one input document in DHF5?
We expect that one input document should be able to create more than one harmonized document in single step(in main.sjs)
Upvotes: 2
Views: 37
Reputation: 8422
Your custom module is expected to return a Content object or an array of them. Each Content object must have uri
, value
, and context
properties and may also specify provenance
.
Based on this, your one input can be turned into multiple outputs.
See the "Required Outputs" section on this page for more details.
Your module must return the following:
- For a Custom-Ingestion step, a Content object.
- For all other custom steps, a Content object or an array of Content objects.
Upvotes: 1