nebw #3: domains <-> UC governed tags, bidirectional - #737
Draft
larsgeorge-db wants to merge 2 commits into
Draft
larsgeorge-db wants to merge 2 commits into
larsgeorge-db wants to merge 2 commits into
Conversation
Represent Ontos data domains as Databricks Discover governed tags and import
them back, per the verified constraint that Discover Domains are layered on
governed tags (no domain-card API, no native domain flag).
Outbound (uc_tag_sync job): when use_governed_domain_tag is set, emit the
domain as the 'databricks_domain' governed tag with the Discover key
convention -- '{domain}' for top-level, '{parent}/{subdomain}' for subdomains
-- replacing the plain ontos_data_domain_name tag. The domain read SQL now
joins the parent domain; the yaml default enables the flag. The convention is
inlined in the job (ships to the cluster as a standalone file) and mirrored by
the shared, tested src/common/governed_tags.py.
Inbound (app-side): DomainUcSyncManager parses governed-tag values into
create/exists proposals (auto-inserting missing parents, deduped, ordered
parents-before-subdomains), opens an Asset Review for approval, and applies an
approved import idempotently. Routes: POST /data-domains/import-from-uc/
{preview,review,apply}.
Also fixes a latent bug in create_domain_internal: it did not stringify a UUID
parent_id / caller id for the String PK columns (broke under SQLite).
Discover Domain *card* creation stays a manual UI step; a UC reader to feed the
import endpoints is a documented follow-up. See docs/plans/nebw-domain-uc-sync.md.
Session: claude -r 01d95399-c840-4b99-b76c-735490295c66
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.
Summary
nebw feature #3: represent Ontos data domains as Databricks Discover governed tags and import them back, bidirectionally.
Grounded in a verified 2026 constraint: Discover Domains are layered on governed tags — there is no public API to create a Discover Domain card and no native "this tag is a domain" flag. So the programmatic contract is the governed-tag key/value convention Discover reads (
{domain},{parent}/{subdomain}); the domain card itself stays a documented manual UI step.Base is nebw-bugfixes (stacked on PR #735).
Changes
Shared —
src/common/governed_tags.py: pure key/value convention, parse, and parent-before-subdomain ordering helpers (fully unit-tested).Outbound (
uc_tag_syncjob): whenuse_governed_domain_tagis set (yaml default on), sync the domain as thedatabricks_domaingoverned tag with the Discover convention, replacing the plainontos_data_domain_nametag. Domain read SQL now joins the parent domain so subdomains emit{parent}/{subdomain}. The convention is inlined in the standalone cluster job and mirrored by the shared module.Inbound (app-side) —
DomainUcSyncManager: parse governed-tag values → create/exists proposals (auto-inserting missing parents, deduped, ordered), open an Asset Review for approval (per decision), and apply an approved import idempotently (parents before subdomains). Routes:POST /data-domains/import-from-uc/{preview,review,apply}.Fix:
create_domain_internaldid not stringify a UUIDparent_id/ caller id for the String PK columns (broke under SQLite) — corrected, consistent withcreate_domain.Testing
49 unit tests across the helper, inbound manager, outbound job (stubbed pyspark import), and the domain repository. Broad domain + version suites green, no regressions.
Decisions applied
Follow-ups (documented, not in this PR)
tag_valuesin the body).Note
Push used
SKIP_SECRET_SCAN=1for the same pre-existing historical secrets already onmain/development(see #735); none are new in this branch.