Skip to content

Commit

Permalink
es sink fixes for ingestion
Browse files Browse the repository at this point in the history
  • Loading branch information
ulixius9 committed Jun 24, 2023
1 parent b7804be commit c1df6f9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions ingestion/src/metadata/utils/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@
"verifyCerts": "verify_certs",
}

ES_SOURCE_IGNORE_KEYS = {
"searchIndexMappingLanguage",
"batchSize",
"recreateIndex",
"type",
}

QUERY_WITH_OM_VERSION = '/* {"app": "OpenMetadata"'

QUERY_WITH_DBT = '/* {"app": "dbt"'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
)
from metadata.generated.schema.metadataIngestion.workflow import Sink
from metadata.generated.schema.type.basic import ComponentConfig
from metadata.utils.constants import ES_SOURCE_TO_ES_OBJ_ARGS
from metadata.utils.constants import ES_SOURCE_IGNORE_KEYS, ES_SOURCE_TO_ES_OBJ_ARGS


def build_elasticsearch_sink(
Expand All @@ -42,7 +42,7 @@ def build_elasticsearch_sink(
elasticsearch_source_config_dict = {
ES_SOURCE_TO_ES_OBJ_ARGS[key]: value
for key, value in ingestion_pipeline.sourceConfig.config.dict().items()
if value and key != "type"
if value and key not in ES_SOURCE_IGNORE_KEYS
}

return Sink(
Expand Down

0 comments on commit c1df6f9

Please sign in to comment.