M25 EDS - Multiple conditions in ParentMatchingRuleSets for same kind ignored within the same record with multiple value with the same kind
In the method get_external_mapping_rules (osdu_airflow\eds\eds_ingest\data_processor\implementation\parent_data_mapping.py:110), only one unique kind is allowed in a ParentMatchingRuleSets. If there are multiple conditions targeting the same kind, other conditions are ignored.
For example, a record for master-data--SeismicAcquisitionSurvey has multiple references to organizations for the properties data.Contractors, data.Operator, data.NameAliases, etc. Due to the limitation noted above, only one reference for the parent master record can be remapped using MatchingRuleSets; others will be ignored.
Here is an example of reference-data--ParentMatchingRuleSets that attempts to utilize Simple Mapping and Complex Mapping for different fields of the same incoming record. However, only the first condition is considered, and the other two are ignored. Effectively, this makes it impossible to remap all required fields in this record completely.
{
"Conditions": [
{
"SourceProperty": "data.Contractors.ContractorTypeID:osdu:reference-data--ContractorType:AcquisitionContractor",
"TargetKind": "master-data--Organisation:1.0.0",
"TargetProperty": "data.OrganisationName",
"ReplaceProperty": "data.Contractors.ContractorOrganisationID",
},
{
"SourceProperty": "data.NameAliases.AliasNameTypeID:osdu:reference-data--AliasNameType:EDSConnectedSourceIdentifier",
"TargetKind": "master-data--Organisation:1.0.0",
"TargetProperty": "data.OrganisationName",
"ReplaceProperty": "data.NameAliases.DefinitionOrganisationID",
},
{
"SourceProperty": "data.Operator",
"TargetKind": "master-data--Organisation:1.0.0",
"TargetProperty": "data.OrganisationName",
"ReplaceProperty": "data.Operator",
},
]
}