Revert Rename on MetadataEs (#6537)

This commit is contained in:
Mayur Singal 2022-08-03 19:36:09 +05:30 committed by GitHub
parent 3e810f1401
commit 91d9e810ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 27 additions and 1 deletions

View File

@ -0,0 +1,18 @@
source:
type: metadata_elasticsearch
serviceName: openMetadata
serviceConnection:
config:
type: MetadataES
sourceConfig:
config: {}
sink:
type: elasticsearch
config:
es_host: localhost
es_port: 9200
recreate_indexes: true
workflowConfig:
openMetadataServerConfig:
hostPort: 'http://localhost:8585/api'
authProvider: no-auth

View File

@ -39,6 +39,8 @@ logger = ingestion_logger()
T = TypeVar("T")
SIMPLE_SOURCE = {"sample-data", "sample-usage", "metadata_elasticsearch"}
class InvalidWorkflowJSONException(Exception):
"""
@ -271,4 +273,4 @@ class Workflow:
@staticmethod
def _is_sample_source(service_type):
return service_type == "sample-data" or service_type == "sample-usage"
return service_type in SIMPLE_SOURCE

View File

@ -74,6 +74,7 @@ class MetadataSource(Source[Entity]):
self.config = config
self.metadata_config = metadata_config
self.metadata = OpenMetadata(metadata_config)
self.service_connection = config.serviceConnection.__root__.config
self.status = MetadataSourceStatus()
self.wrote_something = False
self.tables = None

View File

@ -4,6 +4,9 @@ from typing import Type
from pydantic import BaseModel
from metadata.generated.schema.entity.services.serviceType import ServiceType
from metadata.utils.logger import utils_logger
logger = utils_logger()
def _clean(source_type: str):
@ -12,6 +15,8 @@ def _clean(source_type: str):
source_type = source_type.replace("_", "")
if source_type == "sample":
source_type = "sampledata"
if source_type == "metadataelasticsearch":
source_type = "metadataes"
return source_type