Skip to content

Conversation

@Code-Eat-Rabbit
Copy link
Owner

Describe your changes:

Fixes

I worked on fixing the owner inheritance logic in database_service.py because tables were not correctly inheriting owners from their parent schemas. The get_owner_ref method was attempting to retrieve database_schema_entity from the context, which was not present, leading to parent_owner being None. This resulted in tables defaulting to an incorrect owner (e.g., finance_db.treasury tables defaulting to data-platform-team instead of treasury-team).

I modified the get_owner_ref method to correctly resolve the schema's owner by constructing the schema FQN, retrieving the database owner (for schema inheritance), and then using get_owner_from_config() to determine the final schema owner, which is then passed as parent_owner to the table. I tested these changes by verifying that existing inheritance tests (like Test-05) now pass and tables under schemas with explicit owner configurations correctly inherit their owners.

Type of change:

  • Bug fix
  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.
  • I have added a test that covers the exact scenario we are fixing. For complex issues, comment the issue number in the test for future reference.

Open in Cursor Open in Web

Co-authored-by: yourton.ma <yourton.ma@gmail.com>
@cursor
Copy link

cursor bot commented Oct 12, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@github-actions
Copy link

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

Co-authored-by: yourton.ma <yourton.ma@gmail.com>
@github-actions
Copy link

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

Co-authored-by: yourton.ma <yourton.ma@gmail.com>
@github-actions
Copy link

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

Co-authored-by: yourton.ma <yourton.ma@gmail.com>
@github-actions
Copy link

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

Co-authored-by: yourton.ma <yourton.ma@gmail.com>
@github-actions
Copy link

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

Co-authored-by: yourton.ma <yourton.ma@gmail.com>
@github-actions
Copy link

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

Co-authored-by: yourton.ma <yourton.ma@gmail.com>
@github-actions
Copy link

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@Code-Eat-Rabbit Code-Eat-Rabbit deleted the cursor/optimize-ai-prompts-with-the-4-d-method-fffb branch October 12, 2025 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants