Support Questions
Find answers, ask questions, and share your expertise

Word Count a particular field using PIG.

Word Count a particular field using PIG.

New Contributor

Hi, My file is a tab separated file. And i want to word count only one particular field which is a Consumer_title in the Consumer_Review.tsv file. Kindly help me achieve this using PIG script.

 

My file seems like this :-

marketplace customer_id review_id product_id product_parent product_title product_category star_rating helpful_votes total_votes vine verified_purchase review_headline review_body review_date
US 24371595 R27ZP1F1CD0C3Y B004LLIL5A 346014806 Amazon eGift Card - Celebrate Gift Card 5 0 0 N Y Five Stars Great birthday gift for a young adult. 2015-08-31
US 42489718 RJ7RSBCHUDNNE B004LLIKVU 473048287 Amazon.com eGift Cards Gift Card 5 0 0 N Y Gift card for the greatest selection of items online It's an Amazon gift card and with over 982398324908 items I am sure you will find something you love. 2015-08-31
US 861463 R1HVYBSKLQJI5S B00IX1I3G6 926539283 Amazon.com Gift Card Balance Reload Gift Card 5 0 0 N Y Five Stars Good 2015-08-31
US 25283295 R2HAXF0IIYQBIR B00IX1I3G6 926539283 Amazon.com Gift Card Balance Reload Gift Card 1 0 0 N Y One Star Fair 2015-08-31
US 397970 RNYLPX611NB7Q B005ESMGV4 379368939 Amazon.com Gift Cards, Pack of 3 (Various Designs) Gift Card 5 0 0 N Y Five Stars I can't believe how quickly Amazon can get these into my hands!! Thank you! 2015-08-31
US 18513645 R3ALA9XXMBEDZR B004KNWWU4 326384774 Amazon Gift Card - Print - Happy Birthday (Birds) Gift Card 5 0 0 N Y Perfect for most every occasion! Perfect! Nice & easy plus everyone loves them. This is one gift you'll never have to return! 2015-08-31
US 22484620 R3R8PHAVJFTPDF B004LLIKVU 473048287 Amazon.com eGift Cards Gift Card 5 0 0 N Y Five Stars excelent 2015-08-31
US 14765851 R18WWEK8OIXE30 BT00CTP2EE 775486538 Amazon.com Gift Card in a Greeting Card (Various Designs) Gift Card 5 0 0 N Y Five Stars Great and Safe Gift Giving 2015-08-31
US 18751931 R1EGUNQON2J277 B004LLIKVU 473048287 Amazon.com eGift Cards Gift Card 1 0 0 N Y One Star What????????? 2015-08-31
US 15100528 R21Z4M4L98CPU2 B004W8D102 595099956 Amazon Gift Card - Print - Amazon Boxes Gift Card 5 0 0 N Y Five Stars This was just too easy~click & print! 2015-08-31