Skip to content

Conversation

@10elements
Copy link

@10elements 10elements commented Jan 23, 2026

Describe your changes:

Fixes #25199

Implements tag inheritance from database -> schema -> table for Snowflake connector. Previously only schema -> table inheritance was supported.

Changes:

  • Add SNOWFLAKE_FETCH_DATABASE_TAGS query to fetch database-level tags
  • Add database_tags_map storage and set_database_tags_map() method
  • Add yield_database_tag() to expose database tags to topology
  • Update get_schema_tag_labels() to inherit database tags
  • Update get_tag_labels() to inherit both schema and database tags
  • Implement tag value precedence: lower-level values override inherited values (e.g., if both database and table have ENV tag, table's value wins)
  • Add unit tests for database tag inheritance and tag value precedence

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.

Summary by Gitar

  • Database tag support:
    • New SNOWFLAKE_FETCH_DATABASE_TAGS query and set_database_tags_map() method fetch and store database-level tags
  • Three-level inheritance:
    • Implements database → schema → table tag propagation with precedence rules (lower-level values override inherited ones)
  • Test coverage:
    • Added test_database_tag_inheritance() and test_tag_value_precedence() covering inheritance chains and conflict resolution

This will update automatically on new commits.


Implements tag inheritance from database -> schema -> table for Snowflake
connector. Previously only schema -> table inheritance was supported.

Changes:
- Add SNOWFLAKE_FETCH_DATABASE_TAGS query to fetch database-level tags
- Add database_tags_map storage and set_database_tags_map() method
- Add yield_database_tag() to expose database tags to topology
- Update get_schema_tag_labels() to inherit database tags
- Update get_tag_labels() to inherit both schema and database tags
- Implement tag value precedence: lower-level values override inherited
  values (e.g., if both database and table have ENV tag, table's value wins)
- Add unit tests for database tag inheritance and tag value precedence

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@github-actions
Copy link
Contributor

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!

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.

Add database to the snowflake tag inheritance hierarchy

3 participants