How do I extract the first tuple from a generated bag (whose size might vary) in PIG?

前端 未结 3 1099
旧时难觅i
旧时难觅i 2021-01-14 05:58

I am generating a \'bag\' of information whose size (number of tuples inside the the bag) might vary. From this, I want to extract the first element on the fly. How do I do

3条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-14 06:24

    Use DataFu UDF: FirstTupleFromBag (http://datafu.incubator.apache.org/docs/datafu/1.2.0/datafu/pig/bags/FirstTupleFromBag.html)

提交回复
热议问题