forked from D-Net/dnet-hadoop
Merge pull request '[stats wf] added apcs in monitor db' (#207) from antonis.lempesis/dnet-hadoop:beta into beta
Reviewed-on: D-Net/dnet-hadoop#207
This commit is contained in:
commit
873369af1c
|
@ -90,6 +90,11 @@ compute stats TARGET.result_sources;
|
||||||
create table TARGET.result_topics stored as parquet as select * from SOURCE.result_topics orig where exists (select 1 from TARGET.result r where r.id=orig.id);
|
create table TARGET.result_topics stored as parquet as select * from SOURCE.result_topics orig where exists (select 1 from TARGET.result r where r.id=orig.id);
|
||||||
compute stats TARGET.result_topics;
|
compute stats TARGET.result_topics;
|
||||||
|
|
||||||
|
create table TARGET.result_apc stored as parquet as select * from SOURCE.result_apc orig where exists (select 1 from TARGET.result r where r.id=orig.id);
|
||||||
|
compute stats TARGET.result_apc;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
create view TARGET.foo1 as select * from SOURCE.result_result rr where rr.source in (select id from TARGET.result);
|
create view TARGET.foo1 as select * from SOURCE.result_result rr where rr.source in (select id from TARGET.result);
|
||||||
create view TARGET.foo2 as select * from SOURCE.result_result rr where rr.target in (select id from TARGET.result);
|
create view TARGET.foo2 as select * from SOURCE.result_result rr where rr.target in (select id from TARGET.result);
|
||||||
create table TARGET.result_result STORED AS PARQUET as select distinct * from (select * from TARGET.foo1 union all select * from TARGET.foo2) foufou;
|
create table TARGET.result_result STORED AS PARQUET as select distinct * from (select * from TARGET.foo1 union all select * from TARGET.foo2) foufou;
|
||||||
|
|
|
@ -11,7 +11,7 @@ SELECT substr(o.id, 4) as id,
|
||||||
FROM ${openaire_db_name}.organization o
|
FROM ${openaire_db_name}.organization o
|
||||||
WHERE o.datainfo.deletedbyinference = FALSE and o.datainfo.invisible = FALSE;
|
WHERE o.datainfo.deletedbyinference = FALSE and o.datainfo.invisible = FALSE;
|
||||||
|
|
||||||
CREATE OR REPLACE VIEW ${stats_db_name}.organization_datasources STORED AS PARQUET AS
|
CREATE OR REPLACE VIEW ${stats_db_name}.organization_datasources AS
|
||||||
SELECT organization AS id, id AS datasource
|
SELECT organization AS id, id AS datasource
|
||||||
FROM ${stats_db_name}.datasource_organizations;
|
FROM ${stats_db_name}.datasource_organizations;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue