fix: correct upsertStructuredProperties and removeStructuredProperties examples - #147
Open
Abhinav0905 wants to merge 1 commit into
Open
Conversation
…s examples Both Structured Properties examples in the datahub-enrich mutation reference fail GraphQL validation and cannot succeed against any GMS. The input field is structuredPropertyInputParams rather than structuredPropertyInputs; values is [PropertyValueInput!]! so each entry is an object rather than a bare string; and both mutations return StructuredProperties! and so require a selection set. Verified against DataHub OSS v1.7.0: the documented upsert returns two validation errors and the documented remove returns one, while both corrected forms return zero. Also notes that sending stringValue to a NUMBER-typed property is accepted and then dropped server-side with no error and no stored value.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Corrects the two Structured Properties examples in
skills/datahub-enrich/references/mutation-reference.md. As written, neither cansucceed against any GMS — both fail GraphQL validation before reaching execution.
Why
I hit this while building a tiering agent on DataHub for the Agent Hackathon: I
copied the documented
upsertStructuredPropertiesexample and spent a whileassuming my own setup was at fault.
Run verbatim against DataHub OSS v1.7.0, the documented
upsertStructuredPropertiesreturns two validation errors:
and
removeStructuredPropertiesreturns one:Three distinct problems:
structuredPropertyInputParams, notstructuredPropertyInputs.valuesis[PropertyValueInput!]!— each value is an object ({ stringValue: "..." }or
{ numberValue: 4.0 }), not a bare string.StructuredProperties!and therefore require a selection set.Verification
Both corrected forms return zero validation errors against a live GMS v1.7.0
(they proceed to execution and fail only on the deliberately non-existent probe URN
I used, which is the expected behaviour for an unknown asset).
One extra note added
A sentence documenting a silent failure that cost me the most time: sending
stringValueto aNUMBER-typed property is accepted by GraphQL and then droppedserver-side — no error returned, no value stored, and no new aspect version. It is
indistinguishable from search-index lag until you notice the value never changes.
Worth one line in the reference so the next person does not have to work it out.
Docs-only change; no behaviour affected.