From 9a2005761565efaebf3a35b8d6eccf5a224d10bf Mon Sep 17 00:00:00 2001 From: Alessia Bardi Date: Thu, 29 Apr 2021 12:18:42 +0200 Subject: [PATCH] fixed query for organisations' pids --- .../eu/dnetlib/dhp/oa/graph/sql/queryOrganizations.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dhp-workflows/dhp-graph-mapper/src/main/resources/eu/dnetlib/dhp/oa/graph/sql/queryOrganizations.sql b/dhp-workflows/dhp-graph-mapper/src/main/resources/eu/dnetlib/dhp/oa/graph/sql/queryOrganizations.sql index af690b215c..11a8c50af1 100644 --- a/dhp-workflows/dhp-graph-mapper/src/main/resources/eu/dnetlib/dhp/oa/graph/sql/queryOrganizations.sql +++ b/dhp-workflows/dhp-graph-mapper/src/main/resources/eu/dnetlib/dhp/oa/graph/sql/queryOrganizations.sql @@ -25,7 +25,7 @@ SELECT o.country || '@@@dnet:countries' AS country, array[]::text[] AS alternativenames, 'sysimport:crosswalk:entityregistry@@@dnet:provenance_actions' AS provenanceaction, - array_agg(DISTINCT i.pid || '###' || i.issuertype || '@@@dnet:pid_types') AS pid + array_remove(array_agg(DISTINCT i.pid || '###' || i.issuertype || '@@@' || i.issuertype), NULL) AS pid FROM dsm_organizations o LEFT OUTER JOIN dsm_datasources d ON (d.id = o.collectedfrom) LEFT OUTER JOIN dsm_organizationpids p ON (p.organization = o.id) @@ -51,4 +51,4 @@ GROUP BY o.trust, d.id, d.officialname, - o.country; \ No newline at end of file + o.country