Skip to content

40 fix schema translate map rel class - #41

Open
nicoloesch wants to merge 10 commits into
mainfrom
40-fix-schema-translate-map-rel-class
Open

nicoloesch wants to merge 10 commits into
mainfrom
40-fix-schema-translate-map-rel-class

Conversation

@nicoloesch

Copy link
Copy Markdown
Collaborator

Depends on AustralianCancerDataNetwork/omop-alchemy#57. Requires pyproject.toml version update for oa-configurator, orm-loader, and omop-alchemy

Summary

Root cause

  • relationship-classification was writing outside the configured CDM schema
    • a stale DROP TYPE no-op plus unqualified staging-table SQL.
  • The OAK-lib adapter (OMOPAlchemyImplementation) resolved a database URL but discarded its
    schema_translate_map, silently ignoring the configured schema for all ontology/concept
    traversal, not just this one command.
  • omop_resource()/ OMOPAlchemyImplementation never wired a configured split vocabulary connection through to a real second engine at all
    • KnowledgeGraph silently collapsed to one connection whenever a caller, including every production path, omitted vocab_engine explicitly.

Fix

  • relationship-classification now respects the configured CDM schema end to end
  • The OAK-lib adapter carries its schema_translate_map through to the engine it builds, and skips engine construction entirely when a caller injects kg= directly.
  • omop_resource() now builds both the primary and vocabulary engines via oa-configurator's create_engines(), and OMOPAlchemyImplementation accepts and forwards a real vocab_engine
    • a genuinely separate vocabulary connection is now supported end to end in production

Checklist

  • Applied exactly one label (breaking, feature, fix, dependencies, or chore)
  • Tests pass locally (uv run pytest -q): 46 passed
  • Lint passes (uv run ruff check .)

@nicoloesch nicoloesch added the fix Bug fix, backwards-compatible. PATCH: x.y.z+1 label Sep 7, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Bug fix, backwards-compatible. PATCH: x.y.z+1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

omop-graph relationship-classification load command does not honour non-default schema

1 participant