-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ISO 20022 datatype "identifer set" versus Orchestra discriminator fields #50
Comments
The ISO 20022 Metamodel defines:
In the cited example of
I do think it would be useful to identify external codesets in Orchestra, as distinct from codesets defined within the Orchestra specification itself. That would allow mapping implementations to optionally validate data content against the external values. |
@martinswanson, the discriminator in Orchestra is logically equivalent to IndentificationScheme in ISO 20022 IdentifierSet. We are using field attributes to tie two fields for lack of that datatype. Example from the v1.0 spec: <fixr:field added="FIX.2.7" id="48" name="SecurityID" type="String"
abbrName="ID" discriminatorId="22">
<fixr:annotation>
<fixr:documentation purpose="SYNOPSIS">
Security identifier value of SecurityIDSource (22) type (e.g. CUSIP, SEDOL, ISIN, etc). Requires ecurityIDSource.
</fixr:documentation>
</fixr:annotation>
</fixr:field> Orchestra supports external codesets. See External code sets in the spec. |
Seems a I was thinking we might want the ability to link to an actual codeset defined externally (e.g. in another hosted spec) and, where the discriminator is a codeset, to define such links at the code level. I've added a crude example to illustrate: <fixr:field abbrName="Ctry" type="Country" id="421" name="Country" discriminatorId="1234">
<fixr:annotation>
<fixr:documentation purpose="SYNOPSIS">
ISO Country Code in field</fixr:documentation>
</fixr:annotation>
</fixr:field>
<fixr:field abbrName="InvestorCtryOfResidence" type="Country" id="475" name="InvestorCountryOfResidence" discriminatorId="1234">
<fixr:annotation>
<fixr:documentation purpose="SYNOPSIS">
The ISO 3166 Country code (2 character) identifying which country the beneficial investor is resident for tax purposes.</fixr:documentation>
</fixr:annotation>
</fixr:field>
<fixr:codeSet name="CountryCodeSourceCodeSet" id="1234" type="String">
<fixr:code name="ISO3166Alpha2CurrencyCode" id="1" identificationScheme="uri/iso3166/1/alpha-2">
<fixr:annotation>
<fixr:documentation purpose="SYNOPSIS">
ISO 3166-1 alpha-2
</fixr:documentation>
</fixr:annotation>
<fixr:code name="ISO3166Alpha3CurrencyCode" id="2" identificationScheme="uri/iso3166/1/alpha-3">
<fixr:annotation>
<fixr:documentation purpose="SYNOPSIS">
ISO 3166-1 alpha-3
</fixr:documentation>
</fixr:annotation>
</fixr:code>
</fixr:codeSet> |
@martinswanson this would require a change to the usage of the <xs:attribute name="discriminatorId" type="fixr:id_t">
<xs:annotation>
<xs:documentation>Identifies a field used as a discriminator for this field's domain
</xs:documentation>
</xs:annotation>
</xs:attribute> The spec defines it as follows:
Hence it points to a field and FIX uses it to refer to a field with a code set as datatype. The Orchestra schema does not enforce the referenced field to have a code set, i.e. it seems undefined what happens when you reference a field with, for example, a String datatype. A FIX-specific validator could check whether the datatype is a code set and raise an error when this is not the case. If I understand your example above, you are suggesting The attributes As a consequence, I would then propose to add a new |
Section 3.8.5 Discriminator fields defines fields that link to another field to limit its range of values:
This is a topic for the Orchestra mapping discussion: in ISO 20022 they have commonly used a datatype called "identifier set" that serves the same purpose. The discriminator is a member of the datatype. The difference is that the structured datatype belongs to a single field, not across two fields as in tag value encoding.
This issue was initially proposed by @donmendelson.
The text was updated successfully, but these errors were encountered: