-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Fix : Assign domains to queries based on queryUsedIn entities #25256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
TypeScript types have been updated based on the JSON schema changes in the PR |
openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/QueryRepository.java
Show resolved
Hide resolved
openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/QueryRepository.java
Outdated
Show resolved
Hide resolved
openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/QueryRepository.java
Show resolved
Hide resolved
openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/QueryRepository.java
Show resolved
Hide resolved
|
@sonika-shah this requires db migrations right? |
@harshach this will not require db migrations as we are calculating query domain on fly, reindex once should be enough |
|
|



Describe your changes:
Fixes #17323 #23269
Summary
Implements automatic domain assignment for Query entities based on the domains of entities referenced in the
queryUsedInfield. Queries now inherit all unique domainsfrom their associated entities (tables, dashboards, etc.), similar to how Users and Teams support multiple domains.
Changes
Backend Changes
Domain Rule Bypass (
entityRulesSettings.json)querytoignoredEntitiesfor "Multiple Domains are not allowed" rulequerytoignoredEntitiesfor "Data Product Domain Validation" ruleAuto-Domain Computation (
QueryRepository.java)computeDomainsFromQueryUsage()- Extracts unique domains from all entities inqueryUsedInprepare()- Auto-computes and sets domains before storingQueryUpdater.entitySpecificUpdate()- Recomputes domains whenqueryUsedInchangesIgnore Manual Assignments (
QueryMapper.java)copy()method to setdomains = nullAPI Schema Documentation (
createQuery.json)Testing
Unit Tests (
QueryResourceTest.java)test_queryInheritsDomainsFromQueryUsedIn- Verifies single domain inheritancetest_queryInheritsMultipleDomainsFromQueryUsedIn- Verifies multiple domain supporttest_queryDomainsUpdatedWhenQueryUsedInChanges- Verifies domain updates on changestest_queryDomainsClearedWhenQueryUsedInEmpty- Verifies domains cleared when emptytest_manualDomainAssignmentsIgnored- Verifies manual assignments are ignoredIntegration Tests (
QueryResourceIT.java)I worked on ... because ...
Type of change:
Checklist:
Fixes <issue-number>: <short explanation>