Added Pig scripts for extracting data from 'system' table
This commit is contained in:
parent
3faabb822c
commit
f94e14fc89
12
pig_scripts/system_table/generate_columns_single_dataset.pig
Normal file
12
pig_scripts/system_table/generate_columns_single_dataset.pig
Normal 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();
|
11
pig_scripts/system_table/generate_columns_whole_mocca.pig
Normal file
11
pig_scripts/system_table/generate_columns_whole_mocca.pig
Normal 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();
|
18
pig_scripts/system_table/join_single_dataset.pig
Normal file
18
pig_scripts/system_table/join_single_dataset.pig
Normal 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();
|
18
pig_scripts/system_table/join_whole_mocca.pig
Normal file
18
pig_scripts/system_table/join_whole_mocca.pig
Normal 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();
|
Loading…
Reference in New Issue
Block a user