Added Pig scripts for extracting data from 'system' table

This commit is contained in:
Michał Ciesiółka 2023-12-30 21:28:07 +01:00
parent 3faabb822c
commit f94e14fc89
4 changed files with 59 additions and 0 deletions

View File

@ -0,0 +1,12 @@
-- change the dataset id if needed
sys = load 'datasets="mocca 01f4f7bfadd9ee5ab2568d73ee7b9dda" tables="system"' using BeansTable();
sys = foreach sys generate DSID(tbid) as dsid,
DSPARAMSTRING(DSID(tbid), 'moccaid') as moccaid,
tphys,
smt,
r1,
rcob,
rchut2,
rhob,
vc;
store sys into 'name="sys_01f4f7bfadd9ee5ab2568d73ee7b9dda"' using BeansTable();

View File

@ -0,0 +1,11 @@
sys = load 'datasets="mocca " tables="system"' using BeansTable();
sys = foreach sys generate DSID(tbid) as dsid,
DSPARAMSTRING(DSID(tbid), 'moccaid') as moccaid,
tphys,
smt,
r1,
rcob,
rchut2,
rhob,
vc;
store sys into 'name="sys_all_datasets_data"' using BeansTable();

View File

@ -0,0 +1,18 @@
sys = load 'datasets="Testing Notebook" tables="sys_01f4f7bfadd9ee5ab2568d73ee7b9dda"' using BeansTable();
collapse = load 'datasets="core collapse and blue stragglers" tables="collapseMyr_vs_bssdynBssEvol"' using BeansTable();
j = join sys by moccaid, collapse by dsid;
j = foreach j generate sys::tbid as tbid,
sys::dsid as dsid,
sys::moccaid as moccaid,
sys::tphys as tphys,
sys::smt as smt,
sys::r1 as r1,
sys::rcob as rcob,
sys::rchut2 as rchut2,
sys::rhob as rhob,
sys::vc as vc,
collapse::collapseMyr as collapseMyr,
collapse::confidence as confidence,
(sys::tphys < collapse::collapseMyr ? 0 : 1) as collapsed:int
;
store j into 'name="sys_01f4f7bfadd9ee5ab2568d73ee7b9dda_with_collapse"' using BeansTable();

View File

@ -0,0 +1,18 @@
sys = load 'datasets="Testing Notebook" tables="sys_all_datasets_data"' using BeansTable();
collapse = load 'datasets="core collapse and blue stragglers" tables="collapseMyr_vs_bssdynBssEvol"' using BeansTable();
j = join sys by moccaid, collapse by dsid;
j = foreach j generate sys::tbid as tbid,
sys::dsid as dsid,
sys::moccaid as moccaid,
sys::tphys as tphys,
sys::smt as smt,
sys::r1 as r1,
sys::rcob as rcob,
sys::rchut2 as rchut2,
sys::rhob as rhob,
sys::vc as vc,
collapse::collapseMyr as collapseMyr,
collapse::confidence as confidence,
(sys::tphys < collapse::collapseMyr ? 0 : 1) as collapsed:int
;
store j into 'name="sys_all_datasets_with_collapse"' using BeansTable();