PIG how to count a number of rows in alias

前端 未结 7 1767
盖世英雄少女心
盖世英雄少女心 2020-12-07 11:03

I did something like this to count the number of rows in an alias in PIG:

logs = LOAD \'log\'
logs_w_one = foreach logs generate 1 as one;
logs_group = group         


        
相关标签:
7条回答
  • 2020-12-07 11:56

    USE COUNT_STAR

    LOGS= LOAD 'log';
    LOGS_GROUP= GROUP LOGS ALL;
    LOG_COUNT = FOREACH LOGS_GROUP GENERATE COUNT_STAR(LOGS);
    
    0 讨论(0)
提交回复
热议问题