ISV friendly attributes -- Projected / Extracted attributes
This Issue proposes a generalisation for treatment of Issues 26 and 27 that prooses that UWI and SpudDate be treated as special properties.
We acknowledge that ISVs and others need a standard way of finding UWI and SpudDate irrespective of how the Platform owner has organised content. Further, the fact that UWI, for example, is typically a Facility Alias where the alias name may be CUWI, PUWI, TUWI also does not help.
Earlier OSDU versions contained a number of "special attributes" that were always available in a search response (UWI and SpudDate were included), and were referred to at the time as "projected and extended attributes". Personally, I always considered them as ISV friendly / convenience attributes. This "friendliness" was put aside (temporarily at the time, but it has become permeant) during the OSDU / OpenDES friction point discussions late 2019 / early 2020 just ahead of moving into R2/R3 development with the new code base.
That said, late in 2019 when R1 was released to Operators, it was agreed that the Data Definitions Committee would take responsibility for defining the “special attributes” that would always be available in a search response. The reasoning was simple. There were dependencies that were related to the relationships between different schemas; Well and Wellbore for example (namely Parent and Child). Also, since these attributes were NOT attributes from the Schemas themselves, they would need to be separately documented (but also in a Schema format). Finally, there were implications for the ingestion service, as it would need to "create/manage" these attributes. As such, there was a strong need to standardise the way these “special attributes” were declared in order to ensure that they could be handled in a generic manner by the ingestion service. The point about these "special attributes" is that they were computed by the ingestion service based upon a set of rules.
Originally, "special attributes" were treated under the banner of indexing, since the intent was to insure that all Schema attributes and apecial attributes were properly indexed and searchable. A method for indexing Extended Attributes was also available.
Here are some examples of “special attributes” that were associated with a Wellbore in R1. Not everything was perfect and there were some inconsistencies, but hopefully the intent is clear. There were special attributes for Name and UWBI. There were attributes indicating the Well name and UWI. You will also note by deduction that ingesting Logs, Markersets and Trajectories, for example, caused the Wellbore record to be updated with counters and pointer arrays.
Click to expand
` "WellCommonName": "AME-102",
"WellUWI": "1028",
"WellSRN": "srn:master-data/Well:1028:",
"SpudDate": "1983-02-13T00:00:00",
"CommonName": "AME-102-S1",
"UWBI": "5017",
"WellboreSRN": "srn:master-data/Wellbore:7607:",
"WellLogCount": 0,
"WellLogSRN": [],
"WellboreMarkerCount": 1,
"WellboreMarkerSRN": [
"srn:work-product-component/WellboreMarker:67657777573843378679176b3a1ddda9:1"
],
"WellborePathCount": 1,
"WellborePathSRN": [
"srn:work-product-component/WellboreTrajectory:2b293633fea6464086b67ecd8016adcc:1"
]
}
`
With all that said, my point is that instead of raising issues to add an attribute or two and then needing to decide where to put them, perhaps we should simply revisit the past features outlined above with a view to bringing some of it back into play.
For info, Wipro did independently implement such features into an updated verison of the OSDU ingestion engine of R1 using "rules" defined for each datatype to demonstrate that it could be done. An extract from the Rules Definition file we used for Wellbore is included below as an example of how things were made generic:
Click to expand
`"id": "Wellbore",
"ResourceType": [
"master-data/Wellbore"
],
"WorkProduct": {
"WellboreCommonName": {
"Query": "$.Data.IndividualTypeProperties.FacilityName"
},
"UWBI": {
"GeneratorMethod": "getElementOfArray",
"Inputs": [
"$.Data.IndividualTypeProperties.FacilityNameAlias[?(@.AliasNameTypeID == 'srn:reference-data/AliasNameType:UWBI:')].AliasName",
0
]
}
},
"CopyFromParent": [
{
"WellUWI": {
"Query": "$.WellUWI"
},
"WellCommonName": {
"Query": "$.WellCommonName"
}
}
],
"CopyToParent": [
{
"WellboreSRN": {
"GeneratorMethod": "addSRNToArray",
"Inputs": [
"$.WellboreSRN",
"$.SRN"
]
},
"WellboreCount": {
"Query": "$.WellboreSRN.length()",
"SuccessorOf": "WellboreSRN"
}
}
]
`