Inzynierka_Gwiazdy/pig_scripts/system_table/join_single_dataset.pig

19 lines
1016 B
Pig

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();