From ec52141f1a4d864083025abfb2ea0279f617fc43 Mon Sep 17 00:00:00 2001 From: antleb <50_David> Date: Tue, 30 Jun 2020 01:49:56 +0300 Subject: [PATCH] changed refereed type from value to clssname --- .../graph/stats/oozie_app/scripts/step15.sql | 56 +++++++++---------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/dhp-workflows/dhp-stats-update/src/main/resources/eu/dnetlib/dhp/oa/graph/stats/oozie_app/scripts/step15.sql b/dhp-workflows/dhp-stats-update/src/main/resources/eu/dnetlib/dhp/oa/graph/stats/oozie_app/scripts/step15.sql index a638d7163..41d80405d 100644 --- a/dhp-workflows/dhp-stats-update/src/main/resources/eu/dnetlib/dhp/oa/graph/stats/oozie_app/scripts/step15.sql +++ b/dhp-workflows/dhp-stats-update/src/main/resources/eu/dnetlib/dhp/oa/graph/stats/oozie_app/scripts/step15.sql @@ -11,31 +11,31 @@ -- When it is ready they should be added to the to statistic recalculation -- for the impala tables and the shadow views --- CREATE TABLE IF NOT EXISTS ${stats_db_name}.publication_refereed as --- select substr(r.id, 4) as id, inst.refereed.value as refereed --- from ${openaire_db_name}.publication r lateral view explode(r.instance) instances as inst --- where r.datainfo.deletedbyinference=false; --- --- CREATE TABLE IF NOT EXISTS ${stats_db_name}.dataset_refereed as --- select substr(r.id, 4) as id, inst.refereed.value as refereed --- from ${openaire_db_name}.dataset r lateral view explode(r.instance) instances as inst --- where r.datainfo.deletedbyinference=false; --- --- CREATE TABLE IF NOT EXISTS ${stats_db_name}.software_refereed as --- select substr(r.id, 4) as id, inst.refereed.value as refereed --- from ${openaire_db_name}.software r lateral view explode(r.instance) instances as inst --- where r.datainfo.deletedbyinference=false; --- --- CREATE TABLE IF NOT EXISTS ${stats_db_name}.otherresearchproduct_refereed as --- select substr(r.id, 4) as id, inst.refereed.value as refereed --- from ${openaire_db_name}.otherresearchproduct r lateral view explode(r.instance) instances as inst --- where r.datainfo.deletedbyinference=false; --- --- CREATE VIEW IF NOT EXISTS ${stats_db_name}.result_refereed as --- select * from ${stats_db_name}.publication_refereed --- union all --- select * from ${stats_db_name}.dataset_refereed --- union all --- select * from ${stats_db_name}.software_refereed --- union all --- select * from ${stats_db_name}.otherresearchproduct_refereed; +CREATE TABLE IF NOT EXISTS ${stats_db_name}.publication_refereed as +select substr(r.id, 4) as id, inst.refereed.classsname as refereed +from ${openaire_db_name}.publication r lateral view explode(r.instance) instances as inst +where r.datainfo.deletedbyinference=false; + +CREATE TABLE IF NOT EXISTS ${stats_db_name}.dataset_refereed as +select substr(r.id, 4) as id, inst.refereed.classsname as refereed +from ${openaire_db_name}.dataset r lateral view explode(r.instance) instances as inst +where r.datainfo.deletedbyinference=false; + +CREATE TABLE IF NOT EXISTS ${stats_db_name}.software_refereed as +select substr(r.id, 4) as id, inst.refereed.classsname as refereed +from ${openaire_db_name}.software r lateral view explode(r.instance) instances as inst +where r.datainfo.deletedbyinference=false; + +CREATE TABLE IF NOT EXISTS ${stats_db_name}.otherresearchproduct_refereed as +select substr(r.id, 4) as id, inst.refereed.classsname as refereed +from ${openaire_db_name}.otherresearchproduct r lateral view explode(r.instance) instances as inst +where r.datainfo.deletedbyinference=false; + +CREATE VIEW IF NOT EXISTS ${stats_db_name}.result_refereed as +select * from ${stats_db_name}.publication_refereed +union all +select * from ${stats_db_name}.dataset_refereed +union all +select * from ${stats_db_name}.software_refereed +union all +select * from ${stats_db_name}.otherresearchproduct_refereed;