mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2026-01-07 21:16:45 +00:00
Revert Rename on MetadataEs (#6537)
This commit is contained in:
parent
3e810f1401
commit
91d9e810ea
18
ingestion/pipelines/metadata_to_es.yaml
Normal file
18
ingestion/pipelines/metadata_to_es.yaml
Normal 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
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user