Skip to content

Tags: txn2/mcp-datahub

Tags

v1.9.0

Toggle v1.9.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat(dataproducts): return constituent datasets from get_data_product (

…#156)

datahub_get_data_product promised "constituent datasets" and "member
datasets" in its description but never returned them: the getDataProduct
query did not request members and the Assets field was left empty.

Fetch members via the DataProduct.entities GraphQL resolver in a separate
best-effort query (GetDataProductEntitiesQuery). Issuing it separately
means a DataHub instance whose schema lacks the resolver returns the
product without members rather than failing the whole lookup. The
entities argument is SearchAcrossEntitiesInput, whose query field is
required, so "*" matches all members; the new query is covered by the
schema-validation test against the vendored DataHub schema.

Upgrade DataProduct.Assets from []string to []Entity (urn, name, type)
to match the already-documented output contract (tools-api.md declared
[]Entity; the tools.md example showed objects) and update the
get_data_product output JSON Schema accordingly.

Also pin toolchain go1.26.4 to pick up the patched standard library
(clears reachable govulncheck GO-2026-5039 and GO-2026-5037), and handle
the strings.Builder write returns in rest.go that the linter flagged.

v1.8.1

Toggle v1.8.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: return empty entities array instead of null on zero search resul…

…ts (#131)

* fix: return empty entities array instead of null on zero search results

Initialize SearchResult.Entities with make([]SearchEntity, 0, ...) so
json.Marshal produces "entities": [] instead of "entities": null when
there are no results. The OutputSchema declares entities as "type":
"array" (no null allowed), so nil slices caused validation errors.

Fixed in both doSearchAcrossEntities (keyword + semantic) and Search
(legacy client method). Added regression test asserting [] not null.

* test: add client-level regression test for nil entities fix

Add TestSearchAcrossEntities_ZeroResults_EntitiesNotNil that hits a real
httptest server returning zero results and asserts Entities is non-nil
and marshals to [] not null. This exercises the actual make() fix in
doSearchAcrossEntities rather than relying on the mock to pre-initialize
the slice.

v1.8.0

Toggle v1.8.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat: upgrade datahub_search to use searchAcrossEntities with filters (

…#130)

* feat: upgrade datahub_search to use searchAcrossEntities with filters (#129)

Replace the type-scoped `search` GraphQL query with `searchAcrossEntities`
for keyword mode, enabling advanced field-level filtering and multi-type
search while maintaining full backward compatibility.

New SearchInput fields:
- `types`: search across multiple entity types (overrides entity_type)
- `filters`: advanced field-level filters (fieldPaths, fieldTags, platform,
  owners, domains, glossaryTerms, etc.) that are AND'd together

New client API:
- `SearchFilter` type with Field, Values, Condition, Negated
- `WithTypes()` and `WithOrFilters()` search options
- `SearchAcrossEntities()` client method with full entity fragments

* fix: address review findings for searchAcrossEntities PR

- SearchAcrossEntities now falls back to entityType when types is empty
- SemanticSearch now supports WithTypes and WithSearchFilters options
- SemanticSearchQuery gains DataFlow, Tag, Document entity fragments
  (parity with SearchAcrossEntitiesQuery and SearchQuery)
- Rename WithOrFilters to WithSearchFilters (clearer: filters are AND'd)
- convertFilters merges both Value and Values instead of dropping Value
- Add validateFilters rejecting empty Field or empty Values
- Add tests for all fixes: entityType fallback, types override,
  semantic+filters, Value+Values merge, validation errors

* refactor: extract shared search helper, eliminate query duplication

- Extract doSearchAcrossEntities shared helper; SearchAcrossEntities and
  SemanticSearch are now one-liner delegates (only difference: fulltext flag)
- SemanticSearchQuery is now an alias for SearchAcrossEntitiesQuery —
  single GraphQL query constant with all entity fragments
- Add DefaultEntityType constant to satisfy goconst lint
- Deduplicate values in convertFilters when Value is already in Values
- Add test for client no-types path (all-type search sends no types key)
- Add test for Value+Values deduplication
- Update CLAUDE.md datahub_search description for new capabilities

v1.7.1

Toggle v1.7.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: default context documents to visible and published (#122) (#123)

Documents created via UpsertContextDocument and datahub_create were
invisible in the DataHub UI because GlobalContext defaulted to false
(Go zero value) and Status was empty (server default: UNPUBLISHED).

Changes:
- context_documents.go: set GlobalContext: true in createContextDocument
- write_create.go: default Status to "PUBLISHED" when not provided,
  default GlobalContext to true (use *bool to allow explicit false override)

Closes #122

v1.7.0

Toggle v1.7.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: align GraphQL queries with upstream DataHub schema (#121)

Validated all 59 GraphQL query/mutation constants against the upstream
DataHub schema files (datahub-project/datahub v1.5.0.1) and fixed field
paths that did not match the actual API:

- documents.go: relatedAssets/relatedDocuments/parentDocument use wrapper
  objects (asset/document) rather than direct urn fields
- structured_properties.go: fragment target type is StructuredProperties
- data_contracts.go: DataContract uses properties/status, not result()
- semantic_search.go: use searchAcrossEntities with SearchAcrossEntitiesInput

Adds schema validation infrastructure to prevent future drift:
- testdata/datahub-schema/: 31 .graphql files from upstream v1.5.0.1
- testdata/datahub-schema/sync.sh: downloads schema for any tagged version
- schema_validation_test.go: validates all queries against schema files
- make schema-sync / make schema-check (included in make verify)

Updates CLAUDE.md with version compatibility matrix and schema workflow.

v1.6.0

Toggle v1.6.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
ci: bump anchore/sbom-action from 0.23.1 to 0.24.0 (#120)

Bumps [anchore/sbom-action](https://github.com/anchore/sbom-action) from 0.23.1 to 0.24.0.
- [Release notes](https://github.com/anchore/sbom-action/releases)
- [Changelog](https://github.com/anchore/sbom-action/blob/main/RELEASE.md)
- [Commits](anchore/sbom-action@57aae52...e22c389)

---
updated-dependencies:
- dependency-name: anchore/sbom-action
  dependency-version: 0.24.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Craig Johnston <cj@imti.co>

v1.5.0

Toggle v1.5.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat: consolidate write tools into CRUD pattern with full mutation co…

…verage (#113)

* feat: consolidate 7 write tools into 3 CRUD tools with full DataHub mutation coverage (#112)

Replace 7 fine-grained write tools (datahub_update_description, datahub_add_tag,
datahub_remove_tag, datahub_add_glossary_term, datahub_remove_glossary_term,
datahub_add_link, datahub_remove_link) with 3 consolidated CRUD tools using the
datahub_browse discriminator pattern:

- datahub_create: 10 operations (tag, domain, glossary_term, data_product,
  document, application, query, incident, structured_property, data_contract)
- datahub_update: 17 operations (description, column_description, tag,
  glossary_term, link, owner, domain, structured_properties,
  structured_property, incident_status, incident, query, document_contents,
  document_status, document_related_entities, document_sub_type, data_contract)
- datahub_delete: 8 operations (query, tag, domain, glossary_entity,
  data_product, application, document, structured_property)

Tool count: 16 → 12. Write operations: 7 → 35.

All GraphQL mutations verified against DataHub source schema files.

* fix: resolve 7 bugs in CRUD write tools and add client test coverage

- Wire Priority field through RaiseIncidentInput to GraphQL mutation
- Add UpdateIncidentStatus method honoring State field (ACTIVE/RESOLVED)
  instead of hardcoding RESOLVED in incident_status handler
- Auto-detect ownerEntityType (CORP_USER vs CORP_GROUP) from URN prefix
- Guard ownershipTypeUrn against double-prefix when full URN is passed
- Map AllowedValues in CreateStructuredProperty to GraphQL input
- Fix stale docs annotation table (3 write tools, not 7)
- Replace misleading errRequired with errInvalidAction for invalid
  action values, showing the actual vs expected values
- Add 7 client test files covering all 26 new client write methods
- Add 5 invalid-action test cases for update handler branches

Client coverage: 79.7% → 94.6%, patch coverage: 92%.

* fix: correct 10 GraphQL schema mismatches verified against DataHub source

All mutations verified against datahub-graphql-core/src/main/resources/*.graphql:

- createDataProduct: nest name/description inside properties, return {urn}
- createDocument: content→contents:{text}, status→state
- createApplication: nest name/description inside properties, return {urn}
- createStructuredProperty: flatten allowedValues (remove value wrapper)
- updateDocument* (all 4): move urn inside input object, fix field names
  (status→state, entityUrns→relatedAssets, text→contents:{text})
- UpdateIncident: remove non-existent type/customType fields
- UpdateStructuredProperty: flatten newAllowedValues (same as create fix)

* fix: correct GraphQL field names and add missing required field validations

- resourceUrn → resourceUrns (array) in RaiseIncident mutation
- propertyUrns → structuredPropertyUrns in RemoveStructuredProperties mutation
- Require entityTypes for CreateStructuredProperty (mandatory in DataHub API)
- Require incident_type for incident creation
- Require explicit state for incident status updates instead of defaulting to RESOLVED
- Update output schema descriptions for accuracy

* docs: add DataHub version compatibility notes (min 1.3.x, full 1.4.x)

Correct inaccurate version comments in client code and add version
compatibility tables to CLAUDE.md, README.md, and docs/server/tools.md
documenting which operations require DataHub 1.4.x+.

* fix: correct version compatibility claims verified against DataHub v1.3.0 source

Applications (create/delete), updateIncident, and deleteStructuredProperty
all exist in the DataHub v1.3.0 GraphQL schema — not 1.4.x+ as previously
claimed. Only document operations (documents.graphql) truly require 1.4.x+.

Verified by fetching actual schema files from the datahub-project/datahub
v1.3.0 tag: entity.graphql, incident.graphql, properties.graphql all
contain these mutations.

Corrects version tables in CLAUDE.md, README.md, docs/server/tools.md
and version comments across 9 source files (12 locations total).

* fix: require action for add/remove metadata ops and enforce per-connection write_enabled

- Remove global action default of "set" that broke tag/glossary_term/link/owner
  operations when action was omitted (4 of 6 metadata ops only accept add/remove)
- Add explicit action validation in tag/glossary_term/link/owner handlers
- Domain and structured_properties handlers default to "set" locally
- Enforce per-connection WriteEnabled override in getWriteClient: explicit false
  blocks writes, explicit true allows writes even when global is disabled
- Add IsWriteEnabled method to multiserver.Manager
- Add output value assertions (What, Action, TargetURN) to update tests
- Add tests for action-required metadata ops and per-connection write control
- Complete missing parameters in docs/server/tools.md create/update tables
- Fix action column in tools.md to show required vs not-used per what value

* test: add TargetURN assertions, validation edge cases, and error propagation

- Assert TargetURN output field in all metadata update tests
- Add structured_properties set/remove with empty inputs validation tests
- Add DeleteOutput.What assertion in delete tests
- Add client error propagation test for update handler

v1.4.3

Toggle v1.4.3's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: wrap structured property values in typed objects for GraphQL (#109)

UpsertStructuredProperties was passing raw values (e.g., "2 years", 30)
in the values array, but DataHub's GraphQL API expects typed value
objects ({"stringValue": "..."} or {"numberValue": ...}). This caused
the 'Expected type Map but was String' error on set_structured_property.

v1.4.2

Toggle v1.4.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: resolve four DataHub 1.4.x write method bugs (#108)

* fix: resolve four DataHub 1.4.x write method bugs (#107)

- Rename propertyUrn to structuredPropertyUrn in UpsertStructuredProperties
  GraphQL mutation input (REST field name was used in GraphQL context)
- Change UpdateIncidentStatusInput to IncidentStatusInput in ResolveIncident
  mutation (1.4.x schema change)
- Route tag/glossaryTerm/description writes for domain, glossaryTerm, and
  glossaryNode entities through GraphQL mutations instead of REST, because
  the REST API does not register globalTags, glossaryTerms, or editable
  description aspects for these entity types

* refactor: eliminate redundant LookupDescriptionAspect call in UpdateDescription

Resolve aspectInfo once in the public method and pass it to
updateDescriptionREST, avoiding a duplicate map lookup.

* fix: remove unnecessary leading newline flagged by whitespace linter

v1.4.1

Toggle v1.4.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: resolve three DataHub 1.4.x write method bugs (#106)

* fix: resolve three DataHub 1.4.x write method bugs

- Add GraphQL selection set to upsertStructuredProperties and
  removeStructuredProperties mutations (fixes SubselectionRequired error)
- Change raiseIncident to use singular resourceUrn field instead of
  resourceUrns array (fixes "at least 1 resource urn" error)
- Expand entity-type support in write methods to include domain,
  glossaryTerm, and glossaryNode for tags, glossary terms, and
  descriptions (fixes "unsupported entity type" errors)

* fix: use "definition" field for glossaryTermInfo description aspect

GlossaryTermInfo PDL schema uses "definition" not "description" for
the term text, matching the existing glossaryNodeInfo mapping.