-
Notifications
You must be signed in to change notification settings - Fork 0
Mapping DSL?
illyfrancis edited this page Jul 25, 2013
·
7 revisions
- does it imply structured, hierarchical messages (CSV could be hierarchical too)
map type "ContractCreated"
of security "InterestRateSwap"
for client "ABC" (
header.conversationId to header.conversationId
header.messageId to header.messageId
header.sentBy to header.sentBy
...
contract.header.identifier.partyReference[href] to contract.header.identifier.partyReference[href]
contract.header.identifier.versionedContractId.contractId to contract.header.identifier.versionedContractId.contractId
...
with contract.creditDefaultSwap
productType to [[how to represent the RHS]]
what about repeating elements? How to represent the mapping? and how would the target message be represented?
<party id="party1">
<partyId>XYZBICXXX</partyId>
<partyName>XYZ Bank</partyName>
</party>
<party id="party2">
<partyId>ABCBICXXX</partyId>
<partyName>ABC Bank</partyName>
</party>
validate type "ContractCreated"
of security "InterestRateSwap"
for client "ABC" (
header must exist
contract must exist
...
contract.header.identifier.effectiveDate format should be "YYYY-MM-DD"
contract.contractDate format should be "YYYY-MM-DD"
)
enrich security "InterestRateSwap"
of type "ContractCreated"
... (// it's no longer client specific)
- It doesn't make sense to configure enrichment, because it should be non-client specific. Almost treat it like there's only one predefined message and any validation and enrichment should/can be done in the code level.
- How would the message be structured?
- One way would be that the columns define the fields, and each row defines distinct messages?
- Another would be hierarchical etc (But this seem to difficult and calls for custom implementation)
map type "ContractCreated"
of security "InterestRateSwap"
for client "ABC" (
header.conversationId to header.conversationId
header.messageId to header.messageId
header.sentBy to header.sentBy
...
from(multiple(field1).and(field2).and(field2)).to(target)
split(field).by(CONDITION?) -> produces fields
map( split(field).by(something) ).to -> how do we represent this???
trim(field)