Skip to content

v1.14.0 — Business Glossary, corrected by the field

Choose a tag to compare

@Criptic Criptic released this 07 Sep 10:54
· 103 commits to main since this release
31762f0

Highlights

Tier 9 shipped in v1.13.0 and was immediately used to build a real 122-term glossary. This release is what that use found — thirteen fixes and four new tools, all from two rounds of field feedback against the same live deployment. (#52)

The Business Glossary service publishes no OpenAPI document, so every wire format below was established by probing a running Viya. That is the theme of the release: the API accepts a value, stores something else, and says nothing.

🐛 Values that were accepted and silently stored wrong

Three of these produce no error at all — which makes them the ones worth reading.

What you sent What was stored Now
attributes={"Approved": True} the term type's default — never your value a JSON boolean, stored as sent
attributes={"Regions": ["EMEA", "APAC"]} rejected: The value "['EMEA', 'APAC']" … is invalid EMEA,APAC — the one form the glossary takes
a time attribute of 09:15:00+02:00 09:15:00Z — two hours out, no warning 07:15:00Z
an imported row's definition in the description; the definition held the term's own name both columns written from their own field

That last one is the sharpest. The importer's Description column is the description; Definition is a separate system column, and with no Definition column at all the service fills the field in with the term's name. A 122-term import therefore came back with every definition reading like a label and every description holding the text meant for the definition — the field a reader actually sees, wrong on every row, on every term.

✍️ import_glossary_terms — a whole hierarchy in one call

Creating terms one at a time costs a call per term and a wait between levels, because a child needs its parent's id from the previous response. The reported 122-term hierarchy took 122 sequential calls.

This wraps the glossary's own bulk import, so parents are named rather than threaded by id:

[{"name": "Exposure",     "term_type": "Business Term"},
 {"name": "Net Exposure", "term_type": "Business Term", "parent": "Exposure"},
 {"name": "Counterparty", "term_type": "Business Term", "parent": "Exposure\\Net Exposure"}]

Rows may be given in any order and are sorted so every parent precedes its children. Attribute values keep the same forms as create_glossary_term and are validated per term type before the CSV is built, so a bad value fails locally rather than as one line of a job log.

The result names the term each row became. terms carries {name, path, term_id, existed} per row, resolved in one filtered request per 40 distinct names — sibling names are unique, so a (parentId, name) index over the candidates rebuilds the hierarchy and every row's path walks down it. On a 122-term import that is about four requests, not 122.

The same pass fixes what created was hiding. A row naming a term that already exists at that path is not created, but the job counts it successful either way — so a re-import of a 122-term hierarchy reported 122 created and changed nothing. The job's own creationTimeStamp separates the two: a term older than the job was already there. new and already_existed now report the split, and existed says which is which per row.

🧱 Term types can be designed, not only read

create_glossary_term_type, update_glossary_term_type and delete_glossary_term_type complete the tier. A glossary could previously be read and populated through these tools but never designed through them, so any deployment wanting a custom type needed a SAS UI step first.

  • An edit keeps each attribute's identifier, which matters more than it looks: every term's stored values are filed under it, and re-minting one orphans them all.
  • To rename an attribute, give its attribute_id alongside the new label. Matching by label alone means a new label matches nothing, mints a fresh attribute, and leaves every stored value behind under the old one — readable as nothing. A rename onto a label another attribute already holds is refused rather than producing two of the same name.
  • A single-select with no allowed_values is refused, since nothing could ever be stored in it — the service accepts that definition happily.

📝 A draft is a separate resource

create_glossary_term(publish=false) produced a term that could not be edited and could never be published. /glossary/terms/{id} answers GET and DELETE for a draft, so it looked reachable — but a PUT there is a flat 404.

The draft's own links say where it actually lives: PUT …/draft to edit, PUT …/draft/state?action=publish to promote. Neither is documented anywhere. Updates now route to the draft when the term is one, and update_glossary_term(publish=true) publishes it — on its own, or alongside a final edit.

🔍 Attributes in listings, and filtering on them

include_attributes returns each term's attribute values from list_glossary_terms and search_glossary_terms; attribute_filter keeps only the terms that match — {"Used in Risk": true}, {"Regions": "EMEA"}.

On the listing, attributes are free: the list representation already carries the raw UUID-keyed map, so decoding costs one call per distinct term type on the page — normally one — and none per term.

The glossary cannot filter on attribute values, so this filters here, and says how far it got: scanned, scan_complete, and a next_start when the scan was capped. A short list is otherwise indistinguishable from a complete answer. Narrowing with term_type narrows the scan too — on a live 1,720-term glossary, one term type answered in 1.3 s against 8.3 s unscoped.

💬 Errors that say what went wrong

Every Viya failure used to lead with httpx's status phrase, the full URL and a link to the MDN page for the status code, ahead of the one line that says what was actually wrong. Errors now read:

HTTP 400 from POST /glossary/terms — Viya reported: The value "true" for the field "Approved" is invalid

This one is not glossary-specific — it affects every tier.

🔢 Tool count

91 tools across tiers 0–9 — up from 87. 50 read-only (unchanged: all four new tools write), 21 destructive. Tier 9 goes from 12 tools to 16.

No tool was removed or renamed. import_glossary_terms' created keeps its old meaning — rows the job accepted — with new and already_existed added beside it.

🐳 Container image

docker pull ghcr.io/sassoftware/sas-mcp-server:1.14.0

Helm chart 0.2.4 (appVersion 1.14.0); both sample manifests and the pull/mirror instructions point at 1.14.0.

⚠️ Upgrading

Drop-in. Container and Kubernetes deployments pick it up with the new image tag; a source checkout wants the usual uv sync.

One thing to check if you already authored terms with v1.13.0: boolean and multi-select attributes written through the old tools did not store what you sent — a boolean fell back to the term type's default, and a multi-select was rejected outright. Re-read any term carrying one before trusting it.

📄 Details