β

[PIG] Flatten的使用示例

胡户主—《江南360》 136 阅读
以下列出一些Flatten的使用示例: tuple示例: 1. b = load '/home/hdp-shoujizhushou/recommend/test/data' as (a:chararray,b:tuple(b1:int,b2:int)); dump b (a,(1,2)) (b,(3,4)) a = foreach b generate a,flatten(b); dump a (a,1,2) (b,3,4)   2. b = load '/home/hdp-shoujizhushou/recommend/test/data'   as (a:chararray,b:bag{t:tuple(b1:int,b2:int)}); (a,{(1,2),(11,12),(13,14)}) (b,{(3,4),(23,24)}) c = foreach b generate a, flatten(b); dump c (a,1,2) (a,11,12) (a,13,14) (b,3,4) (b,23,24) 3. b = load '/home/hdp-shoujizhushou/recommend/test/data'   as ...

Continue reading ‘[PIG] Flatten的使用示例’ »

作者:胡户主—《江南360》
原文地址:[PIG] Flatten的使用示例, 感谢原作者分享。

发表评论