You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 936d5ab
Browse filesBrowse the repository at this point in the historyBrowse files
Per user direction: "implement Option 2 for SchemaAttributeDefinition -
and we'll replace it once the new endpoint is available."
New Dr.Egeria command family: Link/Detach Schema Attribute Definition
(Data Designer family, commands_data_designer.json), a new "Schema
Attribute" attribute (Reference Name style, existing_element:
SchemaAttribute, alongside the existing "Data Field" attribute), and a
new LinkSchemaAttributeDefinitionProcessor (md_processing/v2/
data_designer.py):
- Link/Attach/Add: calls MetadataExpert._async_create_related_elements
with a NewRelatedElementsRequestBody (typeName:
SchemaAttributeDefinition), captures the returned relationship GUID
into parsed_output["guid"], displays it in the result markdown.
- Detach/Unlink/Remove: looks the relationship up by its element pair via
_async_find_relationships_between_elements rather than requiring a
separate GUID attribute -- safe because SchemaAttributeDefinition's
relationshipCategory is UNI_LINK with AT_MOST_ONE cardinality on both
ends (confirmed live via ValidMetadataManager.get_all_relationship_defs()),
so there's no multi-instance ambiguity. Deletes via
_async_delete_related_elements(relationship_guid, ...).
- supports_target_element_lookup() overridden to False (relationship-only
processor -- see ISSUE-68's AsyncBaseCommandProcessor upsert-rewrite-bug
fix for why this matters for any relationship processor).
No new pyegeria SDK surface needed -- _async_create_related_elements/
_async_find_relationships_between_elements/_async_delete_related_elements
all already existed on MetadataExpert (Option 2's whole premise).
Verified live, full round trip against a real DataField/SchemaAttribute
pair: Link via --process created the relationship and displayed its GUID;
a direct query confirmed it existed; Detach via --process removed it; the
same query afterward returned "No elements found".
New tests: test_link_schema_attribute_definition.py (5 tests, fake
client, no live server needed). Full pytest tests/micro-tests/ green
(one pre-existing, unrelated failure in test_sync_members.py confirmed
present on upstream main before this change too -- from PR #287, not
touched here).
PYEGERIA_ISSUES.md: ISSUE-48 moved to Fixed/Resolved with full writeup,
explicitly flagged as temporary -- migrate to a bespoke DataDesigner
wrapper (Option 1) once Egeria ships a real SchemaAttributeDefinition
endpoint; re-check the OpenAPI-spec verification in this issue's own
history periodically.
Also fixed while resolving a stash-pop merge conflict: no functional
change, just interleaved cleanly with PR #287's unrelated "Detach Data
Value Specification from Element" addition that landed on upstream/main
concurrently.
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
Copy file name to clipboardExpand all lines: md_processing/data/compact_commands/commands_data_designer.json
+41Lines changed: 41 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -3264,6 +3264,25 @@
3264
3264
"max_cardinality": 1,
3265
3265
"level": "Domain",
3266
3266
"Journal Entry": ""
3267
+
},
3268
+
"Schema Attribute": {
3269
+
"variable_name": "schema_attribute",
3270
+
"inUpdate": true,
3271
+
"attr_labels": "",
3272
+
"examples": "",
3273
+
"default_value": "",
3274
+
"valid_values": [],
3275
+
"existing_element": "SchemaAttribute",
3276
+
"description": "A physical schema attribute (e.g. a TabularColumn). Preferably a qualified name.",
3277
+
"generated": false,
3278
+
"style": "Reference Name",
3279
+
"user_specified": true,
3280
+
"unique": false,
3281
+
"input_required": true,
3282
+
"min_cardinality": 1,
3283
+
"max_cardinality": 1,
3284
+
"level": "Domain",
3285
+
"Journal Entry": ""
3267
3286
}
3268
3287
},
3269
3288
"bundles": {
@@ -3880,6 +3899,28 @@
3880
3899
"Element Id"
3881
3900
],
3882
3901
"Journal Entry": ""
3902
+
},
3903
+
"Link Schema Attribute Definition": {
3904
+
"display_name": "schema_attribute_definition",
3905
+
"qn_prefix": "",
3906
+
"alternate_names": [],
3907
+
"family": "Data Designer",
3908
+
"description": "Link a logical Data Field to the physical Schema Attribute that implements it (e.g. a TabularColumn), or the reverse lookup. Implemented via the generic MetadataExpert relationship mechanism (typeName: SchemaAttributeDefinition) -- no bespoke Egeria REST endpoint exists for this relationship yet (PYEGERIA_ISSUES.md ISSUE-48); will be migrated to a dedicated wrapper once Egeria ships one.",
> Link a logical Data Field to the physical Schema Attribute that implements it (e.g. a TabularColumn), or the reverse lookup. Implemented via the generic MetadataExpert relationship mechanism (typeName: SchemaAttributeDefinition) -- no bespoke Egeria REST endpoint exists for this relationship yet (PYEGERIA_ISSUES.md ISSUE-48); will be migrated to a dedicated wrapper once Egeria ships one.
5
+
6
+
### Data Field
7
+
>**Input Required**: True
8
+
9
+
>**Attribute Type**: Reference Name
10
+
11
+
>**Description**: A data field name. Preferably a qualified name.
12
+
13
+
14
+
### Schema Attribute
15
+
>**Input Required**: True
16
+
17
+
>**Attribute Type**: Reference Name
18
+
19
+
>**Description**: A physical schema attribute (e.g. a TabularColumn). Preferably a qualified name.
20
+
21
+
22
+
### Label
23
+
>**Input Required**: False
24
+
25
+
>**Attribute Type**: Simple
26
+
27
+
>**Description**: A label used to identify or categorise a relationship link.
0 commit comments