-
Notifications
You must be signed in to change notification settings - Fork 3.3k
feat(ingest/kafka-connect): Kafka connect infer lineage from DataHub #15234
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
Open
treff7es
wants to merge
8
commits into
kafka_connect_cloud_improvements
Choose a base branch
from
kafak_connect_datahub_infer_lineage
base: kafka_connect_cloud_improvements
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feat(ingest/kafka-connect): Kafka connect infer lineage from DataHub #15234
treff7es
wants to merge
8
commits into
kafka_connect_cloud_improvements
from
kafak_connect_datahub_infer_lineage
Conversation
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
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
fa085cd to
2ede18b
Compare
bf95de8 to
724d682
Compare
73e26fc to
e2ce77f
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
ingestion
PR or Issue related to the ingestion of metadata
needs-review
Label for PRs that need review from a maintainer.
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
This PR adds automatic lineage inference from DataHub to the Kafka Connect source connector. Instead of relying solely on connector manifests, the ingestion can now query DataHub's metadata graph to resolve schemas and generate both table-level and column-level lineage.
Motivation
Currently, Kafka Connect lineage extraction is limited by what's explicitly declared in connector configurations. This PR enables:
table.include.list: "database.*"can now be resolved to actual table names by querying DataHubChanges
New Configuration Options
Added three new configuration fields to
KafkaConnectSourceConfig:Core Components
SchemaResolver Integration (
connector_registry.py):create_schema_resolver()method to instantiate schema resolvers with platform-specific configurationsFine-Grained Lineage Extraction (
common.py):_extract_fine_grained_lineage()method inBaseConnectorFineGrainedLineageClassinstances for column-level lineageSnowflake Source Connector (
source_connectors.py):ANALYTICS.PUBLIC.*→ actual tables)Platform Support (
source_connectors.py):Code Quality Improvements
_derive_topics_from_config()extract_lineages(),extract_flow_property_bag())Usage
Before (pattern-based config):
After (schema-aware):
Testing
New test coverage:
Breaking Changes
None - All features are opt-in via configuration flags. Existing Kafka Connect ingestions continue to work unchanged.
Default behavior (backward compatible):
use_schema_resolver: false(disabled by default)Documentation
All configuration options include comprehensive descriptions:
use_schema_resolver: Master switch for the featureschema_resolver_expand_patterns: Controls pattern expansion behaviorschema_resolver_finegrained_lineage: Controls column-level lineage generation🤖 Generated with Claude Code
Co-Authored-By: Claude [email protected]