Update step20-createMonitorDB.sql

Add result_orcid table to monitor dbs
This commit is contained in:
dimitrispie 2023-10-09 14:21:31 +03:00
parent 489a082f04
commit 17586f0ff8
1 changed files with 2 additions and 0 deletions

View File

@ -162,6 +162,8 @@ create table TARGET.result_fos stored as parquet as select * from SOURCE.result_
create table TARGET.result_accessroute stored as parquet as select * from SOURCE.result_accessroute orig where exists (select 1 from TARGET.result r where r.id=orig.id);
--ANALYZE TABLE TARGET.result_accessroute COMPUTE STATISTICS;
create table TARGET.result_orcid stored as parquet as select * from SOURCE.result_orcid orig where exists (select 1 from TARGET.result r where r.id=orig.id);
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 table TARGET.result_result STORED AS PARQUET as select distinct * from (select * from TARGET.foo1 union all select * from TARGET.foo2) foufou;