Skip to content

Commit b8160ed

Browse files
authored
Merge pull request #196 from WengLab-InformaticsResearch/biolink_mapper
Fix issue caused by schema differences between cohd and cohd_covid da…
2 parents 46f43d9 + e30b230 commit b8160ed

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cohd/biolink_mapper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ def build_mappings() -> Tuple[str, int]:
651651
GROUP BY m.biolink_id, m.distance, m.string_similarity)
652652
653653
UPDATE biolink.mappings m
654-
JOIN ({" UNION ".join([f"SELECT * FROM {d}.concept_counts" for d in databases])}) cc
654+
JOIN ({" UNION ".join([f"SELECT concept_id, concept_count FROM {d}.concept_counts" for d in databases])}) cc
655655
ON m.omop_id = cc.concept_id
656656
JOIN max_count x ON m.biolink_id = x.biolink_id
657657
AND m.distance = x.distance
@@ -849,7 +849,7 @@ def build_mappings() -> Tuple[str, int]:
849849
GROUP BY m.biolink_id, m.distance, m.string_similarity)
850850
851851
UPDATE biolink.mappings m
852-
JOIN ({" UNION ".join(f"SELECT * FROM {d}.concept_counts" for d in databases)}) cc ON m.omop_id = cc.concept_id
852+
JOIN ({" UNION ".join(f"SELECT concept_id, concept_count FROM {d}.concept_counts" for d in databases)}) cc ON m.omop_id = cc.concept_id
853853
JOIN max_count x ON m.biolink_id = x.biolink_id
854854
AND m.string_similarity = x.string_similarity
855855
AND cc.concept_count = x.concept_count

0 commit comments

Comments
 (0)