pig中的独立元组

xdyibdwo  于 2021-06-02  发布在  Hadoop
关注(0)|答案(1)|浏览(347)

我得到了一个以元组的形式出现的结果。我需要把一个元组中的所有数据放到一列中,另一列放到另一列中。我不知道怎么做到。下面是我的数据。
样品:

((completed,completed,completed,completed,completed,completed,completed,completed,completed,completed,completed,completed,completed,completed,completed,completed,completed,completed,completed),(10160-0),(20140403,20151207,20160313,20101225,20100420,20110208,20100419,20110310,20100412,20120130,20110729),(20160306,20110822,20110822,20110822,20110321,20110608,20110822,20120326,20110822),(24,12,24,24,7,24,8,8,7,24,24,24,24,6),(h,h,h,h,d,h,h,h,d,h,h,h,h,h),(1,30,1,1,1,1,1,1,1,30,1,1,1,1,0.0,1,1,1),(1,Ointment,Tablet,Tablet,1,Tablet,1,1,Cream,Ointment,1,Tablet_ER_24HR,1,1,Tablet,Cream,Tablet_Disperse,Teaspoon(s))

预计产量:

completed,10160-0,20140403,20160306,24,h,1,1
completed,10160-0,20151207,20110822,12,h,30,Ointment
completed,10160-0,20160313,20110822,24,h,1,Tablet
completed,10160-0,20101225,20110822,24,h,1,1
completed,10160-0,20100420,20110321,7,h,1,,1
completed,10160-0,20110208,20110608,24,h,1,Cream
completed,10160-0,20100419,20110822,8,h,1,Ointment
completed,10160-0,20110310,20120326,8,d,1,1
completed,10160-0,20100412,20110822,7,h,30,Tablet_ER_24HR
55ooxyrt

55ooxyrt1#

tobag应该这样做。假设你和元组的元组有关系。

B = FOREACH A GENERATE TOBAG(*);

相关问题