Forum

Tagged: 

This topic contains 0 replies, has 1 voice, and was last updated by  Swathi sareddy 3 years, 1 month ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #244 Reply

    Swathi sareddy
    Participant

    lines = LOAD ‘/wordcount’ AS (line:chararray);
    words = FOREACH lines GENERATE FLATTEN(TOKENIZE(line)) as word;
    grouped = GROUP words BY word;
    wordcount = FOREACH grouped GENERATE group, COUNT(words);
    DUMP wordcount;

Viewing 1 post (of 1 total)
Reply To: Solution for wordcount in pig
Your information:




cf22

Your Name (required)

Your Email (required)

Subject

Phone No

Your Message

Cart

  • No products in the cart.