我的结果是元组元组的形式。我需要将一个元组中的所有数据放入一个列中,将其他数据放入另一个列中。我不知道如何实现这一目标。以下是我的数据。
示例:
((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
答案 0 :(得分:0)
TOBAG应该这样做。假设你与元组元组有关系A.
B = FOREACH A GENERATE TOBAG(*);