From 11b22b2d23fa6a96a568a316434509b9c1be0f66 Mon Sep 17 00:00:00 2001 From: miconis Date: Thu, 8 Apr 2021 11:51:47 +0200 Subject: [PATCH] bug fix in the query, it now exports only relations with non-hidden organizations --- .../sql/queryOpenOrgsSimilarityForProvision.sql | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/dhp-workflows/dhp-graph-mapper/src/main/resources/eu/dnetlib/dhp/oa/graph/sql/queryOpenOrgsSimilarityForProvision.sql b/dhp-workflows/dhp-graph-mapper/src/main/resources/eu/dnetlib/dhp/oa/graph/sql/queryOpenOrgsSimilarityForProvision.sql index 92462d0cd..e127e6785 100644 --- a/dhp-workflows/dhp-graph-mapper/src/main/resources/eu/dnetlib/dhp/oa/graph/sql/queryOpenOrgsSimilarityForProvision.sql +++ b/dhp-workflows/dhp-graph-mapper/src/main/resources/eu/dnetlib/dhp/oa/graph/sql/queryOpenOrgsSimilarityForProvision.sql @@ -1,7 +1,7 @@ -- relations approved by the user and suggested by the dedup SELECT - local_id AS id1, - oa_original_id AS id2, + d.local_id AS id1, + d.oa_original_id AS id2, 'openaire____::openorgs' AS collectedfromid, 'OpenOrgs Database' AS collectedfromname, false AS inferred, @@ -9,6 +9,10 @@ SELECT 0.99 AS trust, '' AS inferenceprovenance FROM - oa_duplicates + oa_duplicates d + +LEFT OUTER JOIN + organizations o ON (d.local_id = o.id) + WHERE - reltype = 'is_similar' OR reltype = 'suggested'; \ No newline at end of file + (d.reltype = 'is_similar' OR d.reltype = 'suggested') AND (o.status != 'hidden'); \ No newline at end of file