laserninja commented on issue #12616:
URL: https://github.com/apache/gravitino/issues/12616#issuecomment-5519895584
**Approach for Web UI support**
Targeting `web-v2` (the active UI module), following the existing
logical-View pattern.
**Surface**
1. **Schema tree** - Semantic Models appear as a distinct node type under
relational schemas, alongside Tables, Views, and Functions, never merged into
Table or View listings.
2. **List** - a `Semantic Models` tab on the schema detail page, with name,
tags, and row actions (edit, delete).
3. **Detail** - header with comment, owner, tags, properties, and audit,
plus tabs for Datasets, Relationships, Metrics, and the raw Definition.
4. **Tags** - reuses the generic tag component against metadata object type
`semantic_model`.
5. **Create / edit / delete** - `POST`, `PUT`, and `DELETE` on
`/api/metalakes/{metalake}/catalogs/{catalog}/schemas/{schema}/semantic-models`.
**Authoring the definition**
The dialog uses structured form fields for `name`, `comment`, and
`properties`, and a validated JSON editor for the nested `definition`
(datasets, fields, relationships, metrics). A full nested form builder for
expressions, dimensions, and `ai_context` would be several thousand lines and
hard to review, and Ossie-compatible definitions are authored as documents in
practice. Client-side validation checks that the JSON parses, `datasets` is
non-empty, each dataset carries a `name` and a `source` with a two-element
`catalog.schema` namespace, and that dataset, field, relationship, and metric
names are unique within their scope. The server stays the authority.
Edit builds the atomic update batch from a diff, emitting `rename`,
`updateComment`, `setProperty`, `removeProperty`, and `replaceDefinition` only
for what actually changed, so an unchanged definition is not revalidated
against its sources.
**Dependencies**
This builds against the contract in #12609, and needs #12607, #12608, and
#12615 merged before it can be exercised end to end. Happy to hold the PR
behind those if you prefer, or open it early against the frozen contract so
review can start in parallel.
One question: is `semantic_model` the intended wire value for the tag and
owner metadata-object path segment, matching
`MetadataObject.Type.SEMANTIC_MODEL`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]