[stats wf] various fixes, organization ids for inst. dashboard #205
|
@ -51,6 +51,3 @@ select * from openaire_prod_usage_stats.views_stats;
|
||||||
------------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------
|
||||||
create table ${stats_db_name}.creation_date STORED AS PARQUET as
|
create table ${stats_db_name}.creation_date STORED AS PARQUET as
|
||||||
select date_format(current_date(), 'dd-MM-yyyy') as date;
|
select date_format(current_date(), 'dd-MM-yyyy') as date;
|
||||||
--
|
|
||||||
-- ANALYZE TABLE ${stats_db_name}.creation_date COMPUTE STATISTICS;
|
|
||||||
-- ANALYZE TABLE ${stats_db_name}.creation_date COMPUTE STATISTICS FOR COLUMNS;
|
|
|
@ -113,7 +113,4 @@ FROM ${stats_db_name}.result_projects,
|
||||||
${stats_db_name}.project
|
${stats_db_name}.project
|
||||||
WHERE result_projects.id = result.id
|
WHERE result_projects.id = result.id
|
||||||
AND result.type = 'publication'
|
AND result.type = 'publication'
|
||||||
AND project.id = result_projects.project;
|
AND project.id = result_projects.project;
|
||||||
|
|
||||||
-- ANALYZE TABLE ${stats_db_name}.project COMPUTE STATISTICS;
|
|
||||||
-- ANALYZE TABLE ${stats_db_name}.project COMPUTE STATISTICS FOR COLUMNS;
|
|
|
@ -46,17 +46,4 @@ FROM (
|
||||||
LEFT OUTER JOIN (
|
LEFT OUTER JOIN (
|
||||||
SELECT substr(d.id, 4) id
|
SELECT substr(d.id, 4) id
|
||||||
from ${openaire_db_name}.datasource d
|
from ${openaire_db_name}.datasource d
|
||||||
WHERE d.datainfo.deletedbyinference=false and d.datainfo.invisible = FALSE) d on o.datasource = d.id;
|
WHERE d.datainfo.deletedbyinference=false and d.datainfo.invisible = FALSE) d on o.datasource = d.id;
|
||||||
|
|
||||||
-- ANALYZE TABLE ${stats_db_name}.publication_licenses COMPUTE STATISTICS;
|
|
||||||
-- ANALYZE TABLE ${stats_db_name}.publication_licenses COMPUTE STATISTICS FOR COLUMNS;
|
|
||||||
-- ANALYZE TABLE ${stats_db_name}.dataset_licenses COMPUTE STATISTICS;
|
|
||||||
-- ANALYZE TABLE ${stats_db_name}.dataset_licenses COMPUTE STATISTICS FOR COLUMNS;
|
|
||||||
-- ANALYZE TABLE ${stats_db_name}.software_licenses COMPUTE STATISTICS;
|
|
||||||
-- ANALYZE TABLE ${stats_db_name}.software_licenses COMPUTE STATISTICS FOR COLUMNS;
|
|
||||||
-- ANALYZE TABLE ${stats_db_name}.otherresearchproduct_licenses COMPUTE STATISTICS;
|
|
||||||
-- ANALYZE TABLE ${stats_db_name}.otherresearchproduct_licenses COMPUTE STATISTICS FOR COLUMNS;
|
|
||||||
-- ANALYZE TABLE ${stats_db_name}.organization_pids COMPUTE STATISTICS;
|
|
||||||
-- ANALYZE TABLE ${stats_db_name}.organization_pids COMPUTE STATISTICS FOR COLUMNS;
|
|
||||||
-- ANALYZE TABLE ${stats_db_name}.organization_sources COMPUTE STATISTICS;
|
|
||||||
-- ANALYZE TABLE ${stats_db_name}.organization_sources COMPUTE STATISTICS FOR COLUMNS;
|
|
|
@ -17,7 +17,4 @@ FROM ${stats_db_name}.datasource_organizations;
|
||||||
|
|
||||||
CREATE OR REPLACE VIEW ${stats_db_name}.organization_projects STORED AS PARQUET AS
|
CREATE OR REPLACE VIEW ${stats_db_name}.organization_projects STORED AS PARQUET AS
|
||||||
SELECT id AS project, organization as id
|
SELECT id AS project, organization as id
|
||||||
FROM ${stats_db_name}.project_organizations;
|
FROM ${stats_db_name}.project_organizations;
|
||||||
|
|
||||||
-- ANALYZE TABLE ${stats_db_name}.organization COMPUTE STATISTICS;
|
|
||||||
-- ANALYZE TABLE ${stats_db_name}.organization COMPUTE STATISTICS FOR COLUMNS;
|
|
Loading…
Reference in New Issue