Skip to content

Commit 09ef6e0

Browse files
authored
fix(ingest): remove duplication of tags (#8532)
1 parent 0593e23 commit 09ef6e0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

metadata-ingestion/src/datahub/ingestion/transformer/dataset_transformer.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,11 @@ def update_if_keep_existing(
7575
) -> None:
7676
"""Check if user want to keep existing tags"""
7777
if in_global_tags_aspect is not None and config.replace_existing is False:
78-
out_global_tags_aspect.tags.extend(in_global_tags_aspect.tags)
78+
tags_seen = set()
79+
for item in in_global_tags_aspect.tags:
80+
if item.tag not in tags_seen:
81+
out_global_tags_aspect.tags.append(item)
82+
tags_seen.add(item.tag)
7983

8084
@staticmethod
8185
def get_result_semantics(

0 commit comments

Comments
 (0)