diff --git a/dhp-workflows/dhp-indicators/src/main/resources/eu/dnetlib/dhp/oa/graph/indicators/oozie_app/scripts/createIndicatorsTablesSprint2.sql b/dhp-workflows/dhp-indicators/src/main/resources/eu/dnetlib/dhp/oa/graph/indicators/oozie_app/scripts/createIndicatorsTablesSprint2.sql index f8a47e274..cd02aee25 100644 --- a/dhp-workflows/dhp-indicators/src/main/resources/eu/dnetlib/dhp/oa/graph/indicators/oozie_app/scripts/createIndicatorsTablesSprint2.sql +++ b/dhp-workflows/dhp-indicators/src/main/resources/eu/dnetlib/dhp/oa/graph/indicators/oozie_app/scripts/createIndicatorsTablesSprint2.sql @@ -171,8 +171,8 @@ group by d.type, year) select year, type, round(no_of_pubs/total*100,3) averageOfPubs from total -create table TARGET.indi_pub_has_cc_licence_tr stored as parquet as -select distinct p.id, (case when lic='' or lic is null then 0 else 1 end) as has_cc_license_tr +create table TARGET.indi_pub_has_cc_licence stored as parquet as +select distinct p.id, (case when lic='' or lic is null then 0 else 1 end) as has_cc_license from SOURCE.publication p left outer join (select p.id, license.type as lic from SOURCE.publication p join SOURCE.publication_licenses as license on license.id = p.id @@ -188,13 +188,6 @@ join SOURCE.publication_licenses as license on license.id = p.id WHERE lower(parse_url(license.type, 'HOST')) = 'creativecommons.org') tmp on p.id= tmp.id -create table TARGET.indi_pub_has_cc_licence_f stored as parquet as -select distinct p.id, (case when lic='' or lic is null then 0 else 1 end) as has_cc_license_f -from SOURCE.publication p -left outer join (select p.id, license.type as lic from SOURCE.publication p -join SOURCE.publication_licenses as license on license.id = p.id -where lower(license.type) LIKE '%creativecommons.org%' OR lower(license.type) LIKE '%cc-%') tmp -on p.id= tmp.id create table TARGET.indi_pub_has_abstract stored as parquet as select distinct publication.id, coalesce(abstract, 1) has_abstract @@ -216,7 +209,6 @@ compute stats TARGET.indi_other_avg_year_content_oa; compute stats TARGET.indi_software_avg_year_content_oa; compute stats TARGET.indi_dataset_avg_year_content_oa; compute stats TARGET.indi_pub_avg_year_content_oa; -compute stats TARGET.indi_pub_has_cc_licence_tr; +compute stats TARGET.indi_pub_has_cc_licence; compute stats TARGET.indi_pub_has_cc_licence_url; -compute stats TARGET.indi_pub_has_cc_licence_f; compute stats TARGET.indi_pub_has_abstract; \ No newline at end of file