mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-24 17:08:28 +00:00
ES pipeline minor changes (#6565)
This commit is contained in:
parent
c6d35f7c4c
commit
12f81c43f8
@ -39,7 +39,7 @@ logger = ingestion_logger()
|
||||
|
||||
T = TypeVar("T")
|
||||
|
||||
SIMPLE_SOURCE = {"sample-data", "sample-usage", "metadata_elasticsearch"}
|
||||
SAMPLE_SOURCE = {"sample-data", "sample-usage"}
|
||||
|
||||
|
||||
class InvalidWorkflowJSONException(Exception):
|
||||
@ -258,7 +258,9 @@ class Workflow:
|
||||
# We override the current serviceConnection source object if source workflow service already exists in OM.
|
||||
# We retrieve the service connection from the secrets' manager when it is configured. Otherwise, we get it
|
||||
# from the service object itself.
|
||||
if not self._is_sample_source(self.config.source.type):
|
||||
if service_type is not ServiceType.Metadata and not self._is_sample_source(
|
||||
self.config.source.type
|
||||
):
|
||||
metadata = OpenMetadata(config=metadata_config)
|
||||
service = metadata.get_by_name(
|
||||
get_service_class_from_service_type(service_type),
|
||||
@ -273,4 +275,4 @@ class Workflow:
|
||||
|
||||
@staticmethod
|
||||
def _is_sample_source(service_type):
|
||||
return service_type in SIMPLE_SOURCE
|
||||
return service_type in SAMPLE_SOURCE
|
||||
|
@ -4,9 +4,6 @@ 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):
|
||||
|
@ -25,6 +25,7 @@ from metadata.utils.class_helper import (
|
||||
("clickhouse_usage", ServiceType.Database),
|
||||
("sample-data", ServiceType.Database),
|
||||
("redshift-usage", ServiceType.Database),
|
||||
("metadata_elasticsearch", ServiceType.Metadata),
|
||||
],
|
||||
)
|
||||
def test_get_service_type_from_source_type(
|
||||
|
Loading…
x
Reference in New Issue
Block a user