Optimize ai prompts with the 4-d method #10
Merged
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.
Describe your changes:
Fixes
I worked on fixing the owner inheritance mechanism within the ingestion module. The previous implementation failed to correctly apply inherited owners for schemas and tables (e.g.,
test-05scenario wherefinance_db.treasurytables incorrectly defaulted todata-platform-teaminstead oftreasury-team). This was due to the context attempting to retrieve full entity objects (database_entity,database_schema_entity) which were not present, leading to a broken inheritance chain.My changes involve:
database_ownerandschema_ownernames directly into the context during theyield_databaseandyield_database_schemaprocesses incommon_db_source.py.get_schema_owner_refandget_owner_refindatabase_service.pyto retrieve these owner names directly from the context, ensuring the correct inheritance hierarchy (explicitly defined owner > schema owner > database owner > default owner).These modifications were made to resolve the inheritance bug by operating on owner names stored in the context, without altering generic infrastructure files like
topology_runner.py.I tested my changes by running the
test-05-inheritance-enabled.yamlingestion test. The test now passes, with tables underfinance_db.treasurycorrectly inheritingtreasury-teamand tables underfinance_db.accountinginheritingfinance-team, as per the defined inheritance rules.Type of change:
Checklist:
Fixes <issue-number>: <short explanation>