forked from datahub-project/datahub
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ingestion/kafka)-Add support for ingesting schemas from schema r…
…egistry (datahub-project#10612)
- Loading branch information
1 parent
80e687e
commit 8a90577
Showing
7 changed files
with
1,059 additions
and
56 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
14 changes: 12 additions & 2 deletions
14
metadata-ingestion/src/datahub/ingestion/source/kafka_schema_registry_base.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,22 @@ | ||
from abc import ABC, abstractmethod | ||
from typing import Optional | ||
from typing import List, Optional | ||
|
||
from datahub.metadata.com.linkedin.pegasus2avro.schema import SchemaMetadata | ||
|
||
|
||
class KafkaSchemaRegistryBase(ABC): | ||
@abstractmethod | ||
def get_schema_metadata( | ||
self, topic: str, platform_urn: str | ||
self, topic: str, platform_urn: str, is_subject: bool | ||
) -> Optional[SchemaMetadata]: | ||
pass | ||
|
||
@abstractmethod | ||
def get_subjects(self) -> List[str]: | ||
pass | ||
|
||
@abstractmethod | ||
def _get_subject_for_topic( | ||
self, dataset_subtype: str, is_key_schema: bool | ||
) -> Optional[str]: | ||
pass |
This file contains 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
This file contains 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
Oops, something went wrong.